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

Unified Diff: webrtc/video/stats_counter.cc

Issue 2535323003: Change unit of logged bitrate stats in bytes/s to bits/s. (Closed)
Patch Set: Created 4 years, 1 month 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 | « webrtc/video/stats_counter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/stats_counter.cc
diff --git a/webrtc/video/stats_counter.cc b/webrtc/video/stats_counter.cc
index b1c24ee67328745b54e5915301f6fc70d4118a81..86dedd9e4f7709fb0208d14507ba5dfd3f265f35 100644
--- a/webrtc/video/stats_counter.cc
+++ b/webrtc/video/stats_counter.cc
@@ -26,11 +26,15 @@ const uint32_t kStreamId0 = 0;
} // namespace
std::string AggregatedStats::ToString() const {
+ return ToStringWithMultiplier(1);
+}
+
+std::string AggregatedStats::ToStringWithMultiplier(int multiplier) const {
std::stringstream ss;
ss << "periodic_samples:" << num_samples << ", {";
- ss << "min:" << min << ", ";
- ss << "avg:" << average << ", ";
- ss << "max:" << max << "}";
+ ss << "min:" << (min * multiplier) << ", ";
+ ss << "avg:" << (average * multiplier) << ", ";
+ ss << "max:" << (max * multiplier) << "}";
return ss.str();
}
« no previous file with comments | « webrtc/video/stats_counter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698