Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
astrophysik committed Oct 16, 2023
1 parent da1ab96 commit a6479f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/statshouse/statshouse-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,19 @@ void StatsHouseManager::add_request_stats(uint64_t script_time_ns, uint64_t net_
client.metric("kphp_request_time").tag("net").tag(worker_type).tag(status).write_value(net_time_ns);
client.metric("kphp_request_cpu_time").tag("user").tag(worker_type).tag(status).write_value(script_user_time_ns);
client.metric("kphp_request_cpu_time").tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns);
client.metric("kphp_request_load_time").tag("script_init").tag(worker_type).tag(status).write_value(script_init_time);
client.metric("kphp_request_load_time").tag("http_connection_process").tag(worker_type).tag(status).write_value(http_connection_process_time);
client.metric("kphp_request_init_time").tag(worker_type).tag(status).write_value(script_init_time);
if (process_type == ProcessType::http_worker) {
client.metric("kphp_http_connection_process_time").tag(status).write_value(http_connection_process_time);
}

client.metric("kphp_by_host_request_time", true).tag("script").tag(worker_type).write_value(script_time_ns);
client.metric("kphp_by_host_request_time", true).tag("net").tag(worker_type).write_value(net_time_ns);
client.metric("kphp_by_host_request_cpu_time", true).tag("user").tag(worker_type).tag(status).write_value(script_user_time_ns);
client.metric("kphp_by_host_request_cpu_time", true).tag("system").tag(worker_type).tag(status).write_value(script_system_time_ns);
client.metric("kphp_by_host_request_init_time", true).tag(worker_type).tag(status).write_value(script_init_time);
if (process_type == ProcessType::http_worker) {
client.metric("kphp_by_host_http_connection_process_time", true).tag(status).write_value(http_connection_process_time);
}
client.metric("kphp_by_host_request_load_time", true).tag("script_init").tag(worker_type).tag(status).write_value(script_init_time);
client.metric("kphp_by_host_request_load_time", true).tag("http_connection_process").tag(worker_type).tag(status).write_value(http_connection_process_time);

Expand Down

0 comments on commit a6479f1

Please sign in to comment.