From b4bb5bb27025b71281f34275e7ada77cd2ca2219 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Wed, 8 Jun 2022 09:59:40 +0900 Subject: [PATCH] Cleanup: Get rid of afterpoll net stats --- .../monitoring/statistics/core/network-io.en.rst | 8 -------- iocore/net/Net.cc | 4 ---- iocore/net/P_Net.h | 2 -- iocore/net/UnixNetVConnection.cc | 1 - src/traffic_server/traffic_server.cc | 11 ++--------- 5 files changed, 2 insertions(+), 24 deletions(-) diff --git a/doc/admin-guide/monitoring/statistics/core/network-io.en.rst b/doc/admin-guide/monitoring/statistics/core/network-io.en.rst index 5ea7687457b..56168ab9595 100644 --- a/doc/admin-guide/monitoring/statistics/core/network-io.en.rst +++ b/doc/admin-guide/monitoring/statistics/core/network-io.en.rst @@ -25,10 +25,6 @@ Network I/O .. ts:stat:: global proxy.process.net.accepts_currently_open integer :type: counter -.. ts:stat:: global proxy.process.net.calls_to_readfromnet_afterpoll integer - :type: counter - :ungathered: - .. ts:stat:: global proxy.process.net.calls_to_readfromnet integer :type: counter :ungathered: @@ -49,10 +45,6 @@ Network I/O :type: counter :ungathered: -.. ts:stat:: global proxy.process.net.calls_to_writetonet_afterpoll integer - :type: counter - :ungathered: - .. ts:stat:: global proxy.process.net.calls_to_writetonet integer :type: counter :ungathered: diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc index f0cac5b4767..7f1ec3ceb5e 100644 --- a/iocore/net/Net.cc +++ b/iocore/net/Net.cc @@ -84,11 +84,9 @@ register_net_stats() {"proxy.process.net.calls_to_read", net_calls_to_read_stat}, {"proxy.process.net.calls_to_read_nodata", net_calls_to_read_nodata_stat}, {"proxy.process.net.calls_to_readfromnet", net_calls_to_readfromnet_stat}, - {"proxy.process.net.calls_to_readfromnet_afterpoll", net_calls_to_readfromnet_afterpoll_stat}, {"proxy.process.net.calls_to_write", net_calls_to_write_stat}, {"proxy.process.net.calls_to_write_nodata", net_calls_to_write_nodata_stat}, {"proxy.process.net.calls_to_writetonet", net_calls_to_writetonet_stat}, - {"proxy.process.net.calls_to_writetonet_afterpoll", net_calls_to_writetonet_afterpoll_stat}, {"proxy.process.net.inactivity_cop_lock_acquire_failure", inactivity_cop_lock_acquire_failure_stat}, {"proxy.process.net.net_handler_run", net_handler_run_stat}, {"proxy.process.net.read_bytes", net_read_bytes_stat}, @@ -121,11 +119,9 @@ register_net_stats() NET_CLEAR_DYN_STAT(net_connections_currently_open_stat); NET_CLEAR_DYN_STAT(net_accepts_currently_open_stat); NET_CLEAR_DYN_STAT(net_calls_to_readfromnet_stat); - NET_CLEAR_DYN_STAT(net_calls_to_readfromnet_afterpoll_stat); NET_CLEAR_DYN_STAT(net_calls_to_read_stat); NET_CLEAR_DYN_STAT(net_calls_to_read_nodata_stat); NET_CLEAR_DYN_STAT(net_calls_to_writetonet_stat); - NET_CLEAR_DYN_STAT(net_calls_to_writetonet_afterpoll_stat); NET_CLEAR_DYN_STAT(net_calls_to_write_stat); NET_CLEAR_DYN_STAT(net_calls_to_write_nodata_stat); NET_CLEAR_DYN_STAT(socks_connections_currently_open_stat); diff --git a/iocore/net/P_Net.h b/iocore/net/P_Net.h index 6ac9bdd8541..9381b0a1a60 100644 --- a/iocore/net/P_Net.h +++ b/iocore/net/P_Net.h @@ -38,11 +38,9 @@ enum Net_Stats { net_connections_currently_open_stat, net_accepts_currently_open_stat, net_calls_to_readfromnet_stat, - net_calls_to_readfromnet_afterpoll_stat, net_calls_to_read_stat, net_calls_to_read_nodata_stat, net_calls_to_writetonet_stat, - net_calls_to_writetonet_afterpoll_stat, net_calls_to_write_stat, net_calls_to_write_nodata_stat, socks_connections_successful_stat, diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 3edecc955b9..c71baf3fb55 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -350,7 +350,6 @@ write_to_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread) ProxyMutex *mutex = thread->mutex.get(); NET_INCREMENT_DYN_STAT(net_calls_to_writetonet_stat); - NET_INCREMENT_DYN_STAT(net_calls_to_writetonet_afterpoll_stat); write_to_net_io(nh, vc, thread); } diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc index d4f25d4af3e..ee85e210a8b 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -1384,16 +1384,10 @@ struct ShowStats : public Continuation { NET_READ_DYN_SUM(net_calls_to_readfromnet_stat, sval); int64_t d_rb = sval - last_rb; last_rb += d_rb; - NET_READ_DYN_SUM(net_calls_to_readfromnet_afterpoll_stat, sval); - int64_t d_r = sval - last_r; - last_r += d_r; NET_READ_DYN_SUM(net_calls_to_writetonet_stat, sval); int64_t d_wb = sval - last_wb; last_wb += d_wb; - NET_READ_DYN_SUM(net_calls_to_writetonet_afterpoll_stat, sval); - int64_t d_w = sval - last_w; - last_w += d_w; NET_READ_DYN_STAT(net_read_bytes_stat, sval, cval); int64_t d_nrb = sval - last_nrb; @@ -1413,9 +1407,8 @@ struct ShowStats : public Continuation { NET_READ_DYN_STAT(net_handler_run_stat, sval, cval); int64_t d_p = cval - last_p; last_p += d_p; - printf("%" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 " %" PRId64 - "\n", - d_rb, d_r, d_wb, d_w, d_nrb, d_nr, d_nwb, d_nw, d_o, d_p); + printf("%" PRId64 ":%" PRId64 ":%" PRId64 ":%" PRId64 " %" PRId64 ":%" PRId64 " %" PRId64 " %" PRId64 "\n", d_rb, d_wb, d_nrb, + d_nr, d_nwb, d_nw, d_o, d_p); #ifdef ENABLE_TIME_TRACE int i; fprintf(fp, "immediate_events_time_dist\n");