summaryrefslogtreecommitdiff
path: root/examples/server/utils.hpp
diff options
context:
space:
mode:
authorPierrick Hymbert <pierrick.hymbert@gmail.com>2024-02-25 13:49:43 +0100
committerGitHub <noreply@github.com>2024-02-25 13:49:43 +0100
commitd52d7819b8ced70c642a88a59da8c78208dc58ec (patch)
tree07841f1c5b7ab748bac463e62f3fb7ce0b7f96e9 /examples/server/utils.hpp
parent12894088170f62e4cad4f8d6a3043c185b414bab (diff)
server: concurrency fix + monitoring - add /metrics prometheus compatible endpoint (#5708)
* server: monitoring - add /metrics prometheus compatible endpoint * server: concurrency issue, when 2 task are waiting for results, only one call thread is notified * server: metrics - move to a dedicated struct
Diffstat (limited to 'examples/server/utils.hpp')
-rw-r--r--examples/server/utils.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/server/utils.hpp b/examples/server/utils.hpp
index 88545eb6..71cc5b0b 100644
--- a/examples/server/utils.hpp
+++ b/examples/server/utils.hpp
@@ -50,7 +50,7 @@ enum task_type {
TASK_TYPE_COMPLETION,
TASK_TYPE_CANCEL,
TASK_TYPE_NEXT_RESPONSE,
- TASK_TYPE_SLOTS_DATA
+ TASK_TYPE_METRICS
};
struct task_server {
@@ -441,7 +441,7 @@ struct llama_server_response {
{
LOG_VERBOSE("queue_results.push_back", {});
queue_results.push_back(result);
- condition_results.notify_one();
+ condition_results.notify_all();
return;
}
}