metrics: seperate cache/processed prompt tokens

This commit is contained in:
Xuan Son Nguyen
2026-08-12 13:54:36 +02:00
parent a55abe44aa
commit e0f113decb
4 changed files with 32 additions and 10 deletions
+2
View File
@@ -1518,6 +1518,7 @@ json server_task_result_metrics::to_json() {
{ "t_start", t_start },
{ "n_prompt_tokens_processed_total", prompt.count },
{ "n_prompt_tokens_cached_total", n_prompt_cached },
{ "t_tokens_generation_total", predict.time / 1e3 },
{ "n_tokens_predicted_total", predict.count },
{ "t_prompt_processing_total", prompt.time / 1e3 },
@@ -1525,6 +1526,7 @@ json server_task_result_metrics::to_json() {
{ "n_tokens_max", n_tokens_max },
{ "n_prompt_tokens_processed", prompt_bucket.count },
{ "n_prompt_tokens_cached", n_prompt_cached_bucket },
{ "t_prompt_processing", prompt_bucket.time / 1e3 },
{ "n_tokens_predicted", predict_bucket.count },
{ "t_tokens_generation", predict_bucket.time / 1e3 },