BenchmarkExtractJSONMetrics benchmarks JSON metrics extraction
(b *testing.B)
| 196 | |
| 197 | // BenchmarkExtractJSONMetrics benchmarks JSON metrics extraction |
| 198 | func BenchmarkExtractJSONMetrics(b *testing.B) { |
| 199 | jsonLine := `{"type":"usage","input_tokens":1000,"output_tokens":500,"cost":0.015}` |
| 200 | |
| 201 | for b.Loop() { |
| 202 | _ = workflow.ExtractJSONMetrics(jsonLine, false) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | // BenchmarkExtractJSONMetrics_Complex benchmarks complex JSON metrics extraction |
| 207 | func BenchmarkExtractJSONMetrics_Complex(b *testing.B) { |
nothing calls this directly
no test coverage detected