diff options
author | Andy Green <andy@warmcat.com> | 2021-01-06 15:08:22 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2021-03-08 21:47:28 +0000 |
commit | 3f4623bb36b6079b3dc59560a9b3ffa1043e3474 (patch) | |
tree | f1a29f8e398094c0110fc90c08f7f68935508e00 /lib/roles/h1 | |
parent | c11a49c0b90a181f64acce47509c2659e5b68efd (diff) | |
download | libwebsockets-3f4623bb36b6079b3dc59560a9b3ffa1043e3474.tar.gz |
lws_metrics
There are a few build options that are trying to keep and report
various statistics
- DETAILED_LATENCY
- SERVER_STATUS
- WITH_STATS
remove all those and establish a generic rplacement, lws_metrics.
lws_metrics makes its stats available via an lws_system ops function
pointer that the user code can set.
Openmetrics export is supported, for, eg, prometheus scraping.
Diffstat (limited to 'lib/roles/h1')
-rw-r--r-- | lib/roles/h1/ops-h1.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/roles/h1/ops-h1.c b/lib/roles/h1/ops-h1.c index ea69163f..a6e53e40 100644 --- a/lib/roles/h1/ops-h1.c +++ b/lib/roles/h1/ops-h1.c @@ -521,19 +521,6 @@ try_pollout: return LWS_HPI_RET_HANDLED; } - lws_stats_bump(pt, LWSSTATS_C_WRITEABLE_CB, 1); -#if defined(LWS_WITH_STATS) - if (wsi->active_writable_req_us) { - uint64_t ul = lws_now_usecs() - - wsi->active_writable_req_us; - - lws_stats_bump(pt, LWSSTATS_US_WRITABLE_DELAY_AVG, ul); - lws_stats_max(pt, - LWSSTATS_US_WORST_WRITABLE_DELAY, ul); - wsi->active_writable_req_us = 0; - } -#endif - n = user_callback_handle_rxflow(wsi->a.protocol->callback, wsi, LWS_CALLBACK_HTTP_WRITEABLE, wsi->user_space, NULL, 0); @@ -934,6 +921,7 @@ rops_adoption_bind_h1(struct lws *wsi, int type, const char *vh_prot_name) #if defined(LWS_WITH_HTTP2) if ((!(type & LWS_ADOPT_ALLOW_SSL)) && (wsi->a.vhost->options & LWS_SERVER_OPTION_H2_PRIOR_KNOWLEDGE)) { lwsl_info("http/2 prior knowledge\n"); + lws_metrics_tag_wsi_add(wsi, "upg", "h2_prior"); lws_role_call_alpn_negotiated(wsi, "h2"); } else |