13 lines
799 B
Plaintext
13 lines
799 B
Plaintext
# llm-api-benchmark-tool Project Rules & Patterns
|
|
|
|
1. **TDD is MANDATORY.** Write tests first (`test/` dir).
|
|
2. **Client Implementation:** Use `FastHTTPClient` (`pkg/client/fasthttp.go`).
|
|
3. `FastHTTPClient` uses `fasthttp` for `Do` (non-stream) and `net/http` for `Stream` (SSE).
|
|
4. Streaming stability relies on the internal `net/http` usage.
|
|
5. Configuration via `config/config.yaml` drives benchmark parameters.
|
|
6. Core metrics defined in `stats.RequestResult` (`pkg/stats/collector.go`).
|
|
7. Concurrency managed via goroutine pool in `pkg/concurrency/manager.go`.
|
|
8. Use `tiktoken-go/tokenizer` for token operations.
|
|
9. Record results (`statsCollector.RecordResult`) immediately after request completion in `runWorker`.
|
|
10. Prefer fixing core functionality/bugs before large refactors.
|