feat: label SessionTime histogram by process type#173
Closed
GregTheGreek wants to merge 1 commit intomainfrom
Closed
feat: label SessionTime histogram by process type#173GregTheGreek wants to merge 1 commit intomainfrom
GregTheGreek wants to merge 1 commit intomainfrom
Conversation
relayer.SessionTime currently lumps keygen, signing, and resharing into a single distribution, so any dashboard quantile is a mix of three very different workloads (Paillier keygen in the tens of seconds, signing in the hundreds of milliseconds, resharing in between). Add Type() to TssProcess, have each implementation return a stable string, and thread it through Metrics.StartProcess so EndProcess can emit the histogram with a "type" attribute. Grafana queries should now filter by type (e.g. keygen|signing|resharing) to get meaningful p50/p95. Co-Authored-By: Claude
|
Go Test coverage is 53.3 %\ ✨ ✨ ✨ |
Collaborator
|
The other workloads basically never happen so I don't think for the purposes of metrics it does anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`relayer.SessionTime` has always lumped all three TSS workloads into one distribution, which makes its quantiles meaningless:
Any dashboard p50/p95 computed over this histogram is a weighted average of three wildly different curves.
Change
No change to cache.Metrics or the `EndProcess` signature - the type is recovered from the stored session entry.
Grafana note
After this lands, query p95 as:
```
histogram_quantile(0.95, sum by (le) (rate(relayer_SessionTime_bucket{type="signing"}[5m])))
```
Dashboards that don't filter on `type` will silently aggregate all three workloads, same as today.
Test plan
Notes for reviewers