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

Unified Diff: bench/nanobench.cpp

Issue 552303004: Distinguish common and unique names for skiaperf.com. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: unique name Created 6 years, 3 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 | « bench/SKPBench.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 20afdeb32633b6fff7a32f00adc2c3cbe17c66c0..853492b3e05250b65aaca716dec5bf371c352ecd 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -163,7 +163,7 @@ static int cpu_bench(const double overhead, Benchmark* bench, SkCanvas* canvas,
while (bench_plus_overhead < overhead) {
if (round++ == FLAGS_maxCalibrationAttempts) {
SkDebugf("WARNING: Can't estimate loops for %s (%s vs. %s); skipping.\n",
- bench->getName(), HUMANIZE(bench_plus_overhead), HUMANIZE(overhead));
+ bench->getUniqueName(), HUMANIZE(bench_plus_overhead), HUMANIZE(overhead));
return kFailedLoops;
}
bench_plus_overhead = time(1, bench, canvas, NULL);
@@ -592,7 +592,7 @@ int nanobench_main() {
BenchmarkStream benchStream;
while (Benchmark* b = benchStream.next()) {
SkAutoTDelete<Benchmark> bench(b);
- if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) {
+ if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getUniqueName())) {
continue;
}
@@ -600,7 +600,7 @@ int nanobench_main() {
create_targets(&targets, bench.get(), configs);
if (!targets.isEmpty()) {
- log->bench(bench->getName(), bench->getSize().fX, bench->getSize().fY);
+ log->bench(bench->getUniqueName(), bench->getSize().fX, bench->getSize().fY);
bench->preDraw();
}
for (int j = 0; j < targets.count(); j++) {
@@ -617,7 +617,7 @@ int nanobench_main() {
if (canvas && !FLAGS_writePath.isEmpty() && FLAGS_writePath[0]) {
SkString pngFilename = SkOSPath::Join(FLAGS_writePath[0], config);
- pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getName());
+ pngFilename = SkOSPath::Join(pngFilename.c_str(), bench->getUniqueName());
pngFilename.append(".png");
write_canvas_png(canvas, pngFilename);
}
@@ -629,6 +629,7 @@ int nanobench_main() {
Stats stats(samples.get(), FLAGS_samples);
log->config(config);
+ log->configOption("name", bench->getName());
benchStream.fillCurrentOptions(log.get());
#if SK_SUPPORT_GPU
if (Benchmark::kGPU_Backend == targets[j]->config.backend) {
@@ -645,17 +646,17 @@ int nanobench_main() {
if (targets.count() == 1) {
config = ""; // Only print the config if we run the same bench on more than one.
}
- SkDebugf("%s\t%s\n", bench->getName(), config);
+ SkDebugf("%s\t%s\n", bench->getUniqueName(), config);
} else if (FLAGS_verbose) {
for (int i = 0; i < FLAGS_samples; i++) {
SkDebugf("%s ", HUMANIZE(samples[i]));
}
- SkDebugf("%s\n", bench->getName());
+ SkDebugf("%s\n", bench->getUniqueName());
} else if (FLAGS_quiet) {
if (targets.count() == 1) {
config = ""; // Only print the config if we run the same bench on more than one.
}
- SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getName(), config);
+ SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getUniqueName(), config);
} else {
const double stddev_percent = 100 * sqrt(stats.var) / stats.mean;
SkDebugf("%4dM\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n"
@@ -668,7 +669,7 @@ int nanobench_main() {
, stddev_percent
, stats.plot.c_str()
, config
- , bench->getName()
+ , bench->getUniqueName()
);
}
}
« no previous file with comments | « bench/SKPBench.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698