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

Unified Diff: webrtc/test/testsupport/perf_test.h

Issue 2030073002: Collapse most spammy output of webrtc_perf_tests with PrintResultList (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: addressed comments Created 4 years, 6 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 | « webrtc/call/call_perf_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/perf_test.h
diff --git a/webrtc/test/testsupport/perf_test.h b/webrtc/test/testsupport/perf_test.h
index 76e09e1cbba021ef299f876628d1d521992bcdab..6e49ac90e0e8653cc9550e88ef4fa1b1a8ce8f81 100644
--- a/webrtc/test/testsupport/perf_test.h
+++ b/webrtc/test/testsupport/perf_test.h
@@ -15,6 +15,7 @@
#ifndef WEBRTC_TEST_TESTSUPPORT_PERF_TEST_H_
#define WEBRTC_TEST_TESTSUPPORT_PERF_TEST_H_
+#include <sstream>
#include <string>
namespace webrtc {
@@ -116,6 +117,23 @@ std::string SystemCommitChargeToString(const std::string& test_name,
size_t charge,
bool important);
+// Converts list of values into comma-separated string for PrintResultList.
+template <typename Container>
+std::string ValuesToString(const Container& container) {
+ if (container.empty())
+ return "";
+
+ std::stringstream ss;
+ auto it = container.begin();
+ while (true) {
+ ss << *it;
+ if (++it == container.end())
+ break;
+ ss << ',';
+ }
+ return ss.str();
+}
+
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/call/call_perf_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698