You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2014/05/29 05:02:24 UTC

git commit: TS-2857: Cleanup SPDY and SSL stat names

Repository: trafficserver
Updated Branches:
  refs/heads/master d6cdbfd52 -> d65bc70a5


TS-2857: Cleanup SPDY and SSL stat names


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

Branch: refs/heads/master
Commit: d65bc70a5de9f73b61357212e26f88d3d3fb2f25
Parents: d6cdbfd
Author: Bryan Call <bc...@apache.org>
Authored: Wed May 28 20:02:14 2014 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Wed May 28 20:02:14 2014 -0700

----------------------------------------------------------------------
 CHANGES                         |  2 ++
 proxy/http/HttpClientSession.cc |  2 +-
 proxy/http/HttpConfig.cc        |  4 ++--
 proxy/http/HttpConfig.h         |  2 +-
 proxy/spdy/SpdyClientSession.cc | 12 ++++++------
 proxy/spdy/SpdyCommon.cc        | 16 ++++++++--------
 proxy/spdy/SpdyCommon.h         |  8 ++++----
 7 files changed, 24 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 237a519..172adbd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2857] Cleanup SPDY and SSL stat names
+
   *) [TS-2856] Remove proxy.config.spdy.verbose_in and use diags instead
 
   *) [TS-2391] Traffic Server tries to reverse resolve 127.0.0.1

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/http/HttpClientSession.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpClientSession.cc b/proxy/http/HttpClientSession.cc
index 3f00cd4..1239113 100644
--- a/proxy/http/HttpClientSession.cc
+++ b/proxy/http/HttpClientSession.cc
@@ -192,7 +192,7 @@ HttpClientSession::new_connection(NetVConnection * new_vc, bool backdoor, MIOBuf
   conn_decrease = true;
   HTTP_INCREMENT_DYN_STAT(http_total_client_connections_stat);
   if (static_cast<HttpProxyPort::TransportType>(new_vc->attributes) == HttpProxyPort::TRANSPORT_SSL) {
-    HTTP_INCREMENT_DYN_STAT(https_connection_count_stat);
+    HTTP_INCREMENT_DYN_STAT(https_total_client_connections_stat);
   }
 
   /* inbound requests stat should be incremented here, not after the

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/http/HttpConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 62d6304..d5184ae 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1202,8 +1202,8 @@ register_stat_callbacks()
                      "proxy.process.https.incoming_requests",
                      RECD_COUNTER, RECP_PERSISTENT, (int) https_incoming_requests_stat, RecRawStatSyncCount);
   RecRegisterRawStat(http_rsb, RECT_PROCESS,
-                     "proxy.process.https.connection_count",
-                     RECD_COUNTER, RECP_PERSISTENT, (int) https_connection_count_stat, RecRawStatSyncCount);
+                     "proxy.process.https.total_client_connections",
+                     RECD_COUNTER, RECP_PERSISTENT, (int) https_total_client_connections_stat, RecRawStatSyncCount);
 }
 
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 4805097..e30257b 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -338,7 +338,7 @@ enum
   http_response_status_5xx_count_stat,
 
   https_incoming_requests_stat,
-  https_connection_count_stat,
+  https_total_client_connections_stat,
 
   http_stat_count
 };

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/spdy/SpdyClientSession.cc
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyClientSession.cc b/proxy/spdy/SpdyClientSession.cc
index 665510a..cec15e6 100644
--- a/proxy/spdy/SpdyClientSession.cc
+++ b/proxy/spdy/SpdyClientSession.cc
@@ -60,14 +60,14 @@ SpdyRequest::init(SpdyClientSession *sm, int id)
   MD5_Init(&recv_md5);
   start_time = TShrtime();
 
-  SpdyStatIncrCount(Config::STAT_ACTIVE_STREAM_COUNT, sm);
-  SpdyStatIncrCount(Config::STAT_TOTAL_STREAM_COUNT, sm);
+  SpdyStatIncrCount(Config::STAT_CURRENT_CLIENT_STREAM_COUNT, sm);
+  SpdyStatIncrCount(Config::STAT_TOTAL_CLIENT_STREAM_COUNT, sm);
 }
 
 void
 SpdyRequest::clear()
 {
-  SpdyStatDecrCount(Config::STAT_ACTIVE_STREAM_COUNT, spdy_sm);
+  SpdyStatDecrCount(Config::STAT_CURRENT_CLIENT_STREAM_COUNT, spdy_sm);
 
   if (fetch_sm)
     TSFetchDestroy(fetch_sm);
@@ -100,8 +100,8 @@ SpdyClientSession::init(NetVConnection * netvc, spdy::SessionVersion vers)
   // session start event in case of a time out generating a decrement
   // with no increment. It seems a lesser thing to have the thread counts
   // a little off but globally consistent.
-  SpdyStatIncrCount(Config::STAT_ACTIVE_SESSION_COUNT, netvc);
-  SpdyStatIncrCount(Config::STAT_TOTAL_CONNECTION_COUNT, netvc);
+  SpdyStatIncrCount(Config::STAT_CURRENT_CLIENT_SESSION_COUNT, netvc);
+  SpdyStatIncrCount(Config::STAT_TOTAL_CLIENT_CONNECTION_COUNT, netvc);
 
   ink_release_assert(r == 0);
   sm_id = atomic_inc(g_sm_id);
@@ -118,7 +118,7 @@ SpdyClientSession::clear()
 {
   int last_event = event;
 
-  SpdyStatDecrCount(Config::STAT_ACTIVE_SESSION_COUNT, this);
+  SpdyStatDecrCount(Config::STAT_CURRENT_CLIENT_SESSION_COUNT, this);
 
   //
   // SpdyRequest depends on SpdyClientSession,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/spdy/SpdyCommon.cc
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyCommon.cc b/proxy/spdy/SpdyCommon.cc
index 7e45b9c..3eb01c4 100644
--- a/proxy/spdy/SpdyCommon.cc
+++ b/proxy/spdy/SpdyCommon.cc
@@ -27,11 +27,11 @@
 Config SPDY_CFG;
 
 // statistic names
-static char const * const SPDY_STAT_ACTIVE_SESSION_NAME = "proxy.process.spdy.active_sessions";
-static char const * const SPDY_STAT_ACTIVE_STREAM_NAME = "proxy.process.spdy.active_streams";
-static char const * const SPDY_STAT_TOTAL_STREAM_NAME = "proxy.process.spdy.total_streams";
+static char const * const SPDY_STAT_CURRENT_CLIENT_SESSION_NAME = "proxy.process.spdy.current_client_sessions";
+static char const * const SPDY_STAT_CURRENT_CLIENT_STREAM_NAME = "proxy.process.spdy.current_client_streams";
+static char const * const SPDY_STAT_TOTAL_CLIENT_STREAM_NAME = "proxy.process.spdy.total_client_streams";
 static char const * const SPDY_STAT_TOTAL_TIME_NAME = "proxy.process.spdy.total_time";
-static char const * const SPDY_STAT_TOTAL_CONNECTION_NAME = "proxy.process.spdy.connection_count";
+static char const * const SPDY_STAT_TOTAL_CLIENT_CONNECTION_NAME = "proxy.process.spdy.total_client_connections";
 
 string
 http_date(time_t t)
@@ -54,11 +54,11 @@ spdy_config_load()
 
   // Get our statistics up
   SPDY_CFG.rsb = RecAllocateRawStatBlock(static_cast<int>(Config::N_STATS));
-  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_ACTIVE_SESSION_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_ACTIVE_SESSION_COUNT), RecRawStatSyncCount);
-  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_ACTIVE_STREAM_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_ACTIVE_STREAM_COUNT), RecRawStatSyncCount);
-  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_TOTAL_STREAM_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_TOTAL_STREAM_COUNT), RecRawStatSyncCount);
+  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_CURRENT_CLIENT_SESSION_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_CURRENT_CLIENT_SESSION_COUNT), RecRawStatSyncCount);
+  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_CURRENT_CLIENT_STREAM_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_CURRENT_CLIENT_STREAM_COUNT), RecRawStatSyncCount);
+  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_TOTAL_CLIENT_STREAM_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_TOTAL_CLIENT_STREAM_COUNT), RecRawStatSyncCount);
   RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_TOTAL_TIME_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_TOTAL_STREAM_TIME), RecRawStatSyncSum);
-  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_TOTAL_CONNECTION_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_TOTAL_CONNECTION_COUNT), RecRawStatSyncCount);
+  RecRegisterRawStat(SPDY_CFG.rsb, RECT_PROCESS, SPDY_STAT_TOTAL_CLIENT_CONNECTION_NAME, RECD_INT, RECP_NON_PERSISTENT, static_cast<int>(Config::STAT_TOTAL_CLIENT_CONNECTION_COUNT), RecRawStatSyncCount);
 
   return 0;
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d65bc70a/proxy/spdy/SpdyCommon.h
----------------------------------------------------------------------
diff --git a/proxy/spdy/SpdyCommon.h b/proxy/spdy/SpdyCommon.h
index b1b37c9..f772d06 100644
--- a/proxy/spdy/SpdyCommon.h
+++ b/proxy/spdy/SpdyCommon.h
@@ -69,11 +69,11 @@ struct Config {
   // Statistics
   /// This is the stat slot index for each statistic.
   enum StatIndex {
-    STAT_ACTIVE_SESSION_COUNT, ///< Current # of active SPDY sessions.
-    STAT_ACTIVE_STREAM_COUNT, ///< Current # of active SPDY streams.
-    STAT_TOTAL_STREAM_COUNT, ///< Total number of streams created.
+    STAT_CURRENT_CLIENT_SESSION_COUNT, ///< Current # of active SPDY sessions.
+    STAT_CURRENT_CLIENT_STREAM_COUNT, ///< Current # of active SPDY streams.
+    STAT_TOTAL_CLIENT_STREAM_COUNT, ///< Total number of streams created.
     STAT_TOTAL_STREAM_TIME,  //< Total stream time
-    STAT_TOTAL_CONNECTION_COUNT, //< Total connections running spdy
+    STAT_TOTAL_CLIENT_CONNECTION_COUNT, //< Total connections running spdy
 
     N_STATS ///< Terminal counter, NOT A STAT INDEX.
   };