Skip to content

Commit 22b9c9e

Browse files
committed
Update README and main.go to enhance session organization and reduce timeout duration
1 parent 8269d88 commit 22b9c9e

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ A fast, concurrent benchmarking tool for measuring LLM API performance metrics a
88
- **Concurrent Testing**: Benchmark all providers simultaneously with `--all` flag
99
- **Real Metrics**: Measures End-to-End Latency, Time to First Token (TTFT), and Throughput
1010
- **Accurate Token Counting**: Uses tiktoken for precise token measurements
11+
- **Session-Based Organization**: Each test run creates its own timestamped folder with logs and results
12+
- **Markdown Reports**: Auto-generates performance summaries with leaderboards and failure analysis
13+
- **Timeout Protection**: 2-minute timeout prevents indefinite hangs on stuck providers
1114

1215
## Quick Start
1316

@@ -73,6 +76,28 @@ cp example.env .env
7376
./llm-api-speed --all
7477
```
7578

79+
## Output
80+
81+
Each test run creates a session folder: `results/session-YYYYMMDD-HHMMSS/`
82+
83+
```
84+
results/session-20251110-004615/
85+
├── logs/
86+
│ ├── nim-20251110-004615.log
87+
│ ├── novita-20251110-004615.log
88+
│ └── minimax-20251110-004615.log
89+
├── nim-20251110-004637.json
90+
├── novita-20251110-004640.json
91+
├── minimax-20251110-004642.json
92+
└── REPORT.md # Performance summary with leaderboards
93+
```
94+
95+
**REPORT.md** includes:
96+
- Summary statistics (success/failure counts)
97+
- Performance leaderboards (by throughput and TTFT)
98+
- Detailed metrics for all providers
99+
- Error details for failed tests
100+
76101
## Supported Providers
77102

78103
- **generic** - OpenRouter (default) or any OpenAI-compatible API (use `--url` to override)

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ func testProviderMetrics(config ProviderConfig, tke *tiktoken.Tiktoken, wg *sync
8888
var firstTokenTime time.Time
8989
var fullResponseContent strings.Builder
9090

91-
// Add timeout context to prevent indefinite hangs (5 minutes)
92-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
91+
// Add timeout context to prevent indefinite hangs (2 minutes)
92+
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
9393
defer cancel()
9494

9595
stream, err := client.CreateChatCompletionStream(ctx, req)

0 commit comments

Comments
 (0)