OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |