You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2022/06/10 00:57:56 UTC

[trafficserver] branch 10-Dev updated: Cleanup: Get rid of afterpoll net stats (#8891)

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch 10-Dev
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/10-Dev by this push:
     new 74a036437 Cleanup: Get rid of afterpoll net stats (#8891)
74a036437 is described below

commit 74a0364370bb5ca114857d5c80fa48e750a76311
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Jun 10 09:57:51 2022 +0900

    Cleanup: Get rid of afterpoll net stats (#8891)
---
 doc/admin-guide/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 5ea768745..56168ab95 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 f0cac5b47..7f1ec3ceb 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 6ac9bdd85..9381b0a1a 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 3edecc955..c71baf3fb 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 0ecda9eb5..6e5e87593 100644
--- a/src/traffic_server/traffic_server.cc
+++ b/src/traffic_server/traffic_server.cc
@@ -1464,16 +1464,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;
@@ -1493,9 +1487,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");