aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/nanobench.cpp14
-rwxr-xr-xbin/compare8
2 files changed, 12 insertions, 10 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 19fdac0d47..7cc5383091 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -1005,8 +1005,6 @@ int nanobench_main() {
if (kAutoTuneLoops != FLAGS_loops) {
SkDebugf("Fixed number of loops; times would only be misleading so we won't print them.\n");
- } else if (FLAGS_verbose) {
- // No header.
} else if (FLAGS_quiet) {
SkDebugf("median\tbench\tconfig\n");
} else if (kTimedSampling == FLAGS_samples) {
@@ -1103,11 +1101,6 @@ int nanobench_main() {
, sk_tools::getMaxResidentSetSizeMB()
, bench->getUniqueName()
, config);
- } else if (FLAGS_verbose) {
- for (int i = 0; i < samples.count(); i++) {
- SkDebugf("%s ", HUMANIZE(samples[i]));
- }
- SkDebugf("%s\n", bench->getUniqueName());
} else if (FLAGS_quiet) {
if (configs.count() == 1) {
config = ""; // Only print the config if we run the same bench on more than one.
@@ -1137,6 +1130,13 @@ int nanobench_main() {
gGrFactory->get(configs[i].ctxType)->printGpuStats();
}
#endif
+ if (FLAGS_verbose) {
+ SkDebugf("Samples: ");
+ for (int i = 0; i < samples.count(); i++) {
+ SkDebugf("%s ", HUMANIZE(samples[i]));
+ }
+ SkDebugf("%s\n", bench->getUniqueName());
+ }
cleanup_run(target);
}
}
diff --git a/bin/compare b/bin/compare
index e911f4a6c3..f723c083c1 100755
--- a/bin/compare
+++ b/bin/compare
@@ -9,9 +9,11 @@ a,b = {},{}
for (path, d) in [(sys.argv[1], a), (sys.argv[2], b)]:
for line in open(path):
try:
- tokens = line.split()
- samples = tokens[:-1]
- label = tokens[-1]
+ tokens = line.split()
+ if tokens[0] != "Samples:":
+ continue
+ samples = tokens[1:-1]
+ label = tokens[-1]
d[label] = map(float, samples)
except:
pass