Repository: trafficserver
Updated Branches:
  refs/heads/master 1e1ca9d78 -> 78043848e


TS-3080: Adding stat for new tls sessions


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

Branch: refs/heads/master
Commit: 78043848edad77db79333c4765937c0924ad58c9
Parents: 1e1ca9d
Author: Brian Geffon <[email protected]>
Authored: Mon Oct 13 20:58:19 2014 -0700
Committer: Brian Geffon <[email protected]>
Committed: Mon Oct 13 20:58:19 2014 -0700

----------------------------------------------------------------------
 iocore/net/P_SSLUtils.h | 1 +
 iocore/net/SSLUtils.cc  | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/78043848/iocore/net/P_SSLUtils.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLUtils.h b/iocore/net/P_SSLUtils.h
index 1c9f0b8..ec7b0b9 100644
--- a/iocore/net/P_SSLUtils.h
+++ b/iocore/net/P_SSLUtils.h
@@ -74,6 +74,7 @@ enum SSL_Stats
   ssl_session_cache_miss,
   ssl_session_cache_eviction,
   ssl_session_cache_lock_contention,
+  ssl_session_cache_new_session,
 
   /* error stats */
   ssl_error_want_write,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/78043848/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 85b385a..d33600e 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -209,6 +209,7 @@ static int ssl_new_cached_session(SSL *ssl, SSL_SESSION 
*sess) {
     Debug("ssl.session_cache.insert", "ssl_new_cached_session session '%s' and 
context %p", printable_buf, SSL_get_SSL_CTX(ssl));
   }
 
+  SSL_INCREMENT_DYN_STAT(ssl_session_cache_new_session);
   session_cache->insertSession(sid, sess);
 
   return 0;
@@ -751,6 +752,10 @@ SSLInitializeStatistics()
                      RECD_INT, RECP_PERSISTENT, (int) ssl_session_cache_hit,
                      RecRawStatSyncCount);
 
+  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.ssl_session_cache_new_session",
+                       RECD_INT, RECP_PERSISTENT, (int) 
ssl_session_cache_new_session,
+                       RecRawStatSyncCount);
+
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, 
"proxy.process.ssl.ssl_session_cache_miss",
                      RECD_INT, RECP_PERSISTENT, (int) ssl_session_cache_miss,
                      RecRawStatSyncCount);

Reply via email to