Committed: http://code.google.com/p/skia/source/detail?r=10372
R=borenet@google.com, bungeman@google.com, robertphillips@google.com, scroggo@google.com, sglez@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/19862002
git-svn-id: http://skia.googlecode.com/svn/trunk@10473 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/bbh_shootout.cpp b/tools/bbh_shootout.cpp
index 24d7b86..9de0bfc 100644
--- a/tools/bbh_shootout.cpp
+++ b/tools/bbh_shootout.cpp
@@ -268,7 +268,7 @@
const BenchmarkControl& benchControl,
SkTArray<Histogram>& histogram) {
static const SkString timeFormat("%f");
- TimerData timerData(timeFormat, timeFormat);
+ TimerData timerData(argc - 1);
for (int index = 1; index < argc; ++index) {
BenchTimer timer;
SkString path(argv[index]);
@@ -278,22 +278,17 @@
continue;
}
benchControl.fFunction(benchControl.fType, benchControl.fTileSize, path, pic, &timer);
- timerData.appendTimes(&timer, argc - 1 == index);
+ SkAssertResult(timerData.appendTimes(&timer));
histogram[index - 1].fPath = path;
histogram[index - 1].fCpuTime = SkDoubleToScalar(timer.fCpu);
}
const SkString timerResult = timerData.getResult(
- /*logPerIter = */ false,
- /*printMin = */ false,
- /*repeatDraw = */ 1,
+ /*doubleFormat = */ timeFormat.c_str(),
+ /*result = */ TimerData::kAvg_Result,
/*configName = */ benchControl.fName.c_str(),
- /*showWallTime = */ false,
- /*showTruncatedWallTime = */ false,
- /*showCpuTime = */ true,
- /*showTruncatedCpuTime = */ false,
- /*showGpuTime = */ false);
+ /*timerFlags = */ TimerData::kCpu_Flag);
const char findStr[] = "= ";
int pos = timerResult.find(findStr);