(b *testing.B)
| 131 | } |
| 132 | |
| 133 | func BenchmarkSimpleUnmarshal(b *testing.B) { |
| 134 | record := newLogFFRecord() |
| 135 | buf := []byte(`{"id": 123213, "OriginID": 22, "meth": "GET"}`) |
| 136 | err := record.UnmarshalJSON(buf) |
| 137 | if err != nil { |
| 138 | b.Fatalf("UnmarshalJSON: %v", err) |
| 139 | } |
| 140 | b.SetBytes(int64(len(buf))) |
| 141 | |
| 142 | b.ResetTimer() |
| 143 | for i := 0; i < b.N; i++ { |
| 144 | err := record.UnmarshalJSON(buf) |
| 145 | if err != nil { |
| 146 | b.Fatalf("UnmarshalJSON: %v", err) |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func BenchmarkSXimpleUnmarshalNative(b *testing.B) { |
| 152 | record := newLogRecord() |
nothing calls this directly
no test coverage detected
searching dependent graphs…