only count completed requests as streamed or not
This commit is contained in:
@@ -115,13 +115,13 @@ func handleJsonLine(line []byte, wasstreamed int) {
|
|||||||
tokens_out.Add(jsonData["eval_count"].(float64))
|
tokens_out.Add(jsonData["eval_count"].(float64))
|
||||||
tokens_in.Add(jsonData["prompt_eval_count"].(float64))
|
tokens_in.Add(jsonData["prompt_eval_count"].(float64))
|
||||||
eval_time.Observe(duration)
|
eval_time.Observe(duration)
|
||||||
}
|
|
||||||
if wasstreamed == 1 {
|
if wasstreamed == 1 {
|
||||||
streamed.Inc()
|
streamed.Inc()
|
||||||
} else if wasstreamed == 0 {
|
} else if wasstreamed == 0 {
|
||||||
notStreamed.Inc()
|
notStreamed.Inc()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var opsProcessed = promauto.NewCounter(prometheus.CounterOpts{
|
var opsProcessed = promauto.NewCounter(prometheus.CounterOpts{
|
||||||
Name: "llmproxymetrics_total_requests",
|
Name: "llmproxymetrics_total_requests",
|
||||||
|
|||||||
Reference in New Issue
Block a user