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

Unified Diff: media/base/audio_bus_perftest.cc

Issue 70833002: Fix demuxer_perftest file paths and adjust various perftests' iterations/units. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « no previous file | media/base/audio_converter_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_bus_perftest.cc
diff --git a/media/base/audio_bus_perftest.cc b/media/base/audio_bus_perftest.cc
index e4152fdfc6a59c9941dc888e6991dd57642b7f0c..ae60531074ec4ab218f07f96e2b5fb7e76273149 100644
--- a/media/base/audio_bus_perftest.cc
+++ b/media/base/audio_bus_perftest.cc
@@ -10,7 +10,7 @@
namespace media {
-static const int kBenchmarkIterations = 100;
+static const int kBenchmarkIterations = 20;
template <typename T>
void RunInterleaveBench(AudioBus* bus, const std::string& trace_name) {
@@ -22,20 +22,21 @@ void RunInterleaveBench(AudioBus* bus, const std::string& trace_name) {
for (int i = 0; i < kBenchmarkIterations; ++i) {
bus->ToInterleaved(bus->frames(), byte_size, interleaved.get());
}
- double total_time_seconds =
- (base::TimeTicks::HighResNow() - start).InSecondsF();
+ double total_time_milliseconds =
+ (base::TimeTicks::HighResNow() - start).InMillisecondsF();
perf_test::PrintResult(
"audio_bus_to_interleaved", "", trace_name,
- kBenchmarkIterations / total_time_seconds, "runs/s", true);
+ total_time_milliseconds / kBenchmarkIterations, "ms", true);
start = base::TimeTicks::HighResNow();
for (int i = 0; i < kBenchmarkIterations; ++i) {
bus->FromInterleaved(interleaved.get(), bus->frames(), byte_size);
}
- total_time_seconds = (base::TimeTicks::HighResNow() - start).InSecondsF();
+ total_time_milliseconds =
+ (base::TimeTicks::HighResNow() - start).InMillisecondsF();
perf_test::PrintResult(
"audio_bus_from_interleaved", "", trace_name,
- kBenchmarkIterations / total_time_seconds, "runs/s", true);
+ total_time_milliseconds / kBenchmarkIterations, "ms", true);
}
// Benchmark the FromInterleaved() and ToInterleaved() methods.
« no previous file with comments | « no previous file | media/base/audio_converter_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698