Add vendor dependencies and update project structure

This commit is contained in:
FeynmanLoo committed 2025-04-23 08:05:46 +08:00
1 parent 191785021e
commit 7350331b3a
1077 files changed
+1082686 -357

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# 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.