trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [1/2] trafficserver git commit: TS-3503: Add ua_first_read to milestones to track when the first byte was read from the client
Date Tue, 07 Apr 2015 17:21:30 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master f5e6d357a -> 46b4daa55


TS-3503: Add ua_first_read to milestones to track when the first byte was read
from the client


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

Branch: refs/heads/master
Commit: 480d34e8e4225353fac05189517d0c18ec309718
Parents: f5e6d35
Author: Bryan Call <bcall@apache.org>
Authored: Tue Apr 7 10:19:37 2015 -0700
Committer: Bryan Call <bcall@apache.org>
Committed: Tue Apr 7 10:19:37 2015 -0700

----------------------------------------------------------------------
 proxy/StatSystem.h   | 3 ++-
 proxy/http/HttpSM.cc | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/480d34e8/proxy/StatSystem.h
----------------------------------------------------------------------
diff --git a/proxy/StatSystem.h b/proxy/StatSystem.h
index e3fa14e..cadc551 100644
--- a/proxy/StatSystem.h
+++ b/proxy/StatSystem.h
@@ -50,7 +50,7 @@ class TransactionMilestones
 {
 public:
   TransactionMilestones()
-    : ua_begin(0), ua_read_header_done(0), ua_begin_write(0), ua_close(0), server_first_connect(0),
server_connect(0),
+    : ua_begin(0), ua_first_read(), ua_read_header_done(0), ua_begin_write(0), ua_close(0),
server_first_connect(0), server_connect(0),
       server_connect_end(0), server_begin_write(0), server_first_read(0), server_read_header_done(0),
server_close(0),
       cache_open_read_begin(0), cache_open_read_end(0), cache_open_write_begin(0), cache_open_write_end(0),
dns_lookup_begin(0),
       dns_lookup_end(0), sm_start(0), sm_finish(0)
@@ -67,6 +67,7 @@ public:
   // first read time.                                   //
   ////////////////////////////////////////////////////////
   ink_hrtime ua_begin;
+  ink_hrtime ua_first_read;
   ink_hrtime ua_read_header_done;
   ink_hrtime ua_begin_write;
   ink_hrtime ua_close;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/480d34e8/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 57b4efa..71a97f1 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -651,6 +651,7 @@ HttpSM::state_read_client_request_header(int event, void *data)
   //   the accept timeout by the HttpClientSession
   //
   if (client_request_hdr_bytes == 0) {
+    milestones.ua_first_read = ink_get_hrtime();
     ua_session->get_netvc()->set_inactivity_timeout(HRTIME_SECONDS(t_state.txn_conf->transaction_no_activity_timeout_in));
   }
   /////////////////////
@@ -6714,6 +6715,7 @@ HttpSM::update_stats()
           "client state: %d "
           "server state: %d "
           "ua_begin: %.3f "
+          "ua_first_read: %.3f "
           "ua_read_header_done: %.3f "
           "cache_open_read_begin: %.3f "
           "cache_open_read_end: %.3f "
@@ -6728,6 +6730,7 @@ HttpSM::update_stats()
           sm_id, client_ip, ats_ip_port_host_order(&t_state.client_info.addr), url_string,
status, unique_id_string,
           client_response_body_bytes, fd, t_state.client_info.state, t_state.server_info.state,
           milestone_difference(milestones.sm_start, milestones.ua_begin),
+          milestone_difference(milestones.sm_start, milestones.ua_first_read),
           milestone_difference(milestones.sm_start, milestones.ua_read_header_done),
           milestone_difference(milestones.sm_start, milestones.cache_open_read_begin),
           milestone_difference(milestones.sm_start, milestones.cache_open_read_end),


Mime
View raw message