Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2485)

Unified Diff: net/quic/quic_headers_stream.h

Issue 1989003002: QUIC - add instrumentation to HPACK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_headers_stream.h
diff --git a/net/quic/quic_headers_stream.h b/net/quic/quic_headers_stream.h
index ffa5ecdd7c563d74f27cde650d9e8184f5dd9cb4..ac78b5daf2862b3662f1a0a9885ca6c5c6ed6050 100644
--- a/net/quic/quic_headers_stream.h
+++ b/net/quic/quic_headers_stream.h
@@ -26,6 +26,21 @@ class QuicSpdySession;
// to send and receive headers.
class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
public:
+ class NET_EXPORT_PRIVATE HpackDebugVisitor {
+ public:
+ HpackDebugVisitor();
+
+ virtual ~HpackDebugVisitor();
+
+ // For each HPACK indexed representation processed, |elapsed| is
+ // the time since the corresponding entry was added to the dynamic
+ // table.
+ virtual void OnUseEntry(QuicTime::Delta elapsed) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(HpackDebugVisitor);
+ };
+
explicit QuicHeadersStream(QuicSpdySession* session);
~QuicHeadersStream() override;
@@ -56,6 +71,10 @@ class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream {
// induced HOL blocking in QUIC.
void DisableHpackDynamicTable();
+ // Optional, enables instrumentation related to go/quic-hpack.
+ void SetHpackEncoderDebugVisitor(std::unique_ptr<HpackDebugVisitor> visitor);
+ void SetHpackDecoderDebugVisitor(std::unique_ptr<HpackDebugVisitor> visitor);
+
private:
class SpdyFramerVisitor;
« no previous file with comments | « no previous file | net/quic/quic_headers_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698