@@ -964,11 +964,11 @@ func writeTraceBenchmarkJSON(t testing.TB, label string, spans []traceSpan, outp
964964 var entries []benchmarkEntry
965965 for _ , name := range names {
966966 s := m [name ]
967- avg := float64 (s .total .Milliseconds ()) / float64 (s .count )
967+ avg := float64 (s .total .Microseconds ()) / float64 (s .count )
968968 entries = append (entries ,
969- benchmarkEntry {Name : fmt .Sprintf ("%s - %s (avg)" , label , name ), Unit : "ms " , Value : avg },
970- benchmarkEntry {Name : fmt .Sprintf ("%s - %s (min)" , label , name ), Unit : "ms " , Value : float64 (s .min .Milliseconds ())},
971- benchmarkEntry {Name : fmt .Sprintf ("%s - %s (max)" , label , name ), Unit : "ms " , Value : float64 (s .max .Milliseconds ())},
969+ benchmarkEntry {Name : fmt .Sprintf ("%s - %s (avg)" , label , name ), Unit : "us " , Value : avg },
970+ benchmarkEntry {Name : fmt .Sprintf ("%s - %s (min)" , label , name ), Unit : "us " , Value : float64 (s .min .Microseconds ())},
971+ benchmarkEntry {Name : fmt .Sprintf ("%s - %s (max)" , label , name ), Unit : "us " , Value : float64 (s .max .Microseconds ())},
972972 )
973973 }
974974
0 commit comments