INNER CODE UNIT · Go

BenchmarkParseAttributes

simagix/hatchet · benchmark_test.go:97

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

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

// BenchmarkObfuscateString benchmarks string obfuscation
func BenchmarkObfuscateString(b *testing.B) {
	obs := NewObfuscation()
	testStrings := []string{
		"user@example.com",
		"192.168.1.100",
		"server.mongodb.net",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…