- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestReportMetric (0.14 sec)
-
src/testing/benchmark_test.go
var buf bytes.Buffer for pb.Next() { // The loop body is executed b.N times total across all goroutines. buf.Reset() templ.Execute(&buf, "World") } }) }) } func TestReportMetric(t *testing.T) { res := testing.Benchmark(func(b *testing.B) { b.ReportMetric(12345, "ns/op") b.ReportMetric(0.2, "frobs/op") }) // Test built-in overriding. if res.NsPerOp() != 12345 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.6K bytes - Viewed (0)