Benchmark tests
(b *testing.B)
| 519 | |
| 520 | // Benchmark tests |
| 521 | func BenchmarkSimpleTokenCounter_Count(b *testing.B) { |
| 522 | counter := NewGPT4Counter() |
| 523 | text := "This is a sample text for benchmarking token counting performance." |
| 524 | ctx := context.Background() |
| 525 | |
| 526 | for b.Loop() { |
| 527 | _, _ = counter.Count(ctx, text) |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | func BenchmarkSimpleTokenCounter_EstimateMessages(b *testing.B) { |
| 532 | counter := NewGPT4Counter() |
nothing calls this directly
no test coverage detected