(b *testing.B)
| 69 | } |
| 70 | |
| 71 | func BenchmarkMarshalJSONNative(b *testing.B) { |
| 72 | record := newLogFFRecord() |
| 73 | |
| 74 | buf, err := json.Marshal(record) |
| 75 | if err != nil { |
| 76 | b.Fatalf("Marshal: %v", err) |
| 77 | } |
| 78 | b.SetBytes(int64(len(buf))) |
| 79 | |
| 80 | b.ResetTimer() |
| 81 | for i := 0; i < b.N; i++ { |
| 82 | _, err := ffjson.MarshalFast(record) |
| 83 | if err != nil { |
| 84 | b.Fatalf("Marshal: %v", err) |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func BenchmarkMarshalJSONNativePool(b *testing.B) { |
| 90 | record := newLogFFRecord() |
nothing calls this directly
no test coverage detected
searching dependent graphs…