trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject [02/17] git commit: Correct some stat variables
Date Wed, 18 Jun 2014 23:51:28 GMT
Correct some stat variables


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/53c7a8e8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/53c7a8e8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/53c7a8e8

Branch: refs/heads/4.2.x
Commit: 53c7a8e83ab877ef907e7093fb39eb1c413cbb46
Parents: 9fdb7f3
Author: Brian Geffon <briang@apache.org>
Authored: Mon Jun 9 12:11:01 2014 -0700
Committer: Brian Geffon <briang@apache.org>
Committed: Tue Jun 10 15:55:40 2014 -0700

----------------------------------------------------------------------
 iocore/net/P_Net.h               |  3 ---
 iocore/net/SSLNetVConnection.cc  |  2 +-
 iocore/net/UnixNetVConnection.cc | 12 ++++++------
 3 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53c7a8e8/iocore/net/P_Net.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_Net.h b/iocore/net/P_Net.h
index 13ab617..35b0920 100644
--- a/iocore/net/P_Net.h
+++ b/iocore/net/P_Net.h
@@ -61,9 +61,6 @@ extern RecRawStatBlock *net_rsb;
 #define SSL_HANDSHAKE_WANT_ACCEPT 8
 #define SSL_HANDSHAKE_WANT_CONNECT 9
 
-#define NET_DEBUG_COUNT_DYN_STAT(_x, _y) \
-RecIncrRawStatCount(net_rsb, mutex->thread_holding, (int)_x, _y)
-
 #define NET_INCREMENT_DYN_STAT(_x)  \
 RecIncrRawStatSum(net_rsb, mutex->thread_holding, (int)_x, 1)
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53c7a8e8/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index b04de64..5b274a0 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -386,7 +386,7 @@ SSLNetVConnection::load_buffer_and_write(int64_t towrite, int64_t &wattempted,
i
     }
 
     Debug("ssl", "SSLNetVConnection::loadBufferAndCallWrite,Number of bytes written=%" PRId64"
, total=%" PRId64"", r, total_wrote);
-    NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
+    NET_INCREMENT_DYN_STAT(net_calls_to_write_stat);
   } while (r == l && total_wrote < towrite && b);
 
   if (r > 0) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53c7a8e8/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index bf1dc0a..bb361e7 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -264,7 +264,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
       } else {
         r = socketManager.readv(vc->con.fd, &tiovec[0], niov);
       }
-      NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_stat, 1);
+      NET_INCREMENT_DYN_STAT(net_calls_to_read_stat);
       total_read += rattempted;
     } while (r == rattempted && total_read < toread);
 
@@ -279,7 +279,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
     if (r <= 0) {
 
       if (r == -EAGAIN || r == -ENOTCONN) {
-        NET_DEBUG_COUNT_DYN_STAT(net_calls_to_read_nodata_stat, 1);
+        NET_INCREMENT_DYN_STAT(net_calls_to_read_nodata_stat);
         vc->read.triggered = 0;
         nh->read_ready_list.remove(vc);
         return;
@@ -345,8 +345,8 @@ write_to_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
 {
   ProxyMutex *mutex = thread->mutex;
 
-  NET_DEBUG_COUNT_DYN_STAT(net_calls_to_writetonet_stat, 1);
-  NET_DEBUG_COUNT_DYN_STAT(net_calls_to_writetonet_afterpoll_stat, 1);
+  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);
 }
@@ -454,7 +454,7 @@ write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
   // check for errors
   if (r <= 0) {                 // if the socket was not ready,add to WaitList
     if (r == -EAGAIN || r == -ENOTCONN) {
-      NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_nodata_stat, 1);
+      NET_INCREMENT_DYN_STAT(net_calls_to_write_nodata_stat);
       if((needs & EVENTIO_WRITE) == EVENTIO_WRITE) {
         vc->write.triggered = 0;
         nh->write_ready_list.remove(vc);
@@ -882,7 +882,7 @@ UnixNetVConnection::load_buffer_and_write(int64_t towrite, int64_t &wattempted,
     else
       r = socketManager.writev(con.fd, &tiovec[0], niov);
     ProxyMutex *mutex = thread->mutex;
-    NET_DEBUG_COUNT_DYN_STAT(net_calls_to_write_stat, 1);
+    NET_INCREMENT_DYN_STAT(net_calls_to_write_stat);
   } while (r == wattempted && total_wrote < towrite);
 
   needs |= EVENTIO_WRITE;


Mime
View raw message