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/02/12 18:48:06 UTC

[trafficserver] branch 8.0.x updated: Fix client connections of traffic_top

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

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


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 68a95eb  Fix client connections of traffic_top
68a95eb is described below

commit 68a95eb02aaa10674cb537afd8ec522386aedd8c
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Feb 12 14:49:43 2019 +0900

    Fix client connections of traffic_top
    
    Prior this change, traffic_top used HTTP/1.x specific metrics for
    Req/Conn, New Conn, Curr Conn, and Active Con in CLIENT table.
    
    (cherry picked from commit e9888197392a261ac6305255fb3a67b7c515b5b3)
---
 src/traffic_top/stats.h | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/src/traffic_top/stats.h b/src/traffic_top/stats.h
index 7dc3d97..ffec58c 100644
--- a/src/traffic_top/stats.h
+++ b/src/traffic_top/stats.h
@@ -111,12 +111,33 @@ public:
     lookup_table.insert(make_pair("dns_entry", LookupItem("DNS Entry", "proxy.process.hostdb.cache.current_items", 1)));
     lookup_table.insert(make_pair("dns_hits", LookupItem("DNS Hits", "proxy.process.hostdb.total_hits", 2)));
     lookup_table.insert(make_pair("dns_lookups", LookupItem("DNS Lookups", "proxy.process.hostdb.total_lookups", 2)));
+
+    // Incoming HTTP/1.1 and HTTP/2 connections - some metrics are HTTP version specific
     lookup_table.insert(make_pair("client_req", LookupItem("Requests", "proxy.process.http.incoming_requests", 2)));
-    lookup_table.insert(make_pair("client_conn", LookupItem("New Conn", "proxy.process.http.total_client_connections", 2)));
+
+    // total_client_connections
+    lookup_table.insert(
+      make_pair("client_conn_h1", LookupItem("New Conn HTTP/1.x", "proxy.process.http.total_client_connections", 2)));
+    lookup_table.insert(
+      make_pair("client_conn_h2", LookupItem("New Conn HTTP/2", "proxy.process.http2.total_client_connections", 2)));
+    lookup_table.insert(make_pair("client_conn", LookupItem("New Conn", "client_conn_h1", "client_conn_h2", 6)));
+
+    // requests / connections
     lookup_table.insert(make_pair("client_req_conn", LookupItem("Req/Conn", "client_req", "client_conn", 3)));
-    lookup_table.insert(make_pair("client_curr_conn", LookupItem("Curr Conn", "proxy.process.http.current_client_connections", 1)));
+
+    // current_client_connections
+    lookup_table.insert(
+      make_pair("client_curr_conn_h1", LookupItem("Curr Conn HTTP/1.x", "proxy.process.http.current_client_connections", 1)));
     lookup_table.insert(
-      make_pair("client_actv_conn", LookupItem("Active Con", "proxy.process.http.current_active_client_connections", 1)));
+      make_pair("client_curr_conn_h2", LookupItem("Curr Conn HTTP/2", "proxy.process.http2.current_client_connections", 1)));
+    lookup_table.insert(make_pair("client_curr_conn", LookupItem("Curr Conn", "client_curr_conn_h1", "client_curr_conn_h2", 6)));
+
+    // current_active_client_connections
+    lookup_table.insert(make_pair("client_actv_conn_h1",
+                                  LookupItem("Active Con HTTP/1.x", "proxy.process.http.current_active_client_connections", 1)));
+    lookup_table.insert(make_pair("client_actv_conn_h2",
+                                  LookupItem("Active Con HTTP/2", "proxy.process.http2.current_active_client_connections", 1)));
+    lookup_table.insert(make_pair("client_actv_conn", LookupItem("Active Con", "client_actv_conn_h1", "client_actv_conn_h2", 6)));
 
     lookup_table.insert(make_pair("server_req", LookupItem("Requests", "proxy.process.http.outgoing_requests", 2)));
     lookup_table.insert(make_pair("server_conn", LookupItem("New Conn", "proxy.process.http.total_server_connections", 2)));