File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,20 @@ func runAllocationBench(
351351 // worst/best case outcomes.
352352 result , sampleStddev := findMinDistanceClusterStatRun (t , samples )
353353 for tag , value := range sampleStddev {
354- result .Total [fmt .Sprintf ("std_%s" , tag )] = value
354+ metricName := fmt .Sprintf ("std_%s" , tag )
355+ result .Total [metricName ] = value
356+
357+ // Populate BenchmarkMetrics with metadata if it's initialized
358+ // (it will be initialized only when OpenMetrics is enabled)
359+ if result .BenchmarkMetrics != nil {
360+ result .BenchmarkMetrics [metricName ] = roachtestutil.AggregatedMetric {
361+ Name : metricName ,
362+ Value : roachtestutil .MetricPoint (value ),
363+ Unit : "stddev" ,
364+ IsHigherBetter : false , // Lower standard deviation is better
365+ AdditionalLabels : nil ,
366+ }
367+ }
355368 }
356369 if result == nil {
357370 t .L ().PrintfCtx (ctx , "no samples found for allocation bench run, won't put any artifacts" )
You can’t perform that action at this time.
0 commit comments