diff options
author | Andy Green <andy@warmcat.com> | 2019-08-10 07:32:32 +0100 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2019-08-12 06:18:04 +0100 |
commit | 2fc35ef6bd68007b482c7bc4a2fc2f0c3ab3bbd2 (patch) | |
tree | 82a93dd4425ad10536bc26aefd4683b2da270ada /lib/roles/h1 | |
parent | 498a4e2bd7523edb9d08b7091fe56b922feb6c56 (diff) | |
download | libwebsockets-2fc35ef6bd68007b482c7bc4a2fc2f0c3ab3bbd2.tar.gz |
stats: move to pt and improve presentation
Diffstat (limited to 'lib/roles/h1')
-rw-r--r-- | lib/roles/h1/ops-h1.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/roles/h1/ops-h1.c b/lib/roles/h1/ops-h1.c index 51843b77..87228e85 100644 --- a/lib/roles/h1/ops-h1.c +++ b/lib/roles/h1/ops-h1.c @@ -480,17 +480,15 @@ try_pollout: return LWS_HPI_RET_HANDLED; } - lws_stats_atomic_bump(wsi->context, pt, - LWSSTATS_C_WRITEABLE_CB, 1); + lws_stats_bump(pt, LWSSTATS_C_WRITEABLE_CB, 1); #if defined(LWS_WITH_STATS) if (wsi->active_writable_req_us) { - uint64_t ul = lws_time_in_microseconds() - + uint64_t ul = lws_now_usecs() - wsi->active_writable_req_us; - lws_stats_atomic_bump(wsi->context, pt, - LWSSTATS_MS_WRITABLE_DELAY, ul); - lws_stats_atomic_max(wsi->context, pt, - LWSSTATS_MS_WORST_WRITABLE_DELAY, ul); + 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 |