MCPcopy Create free account
hub / github.com/github/gh-aw / BenchmarkExtractJSONMetrics

Function BenchmarkExtractJSONMetrics

pkg/cli/logs_benchmark_test.go:198–204  ·  view source on GitHub ↗

BenchmarkExtractJSONMetrics benchmarks JSON metrics extraction

(b *testing.B)

Source from the content-addressed store, hash-verified

196
197// BenchmarkExtractJSONMetrics benchmarks JSON metrics extraction
198func 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
207func BenchmarkExtractJSONMetrics_Complex(b *testing.B) {

Callers

nothing calls this directly

Calls 1

ExtractJSONMetricsFunction · 0.92

Tested by

no test coverage detected