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

Unified Diff: net/tools/quic/quic_time_wait_list_manager.h

Issue 1310753008: relnote: Add num_connections_ in quic_time_wait_list_manager to record (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Allow_individual_QUIC_writers_101617105
Patch Set: Created 5 years, 3 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/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_time_wait_list_manager.h
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index 9a9eccd5e78fb9fd530d84805574dabcb09b6657..c2368dc1553466dfec9528365e88cbc228219c56 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -101,7 +101,7 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id);
// The number of connections on the time-wait list.
- size_t num_connections() const { return connection_id_map_.size(); }
+ size_t num_connections() const { return num_connections_; }
protected:
virtual QuicEncryptedPacket* BuildPublicReset(
@@ -190,6 +190,12 @@ class QuicTimeWaitListManager : public QuicBlockedWriterInterface {
// Interface that manages blocked writers.
QuicServerSessionVisitor* visitor_;
+ // Number of connection IDs in |connection_id_map_|. According to b/23531792,
+ // cost of size() of linked_hash_map is linear instead of constant, and a
+ // separate counter is maintained so that cost of num_connections() is
+ // constant. TODO(b/23531792): Remove this counter.
+ size_t num_connections_;
+
DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager);
};
« no previous file with comments | « no previous file | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698