You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/10/16 12:17:42 UTC
[mesos] 01/03: Added 'received' timestamp into `process::Request`.
This is an automated email from the ASF dual-hosted git repository.
alexr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 6ab80da5b2770a96802f7893ac092d6c8a92a824
Author: Alexander Rukletsov <al...@apache.org>
AuthorDate: Mon Aug 13 20:05:26 2018 +0200
Added 'received' timestamp into `process::Request`.
This allows us to note when a request comes in and
hence calculate request processing time.
Review: https://reviews.apache.org/r/68992
---
3rdparty/libprocess/include/process/http.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/3rdparty/libprocess/include/process/http.hpp b/3rdparty/libprocess/include/process/http.hpp
index bbcd0ba..029605e 100644
--- a/3rdparty/libprocess/include/process/http.hpp
+++ b/3rdparty/libprocess/include/process/http.hpp
@@ -27,6 +27,7 @@
#include <boost/functional/hash.hpp>
#include <process/address.hpp>
+#include <process/clock.hpp>
#include <process/future.hpp>
#include <process/owned.hpp>
#include <process/pid.hpp>
@@ -519,7 +520,7 @@ public:
struct Request
{
Request()
- : keepAlive(false), type(BODY) {}
+ : keepAlive(false), type(BODY), received(Clock::now()) {}
std::string method;
@@ -564,6 +565,8 @@ struct Request
std::string body;
Option<Pipe::Reader> reader;
+ Time received;
+
/**
* Returns whether the encoding is considered acceptable in the
* response. See RFC 2616 section 14.3 for details.