cockroach
cockroach copied to clipboard
rac2: add token counter and stream metrics
This commit introduces metrics related to stream eval tokens and stream send tokens. Hooking up these metrics to the registry will be in a subsequent commit.
There are two separate metric structs used:
tokenCounterMetrics, which only contains counter and is shared among alltokenCounters on the same node. EachtokenCounterupdates the shared counters afteradjustis called.tokenStreamMetrics, which is updated periodically by callingUpdateMetricGaugesvia theStreamTokenCounterProvider, which is one per node.
Metrics related to WaitForEval (as well as blocked stream logging) are
also deferred to a subsequent commit.
Part of: https://github.com/cockroachdb/cockroach/issues/128031 Release note: None
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Open to suggestions for the migration. I was planning on just hooking these up and having both metrics be enabled at once. We could reuse the existing metrics with some heavy refactoring, if that were desirable.
Should be ready for another look @sumeerbhola.
TYFTR!
bors r=sumeerbhola