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

Side by Side Diff: tools/VisualBench/VisualLightweightBenchModule.cpp

Issue 1442643007: Add visualbench option to not reset between samples (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
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 #include "VisualLightweightBenchModule.h" 8 #include "VisualLightweightBenchModule.h"
9 9
10 #include "ProcStats.h" 10 #include "ProcStats.h"
(...skipping 24 matching lines...) Expand all
35 static SkString humanize(double ms) { 35 static SkString humanize(double ms) {
36 if (FLAGS_verbose) { 36 if (FLAGS_verbose) {
37 return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); 37 return SkStringPrintf("%llu", (uint64_t)(ms*1e6));
38 } 38 }
39 return HumanizeMs(ms); 39 return HumanizeMs(ms);
40 } 40 }
41 41
42 #define HUMANIZE(time) humanize(time).c_str() 42 #define HUMANIZE(time) humanize(time).c_str()
43 43
44 VisualLightweightBenchModule::VisualLightweightBenchModule(VisualBench* owner) 44 VisualLightweightBenchModule::VisualLightweightBenchModule(VisualBench* owner)
45 : INHERITED(owner, true) 45 : INHERITED(owner)
46 , fCurrentSample(0) 46 , fCurrentSample(0)
47 , fResults(new ResultsWriter) { 47 , fResults(new ResultsWriter) {
48 // Print header 48 // Print header
49 SkDebugf("curr/maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\t%-*s\tbench\n" , FLAGS_samples, 49 SkDebugf("curr/maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\t%-*s\tbench\n" , FLAGS_samples,
50 "samples"); 50 "samples");
51 51
52 // setup json logging if required 52 // setup json logging if required
53 if (!FLAGS_outResultsFile.isEmpty()) { 53 if (!FLAGS_outResultsFile.isEmpty()) {
54 fResults.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0])); 54 fResults.reset(new NanoJSONResultsWriter(FLAGS_outResultsFile[0]));
55 } 55 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 fRecords.push_back(); 130 fRecords.push_back();
131 fCurrentSample = 0; 131 fCurrentSample = 0;
132 return true; 132 return true;
133 } 133 }
134 return false; 134 return false;
135 } 135 }
136 136
137 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) { 137 bool VisualLightweightBenchModule::onHandleChar(SkUnichar c) {
138 return true; 138 return true;
139 } 139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698