-
Notifications
You must be signed in to change notification settings - Fork 266
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
feat: Updated metrics #10885
feat: Updated metrics #10885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'd change the callDuration
to use the high resolution timer
valueType: ValueType.INT, | ||
}); | ||
|
||
this.blockBuilderInsertions = meter.createGauge(Metrics.SEQUENCER_BLOCK_BUILD_INSERTION_TIME, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intended to be a histogram?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it probably should be
@@ -135,6 +139,10 @@ export class PublicProcessor implements Traceable { | |||
} | |||
} | |||
|
|||
const duration = timer.s(); | |||
const rate = duration > 0 ? totalGas.l2Gas / duration : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non blocking: I think it would be cool to calculate the rate in Grafana (e.g. adding to a counter the gas used after each tx)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that would work would it? I think I actually want histograms here.
@@ -257,6 +263,8 @@ export class NativeWorldState implements NativeWorldStateInstance { | |||
throw new Error('Invalid response message type: ' + response.msgType + ' != ' + messageType); | |||
} | |||
|
|||
this.instrumentation.recordRoundTrip(callDuration * 1000, messageType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is going to give us the resolution we want. We should be using process.hrtime
for this https://nodejs.org/api/process.html#processhrtimebigint
this.requestHistogram = meter.createHistogram(Metrics.WORLD_STATE_REQUEST_TIME, { | ||
description: 'The round trip time of world state requests', | ||
unit: 'microseconds', | ||
valueType: ValueType.INT, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need buckets as the ones for ms
won't be applied.
|
||
this.requestHistogram = meter.createHistogram(Metrics.WORLD_STATE_REQUEST_TIME, { | ||
description: 'The round trip time of world state requests', | ||
unit: 'microseconds', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit: 'microseconds', | |
unit: 'us', |
provingJobBlocks: Gauge; | ||
provingJobTransactions: Gauge; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are created as histograms.
|
||
this.totalGasHistogram = meter.createHistogram(Metrics.PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM, { | ||
description: 'Total gas used in block as histogram', | ||
unit: 'gas', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads up that the default histogram buckets only go up to 10k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorted, thanks
* master: (119 commits) chore(master): Release 0.68.0 (#10834) feat: enable profiling with local PXE in cli-wallet (#10736) chore: values for sepolia deployment (#10362) fix: vm_full_tests.yml (#10912) chore: disable bb-sanitizers.yml (#10901) chore: Check yarn version during bootstrap (#10910) fix(p2p): default peer score penalties (#10896) feat: Updated metrics (#10885) feat: Reduce bundle sizes, remove polyfills (#10877) chore: Replace bbup.dev link (#10908) chore(avm): extra column information in lookups (#10905) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore: disable flake in e2e_fees/private_payments (#10898) chore(ci): disable e2e_cheat_codes.test.ts (#10897) fix: increase default heartbeat (#10891) fix(p2p): less verbose error (#10886) refactor: `contact` --> `sender` in PXE API (#10861) ...
This PR adds a number of metrics.