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

Unified Diff: webrtc/video/video_quality_test.cc

Issue 2719013004: Adding memory usage metric (only for WIN until we find more stable method to measure memory usage) (Closed)
Patch Set: fixing typo Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_quality_test.cc
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc
index 8389cfcc5f6d75f06ecd91a271f46cfecef8fcb5..ccf6a50cf5787d7d0f886da3de11bf71ba412ecf 100644
--- a/webrtc/video/video_quality_test.cc
+++ b/webrtc/video/video_quality_test.cc
@@ -21,6 +21,7 @@
#include "webrtc/base/cpu_time.h"
#include "webrtc/base/event.h"
#include "webrtc/base/format_macros.h"
+#include "webrtc/base/memory_usage.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/platform_file.h"
#include "webrtc/base/timeutils.h"
@@ -654,6 +655,8 @@ class VideoAnalyzer : public PacketReceiver,
if (receive_stats.max_decode_ms > 0)
decode_time_max_ms_.AddSample(receive_stats.max_decode_ms);
}
+
+ memory_usage_.AddSample(rtc::GetProcessResidentSizeBytes());
}
}
@@ -766,6 +769,14 @@ class VideoAnalyzer : public PacketReceiver,
test_label_.c_str(), dropped_frames_before_rendering_);
printf("RESULT cpu_usage: %s = %lf %%\n", test_label_.c_str(),
GetCpuUsagePercent());
+
+#if defined(WEBRTC_WIN)
+ // On Linux and Mac in Resident Set some unused pages may be counted.
+ // Therefore this metric will depend on order in which tests are run and
+ // will be flaky.
+ PrintResult("memory_usage", memory_usage_, " bytes");
+#endif
+
// Disable quality check for quick test, as quality checks may fail
// because too few samples were collected.
if (!is_quick_test_enabled_) {
@@ -967,6 +978,8 @@ class VideoAnalyzer : public PacketReceiver,
test::Statistics decode_time_ms_ GUARDED_BY(comparison_lock_);
test::Statistics decode_time_max_ms_ GUARDED_BY(comparison_lock_);
test::Statistics media_bitrate_bps_ GUARDED_BY(comparison_lock_);
+ test::Statistics memory_usage_ GUARDED_BY(comparison_lock_);
+
const int frames_to_process_;
int frames_recorded_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698