-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
roachtest: add post-process step for perf metrics #138617
base: master
Are you sure you want to change the base?
roachtest: add post-process step for perf metrics #138617
Conversation
8e65484
to
c16d5a6
Compare
0045d82
to
62cea99
Compare
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
81f6b0e
to
7bc5033
Compare
0a204f5
to
5b23f95
Compare
c765b82
to
ba12c23
Compare
pkg/cmd/roachtest/test_runner.go
Outdated
@@ -1409,6 +1412,13 @@ func (r *testRunner) runTest( | |||
if err := r.postTestAssertions(ctx, t, c, 10*time.Minute); err != nil { | |||
l.Printf("error during post test assertions: %v; see test-post-assertions.log for details", err) | |||
} | |||
|
|||
if t.spec.Benchmark && t.ExportOpenmetrics() { | |||
if err := r.postProcessPerfMetrics(ctx, t, c); err != nil { |
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.
From my understanding this downloads the metrics, does post processing and then re-uploads the metrics to the node. And then eventually on:
line 971:
if t.spec.Benchmark {
getPerfArtifacts(ctx, c, t)
}
The perf artifacts (metrics) will get downloaded again?
For my own understanding, is there a reason we don't do the post processing on or after getPerfArtifacts(ctx, c, t)
which won't require a re-upload step?
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.
That's a good point.
Let me take a look and refactor my changes into the getPerfArtifacts
function you mentioned.
Thanks for pointing out !
6a81967
to
7a6a072
Compare
529b512
to
e824e9b
Compare
There are many tests in which had some custom post processing done in roachperf to emit the metrics. To add this facility in the roachtests itself, this change aims to : 1.Adds 2 new user facing structs `HistogramMetric`, that gives the user access to the histogram metrics generated by the workload and `PerfMetrics` which user can return with their aggregated metric. 2. Introduce a new `PostProcessPerfMetrics(HistogramMetrics) PerfMetrics` step in test spec where the test writer can do custom aggregation and provide the aggregated metric. If the test has not implemented this step, the runner will use the `DefaultPostProcess` function. 3. The step creates a new openmetrics file with the name `aggregated_stats.om` that will have the aggregated metrics. 4. Implement `PostProcessPerfMetrics` in some roachtests that do post processing in roachperf. Epic: https://cockroachlabs.atlassian.net/browse/CRDB-41852 Release note: None
e824e9b
to
954280a
Compare
There are many tests in which had some custom post processing done in
roachperf
to emit the metrics.To add this facility in the roachtests itself, this change aims to :
HistogramMetric
, that gives the useraccess to the histogram metrics generated by the workload and
AggregatedPerfMetrics
which user can return with their aggregated metric.PostProcessPerfMetrics(HistogramMetrics) AggregatedPerfMetrics
step in test spec where the test writer can do customaggregation and provide the aggregated metric. If the test has not
implemented this step, the runner will use the
DefaultPostProcess
function.
aggregated_stats.om
that will have the aggregated metrics.PostProcessPerfMetrics
in some roachtests that dopost processing in roachperf. The implementation is borrowed from
roachperf
for each test.There are some
roachtests
for whichPostProcessPerfMetrics
is not implemented. It will be done in subsequent PRsEpic: https://cockroachlabs.atlassian.net/browse/CRDB-41852
Release note: None