{{/* The usage tab of the people page. */}} {{define "usage_body"}} {{if .Error}}
{{.Error}}
{{end}} {{/* One row of controls above the charts, which is where a reader looks for them. Links rather than a script: the choice is in the URL, so a view worth coming back to can be bookmarked or pasted to somebody else. */}}{{th "usage.unpriced"}}
| {{t "usage.col.group"}} | {{t "usage.requests"}} | {{t "usage.tokens"}} | {{t "usage.spend"}} | {{t "usage.errors"}} | {{if .HasStats}}{{t "usage.col.error_rate"}} | {{t "usage.col.limited"}} | {{t "usage.col.ttft"}} | {{t "usage.col.latency"}} | {{end}}
|---|---|---|---|---|---|---|---|---|
| {{.Name}} | {{compact .Requests}} | {{compact .Tokens}} | {{.Spend}} | {{if .Errors}}{{count .Errors}}{{else}}—{{end}} | {{if $.HasStats}}{{with .Stats}}{{if .Requests}}{{t "usage.pct" (pct1 .ErrorRate)}}{{else}}—{{end}} | {{if .Limited}}{{compact .Limited}}{{else}}—{{end}} | {{pctile .TTFT 50}} / {{pctile .TTFT 95}} | {{pctile .Latency 95}} | {{end}}{{end}}
{{t "usage.empty"}}
{{end}} {{with .GPUHours}}| {{t "usage.col.owner"}} | {{t "usage.col.gpu_hours"}} | {{t "usage.col.held_now"}} |
|---|---|---|
| {{.Owner}} | {{num .Hours 1}} | {{num .Now 0}} |
{{t "usage.gpu.note"}}
{{end}} {{/* The charts fold their tail; the table does not. Both are here because they answer different questions, and the one that is easy to get wrong is thinking the four coloured lines are all of it. */}}{{t "usage.note.charts"}}
{{th "usage.note.person"}}
{{end}}