INNER CODE UNIT · Go

BenchmarkAnalyzeSlowOp

simagix/hatchet · benchmark_test.go:84

func BenchmarkAnalyzeSlowOp(b *testing.B) {
	doc := Logv2Info{}
	bson.UnmarshalExtJSON([]byte(benchmarkLogStr), false, &doc)
	AddLegacyString(&doc)

	b.ReportAllocs()
	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		AnalyzeSlowOp(&doc)
	}
}

// BenchmarkParseAttributes benchmarks the optimized attribute parsing
func BenchmarkParseAttributes(b *testing.B) {
	doc := Logv2Info{}
	bson.UnmarshalExtJSON([]byte(benchmarkLogStr), false, &doc)

	b.ReportAllocs()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…