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

Side by Side Diff: tools/VisualBench.cpp

Issue 1204153002: Add samplingTime mode to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_loopSKP
Patch Set: copyright Created 5 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 unified diff | Download patch
« no previous file with comments | « tools/Stats.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 * 6 *
7 */ 7 */
8 8
9 #include "VisualBench.h" 9 #include "VisualBench.h"
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void VisualBench::printStats() { 145 void VisualBench::printStats() {
146 const SkTArray<double>& measurements = fRecords[fCurrentPictureIdx].fMeasure ments; 146 const SkTArray<double>& measurements = fRecords[fCurrentPictureIdx].fMeasure ments;
147 SkString shortName = SkOSPath::Basename(fRecords[fCurrentPictureIdx].fFilena me.c_str()); 147 SkString shortName = SkOSPath::Basename(fRecords[fCurrentPictureIdx].fFilena me.c_str());
148 if (FLAGS_verbose) { 148 if (FLAGS_verbose) {
149 for (int i = 0; i < measurements.count(); i++) { 149 for (int i = 0; i < measurements.count(); i++) {
150 SkDebugf("%s ", HUMANIZE(measurements[i])); 150 SkDebugf("%s ", HUMANIZE(measurements[i]));
151 } 151 }
152 SkDebugf("%s\n", shortName.c_str()); 152 SkDebugf("%s\n", shortName.c_str());
153 } else { 153 } else {
154 SkASSERT(measurements.count()); 154 SkASSERT(measurements.count());
155 Stats stats(measurements.begin(), measurements.count()); 155 Stats stats(measurements);
156 const double stdDevPercent = 100 * sqrt(stats.var) / stats.mean; 156 const double stdDevPercent = 100 * sqrt(stats.var) / stats.mean;
157 SkDebugf("%4d/%-4dMB\t%d\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\n", 157 SkDebugf("%4d/%-4dMB\t%d\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\n",
158 sk_tools::getCurrResidentSetSizeMB(), 158 sk_tools::getCurrResidentSetSizeMB(),
159 sk_tools::getMaxResidentSetSizeMB(), 159 sk_tools::getMaxResidentSetSizeMB(),
160 fLoops, 160 fLoops,
161 fFlushes, 161 fFlushes,
162 HUMANIZE(stats.min), 162 HUMANIZE(stats.min),
163 HUMANIZE(stats.median), 163 HUMANIZE(stats.median),
164 HUMANIZE(stats.mean), 164 HUMANIZE(stats.mean),
165 HUMANIZE(stats.max), 165 HUMANIZE(stats.max),
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 void application_term() { 294 void application_term() {
295 SkEvent::Term(); 295 SkEvent::Term();
296 SkGraphics::Term(); 296 SkGraphics::Term();
297 } 297 }
298 298
299 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 299 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
300 return new VisualBench(hwnd, argc, argv); 300 return new VisualBench(hwnd, argc, argv);
301 } 301 }
302 302
OLDNEW
« no previous file with comments | « tools/Stats.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698