You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/11/07 00:47:30 UTC

[trafficserver] branch 9.0.x updated (617c6f5 -> 71a5455)

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

zwoop pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 617c6f5  Adding an autest for traffic_dump.
     new 83ae3c8  Add Metrics to track SSL Handshake attempts
     new 71a5455  Disable the most expensive "make check" tests by default

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                    | 14 ++++++++++++++
 iocore/cache/Makefile.am        |  2 ++
 iocore/net/SSLNetVConnection.cc |  2 ++
 iocore/net/SSLStats.cc          |  4 ++++
 iocore/net/SSLStats.h           |  2 ++
 src/tscore/Makefile.am          |  6 +++++-
 6 files changed, 29 insertions(+), 1 deletion(-)


[trafficserver] 02/02: Disable the most expensive "make check" tests by default

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 71a545598fac113256fac2805c12bddc9ed43c0a
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Wed Nov 6 16:04:30 2019 -0700

    Disable the most expensive "make check" tests by default
    
    This is at least a 2x improvement in runtime, which will help on the
    CI. Also, worth noting is that the cache tests are insanely disk write
    and storage heavy, it essentially builds ~23 traffic_server binaries.
    
    (cherry picked from commit ea1202a7d655130ef240a901e10e7b38f69191a4)
---
 configure.ac             | 14 ++++++++++++++
 iocore/cache/Makefile.am |  2 ++
 src/tscore/Makefile.am   |  6 +++++-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 68c3487..ac20103 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,6 +284,20 @@ TS_ARG_ENABLE_VAR([has], [tests])
 AM_CONDITIONAL([BUILD_TESTS], [test 0 -ne $has_tests])
 
 #
+# Build expensive unit tests ?
+#
+
+AC_MSG_CHECKING([whether to enable expensive unit tests])
+AC_ARG_ENABLE([expensive-tests],
+  [AS_HELP_STRING([--enable-expensive-tests],[turn on expensive unit tests])],
+  [],
+  [enable_expensive_tests=no]
+)
+AC_MSG_RESULT([$enable_expensive_tests])
+TS_ARG_ENABLE_VAR([has], [expensive_tests])
+AM_CONDITIONAL([EXPENSIVE_TESTS], [test 0 -ne $has_expensive_tests])
+
+#
 # Build documentation?
 #
 
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index 3c52888..307f05b 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -116,6 +116,7 @@ test_LDADD = \
 	@YAMLCPP_LIBS@ \
 	-lm
 
+if EXPENSIVE_TESTS
 check_PROGRAMS = \
   test_Cache \
   test_RWW \
@@ -128,6 +129,7 @@ check_PROGRAMS = \
   test_Update_L_to_S \
   test_Update_S_to_L \
   test_Update_header
+endif
 
 test_main_SOURCES = \
   ./test/main.cc \
diff --git a/src/tscore/Makefile.am b/src/tscore/Makefile.am
index 11b7285..faa2fc0 100644
--- a/src/tscore/Makefile.am
+++ b/src/tscore/Makefile.am
@@ -19,7 +19,11 @@
 include $(top_srcdir)/build/tidy.mk
 
 noinst_PROGRAMS = mkdfa CompileParseRules
-check_PROGRAMS = test_atomic test_freelist test_geometry test_X509HostnameValidator test_tscore
+check_PROGRAMS = test_geometry test_X509HostnameValidator test_tscore
+
+if EXPENSIVE_TESTS
+check_PROGRAMS += test_atomic test_freelist
+endif
 
 TESTS_ENVIRONMENT = LSAN_OPTIONS=suppressions=$(abs_top_srcdir)/ci/asan_leak_suppression/unit_tests.txt
 


[trafficserver] 01/02: Add Metrics to track SSL Handshake attempts

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 83ae3c88863187b9ee367dd5ba489182fc31454c
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Fri Nov 1 10:35:58 2019 -0700

    Add Metrics to track SSL Handshake attempts
    
    Remove debug logs
    
    (cherry picked from commit d22de244f665237ec68346691ef8bb455bcde356)
---
 iocore/net/SSLNetVConnection.cc | 2 ++
 iocore/net/SSLStats.cc          | 4 ++++
 iocore/net/SSLStats.h           | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index a29f1b2..d5771f5 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -1107,6 +1107,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
 
   // Go do the preaccept hooks
   if (sslHandshakeHookState == HANDSHAKE_HOOKS_PRE) {
+    SSL_INCREMENT_DYN_STAT(ssl_total_attempts_handshake_count_in_stat);
     if (!curHook) {
       Debug("ssl", "Initialize preaccept curHook from NULL");
       curHook = ssl_hooks->get(TSSslHookInternalID(TS_VCONN_START_HOOK));
@@ -1352,6 +1353,7 @@ SSLNetVConnection::sslClientHandShakeEvent(int &err)
 
   // Go do the preaccept hooks
   if (sslHandshakeHookState == HANDSHAKE_HOOKS_OUTBOUND_PRE) {
+    SSL_INCREMENT_DYN_STAT(ssl_total_attempts_handshake_count_out_stat);
     if (!curHook) {
       Debug("ssl", "Initialize outbound connect curHook from NULL");
       curHook = ssl_hooks->get(TSSslHookInternalID(TS_VCONN_OUTBOUND_START_HOOK));
diff --git a/iocore/net/SSLStats.cc b/iocore/net/SSLStats.cc
index 9ab09ed..a29adc3 100644
--- a/iocore/net/SSLStats.cc
+++ b/iocore/net/SSLStats.cc
@@ -132,8 +132,12 @@ SSLInitializeStatistics()
   // SSL handshake time
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.total_handshake_time", RECD_COUNTER, RECP_PERSISTENT,
                      (int)ssl_total_handshake_time_stat, RecRawStatSyncSum);
+  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.total_attempts_handshake_count_in", RECD_COUNTER, RECP_PERSISTENT,
+                     (int)ssl_total_attempts_handshake_count_in_stat, RecRawStatSyncCount);
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.total_success_handshake_count_in", RECD_COUNTER, RECP_PERSISTENT,
                      (int)ssl_total_success_handshake_count_in_stat, RecRawStatSyncCount);
+  RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.total_attempts_handshake_count_out", RECD_COUNTER, RECP_PERSISTENT,
+                     (int)ssl_total_attempts_handshake_count_out_stat, RecRawStatSyncCount);
   RecRegisterRawStat(ssl_rsb, RECT_PROCESS, "proxy.process.ssl.total_success_handshake_count_out", RECD_COUNTER, RECP_PERSISTENT,
                      (int)ssl_total_success_handshake_count_out_stat, RecRawStatSyncCount);
 
diff --git a/iocore/net/SSLStats.h b/iocore/net/SSLStats.h
index 2ad0ce0..ccd6e93 100644
--- a/iocore/net/SSLStats.h
+++ b/iocore/net/SSLStats.h
@@ -68,6 +68,7 @@ enum SSL_Stats {
   ssl_user_agent_session_miss_stat,
   ssl_user_agent_session_timeout_stat,
   ssl_total_handshake_time_stat,
+  ssl_total_attempts_handshake_count_in_stat,
   ssl_total_success_handshake_count_in_stat,
   ssl_total_tickets_created_stat,
   ssl_total_tickets_verified_stat,
@@ -89,6 +90,7 @@ enum SSL_Stats {
   ssl_error_read_eos,
   ssl_error_ssl,
   ssl_sni_name_set_failure,
+  ssl_total_attempts_handshake_count_out_stat,
   ssl_total_success_handshake_count_out_stat,
 
   /* ocsp stapling stats */