Skip to content

Commit ebe0348

Browse files
lpcoxCopilot
andauthored
Update .github/workflows/token-usage-analyzer.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b7d42a7 commit ebe0348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/token-usage-analyzer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For each workflow that has token data, calculate:
106106

107107
1. **Total tokens**: `input_tokens + output_tokens + cache_read_tokens + cache_write_tokens`
108108
2. **Billable tokens**: `input_tokens + output_tokens + cache_write_tokens` (cache reads are discounted)
109-
3. **Input/output ratio**: `(input_tokens + cache_read_tokens) / output_tokens`
109+
3. **Input/output ratio**: `(input_tokens + cache_read_tokens) / output_tokens` (if `output_tokens == 0`, treat the ratio as ``/`N/A` and exclude that request from ratio averages to avoid division by zero)
110110
4. **Cache hit rate**: `cache_read_tokens / (cache_read_tokens + input_tokens) * 100`
111111
5. **Request count**: Number of records in the JSONL
112112
6. **Average latency**: Mean `duration_ms` per request

0 commit comments

Comments
 (0)