Index: talk/app/webrtc/fakemetricsobserver.h |
diff --git a/talk/app/webrtc/fakemetricsobserver.h b/talk/app/webrtc/fakemetricsobserver.h |
index e9e49749bf104246b32dab0d3ebc124cc355cd2b..c1e1e32c1d7b384282e97a38bc568b609679cb83 100644 |
--- a/talk/app/webrtc/fakemetricsobserver.h |
+++ b/talk/app/webrtc/fakemetricsobserver.h |
@@ -41,14 +41,16 @@ class FakeMetricsObserver : public MetricsObserverInterface { |
FakeMetricsObserver(); |
void Reset(); |
- void IncrementCounter(PeerConnectionMetricsCounter type) override; |
+ void IncrementEnumCounter(PeerConnectionEnumCounterType, |
+ int counter, |
+ int counter_max) override; |
void AddHistogramSample(PeerConnectionMetricsName type, |
int value) override; |
void AddHistogramSample(PeerConnectionMetricsName type, |
const std::string& value) override; |
// Accessors to be used by the tests. |
- int GetCounter(PeerConnectionMetricsCounter type) const; |
+ int GetCounter(PeerConnectionEnumCounterType type, int counter) const; |
pthatcher1
2015/08/18 18:06:22
If you renamed one to IncrementEnumCounter, should
guoweis_webrtc
2015/08/18 22:33:57
Done.
|
int GetIntHistogramSample(PeerConnectionMetricsName type) const; |
const std::string& GetStringHistogramSample( |
PeerConnectionMetricsName type) const; |
@@ -58,8 +60,8 @@ class FakeMetricsObserver : public MetricsObserverInterface { |
private: |
rtc::ThreadChecker thread_checker_; |
- int counters_[kPeerConnectionMetricsCounter_Max]; |
- int int_histogram_samples_[kPeerConnectionMetricsCounter_Max]; |
+ std::vector<std::vector<int>> counters_; |
pthatcher1
2015/08/18 18:06:22
Can you put a comment about what the indexes are (
guoweis_webrtc
2015/08/18 22:33:57
Done.
|
+ int int_histogram_samples_[kPeerConnectionMetricsName_Max]; |
pthatcher1
2015/08/18 18:06:22
It seems like you should have an array of vectors
guoweis_webrtc
2015/08/18 22:33:57
histogram_samples use string to track each sample
|
std::string string_histogram_samples_[kPeerConnectionMetricsName_Max]; |
}; |