@@ -51,15 +51,17 @@ struct server_context {
5151struct server_res_generator ;
5252
5353struct server_routes {
54- server_routes (const common_params & params, server_context & ctx_server, std::function<bool ()> is_ready = []() { return true ; })
55- : params(params), ctx_server(*ctx_server.impl), is_ready(is_ready) {
54+ server_routes (const common_params & params, server_context & ctx_server, std::function<bool ()> is_ready = []() { return true ; }, int64_t t_start = 0 )
55+ : params(params), ctx_server(*ctx_server.impl), is_ready(is_ready), t_server_start(t_start),
56+ system_info_str (common_params_get_system_info(params)) {
5657 init_routes ();
5758 }
5859
5960 void init_routes ();
6061 // handlers using lambda function, so that they can capture `this` without `std::bind`
6162 server_http_context::handler_t get_health;
6263 server_http_context::handler_t get_metrics;
64+ server_http_context::handler_t get_v1_metrics;
6365 server_http_context::handler_t get_slots;
6466 server_http_context::handler_t post_slots;
6567 server_http_context::handler_t get_props;
@@ -90,4 +92,6 @@ struct server_routes {
9092 const common_params & params;
9193 server_context_impl & ctx_server;
9294 std::function<bool ()> is_ready;
95+ int64_t t_server_start;
96+ std::string system_info_str;
9397};
0 commit comments