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

Unified Diff: cc/base/rolling_time_delta_history.h

Issue 2127003002: Switch cc::RollingTimeDeltaHistory to use a vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace modulo with a branch Created 4 years, 5 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 | cc/base/rolling_time_delta_history.cc » ('j') | cc/base/rolling_time_delta_history.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/rolling_time_delta_history.h
diff --git a/cc/base/rolling_time_delta_history.h b/cc/base/rolling_time_delta_history.h
index 61ed339f74038ca8336769a9758a59641b79cba2..192c8e077d4de18c58e24cd55ac1989a9bd494e6 100644
--- a/cc/base/rolling_time_delta_history.h
+++ b/cc/base/rolling_time_delta_history.h
@@ -7,8 +7,7 @@
#include <stddef.h>
-#include <deque>
-#include <set>
+#include <vector>
#include "base/macros.h"
#include "base/time/time.h"
@@ -33,10 +32,8 @@ class CC_EXPORT RollingTimeDeltaHistory {
base::TimeDelta Percentile(double percent) const;
private:
- typedef std::multiset<base::TimeDelta> TimeDeltaMultiset;
-
- TimeDeltaMultiset sample_set_;
- std::deque<TimeDeltaMultiset::iterator> chronological_sample_deque_;
+ std::vector<base::TimeDelta> sample_vector_;
+ size_t next_index_;
size_t max_size_;
DISALLOW_COPY_AND_ASSIGN(RollingTimeDeltaHistory);
« no previous file with comments | « no previous file | cc/base/rolling_time_delta_history.cc » ('j') | cc/base/rolling_time_delta_history.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698