Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emitting diagnostic event containing Soroban resource utilization metrics #3847

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

jayz22
Copy link
Contributor

@jayz22 jayz22 commented Jul 20, 2023

Description

Resolves ##3759
This PR adds a few metrics to inform on network utilization and help answer the question "how close we are to the limits".
It adds the the metrics as diagnostic events, so that they can be consumed by the downstream.
It also adds a new "invoke time" metric which is a better comparison to the cpu instructions than the current "exec time", resolving #3776 (comment)

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

@jayz22 jayz22 changed the title Metrics Add several Soroban metrics; add them to a diagnostic event Jul 20, 2023
@jayz22 jayz22 changed the title Add several Soroban metrics; add them to a diagnostic event Emitting diagnostic event containing Soroban resource utilization metrics Jul 20, 2023
@jayz22 jayz22 requested review from sisuresh and graydon July 25, 2023 16:02
@jayz22
Copy link
Contributor Author

jayz22 commented Jul 25, 2023

After discussing with @sisuresh, we decided it is better to just have one event per metric, with the topics containing {"core_metrics", "metric_name"}, more specifying info maybe included in the topics in the future. The downside is each tx/op will now emit 20 (may grow in the future too), instead of 1 extra events, and downstream will decide how to index them. This should be fine and it's better than us defining a fixed data structure (of a single large event) for the downstream to parse.
cc @tsachiherman

@graydon
Copy link
Contributor

graydon commented Jul 28, 2023

r+ f0f9337

Copy link
Contributor

@graydon graydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants