mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-28 08:00:50 +02:00
server: refactor sleep handling, allow access /metrics during sleep (#27376)
* add cached responses * refactor on_sleeping_state * allow accessing metrics during sleep * metrics task should not reset timer * updated docs * fix * fix get_res_model_info * add test * fix a race condition * split metrics and slots tasks / results * should_reset_buckets
This commit is contained in:
@@ -1512,10 +1512,15 @@ json server_task_result_error::to_json() {
|
||||
//
|
||||
// server_task_result_metrics
|
||||
//
|
||||
json server_task_result_metrics::to_json() {
|
||||
json server_task_result_slots::to_json() {
|
||||
return slots_data;
|
||||
}
|
||||
|
||||
json server_task_result_metrics::to_json() {
|
||||
// not used, /metrics renders prometheus text via to_metrics()
|
||||
return json{};
|
||||
}
|
||||
|
||||
// metrics definition: https://prometheus.io/docs/practices/naming/#metric-names
|
||||
std::string server_task_result_metrics::to_metrics() {
|
||||
const std::vector<metric_item> counters = {
|
||||
|
||||
Reference in New Issue
Block a user