server : fix divide-by-zero in metrics reporting (#11915)
This commit is contained in:
parent
2eea03d86a
commit
c4d29baf32
1 changed files with 1 additions and 1 deletions
|
@ -3656,7 +3656,7 @@ int main(int argc, char ** argv) {
|
||||||
}, {
|
}, {
|
||||||
{"name", "n_busy_slots_per_decode"},
|
{"name", "n_busy_slots_per_decode"},
|
||||||
{"help", "Average number of busy slots per llama_decode() call"},
|
{"help", "Average number of busy slots per llama_decode() call"},
|
||||||
{"value", (float) res_metrics->n_busy_slots_total / (float) res_metrics->n_decode_total}
|
{"value", (float) res_metrics->n_busy_slots_total / std::max((float) res_metrics->n_decode_total, 1.f)}
|
||||||
}}},
|
}}},
|
||||||
{"gauge", {{
|
{"gauge", {{
|
||||||
{"name", "prompt_tokens_seconds"},
|
{"name", "prompt_tokens_seconds"},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue