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

Side by Side Diff: bench/TimerData.h

Issue 304613002: Reland https://codereview.chromium.org/286903025 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Diagnostic patch: removed header from gyp entry Created 6 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 | « bench/ResultsWriter.cpp ('k') | bench/TimerData.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef TimerData_DEFINED 9 #ifndef TimerData_DEFINED
10 #define TimerData_DEFINED 10 #define TimerData_DEFINED
11 11
12 #include "SkString.h" 12 #include "SkString.h"
13 #include "SkTemplates.h" 13 #include "SkTemplates.h"
14 14
15 #ifdef SK_BUILD_FOR_WIN
16 #pragma warning(push)
17 #pragma warning(disable : 4530)
18 #endif
19
20 #include "SkJSONCPP.h"
21
22 #ifdef SK_BUILD_FOR_WIN
23 #pragma warning(pop)
24 #endif
15 25
16 class BenchTimer; 26 class BenchTimer;
17 27
18 class TimerData { 28 class TimerData {
19 public: 29 public:
20 /** 30 /**
21 * Constructs a TimerData to hold at most maxNumTimings sets of elapsed time r values. 31 * Constructs a TimerData to hold at most maxNumTimings sets of elapsed time r values.
22 **/ 32 **/
23 explicit TimerData(int maxNumTimings); 33 explicit TimerData(int maxNumTimings);
24 34
(...skipping 26 matching lines...) Expand all
51 * @param the name of the config being timed (prepended to results string) 61 * @param the name of the config being timed (prepended to results string)
52 * @param timerFlags bitfield of TimerFlags values indicating which timers s hould be reported. 62 * @param timerFlags bitfield of TimerFlags values indicating which timers s hould be reported.
53 * @param itersPerTiming the number of test/bench iterations that correspond to each 63 * @param itersPerTiming the number of test/bench iterations that correspond to each
54 * appendTimes() call, 1 when appendTimes is called for each iteratio n. 64 * appendTimes() call, 1 when appendTimes is called for each iteratio n.
55 */ 65 */
56 SkString getResult(const char* doubleFormat, 66 SkString getResult(const char* doubleFormat,
57 Result result, 67 Result result,
58 const char* configName, 68 const char* configName,
59 uint32_t timerFlags, 69 uint32_t timerFlags,
60 int itersPerTiming = 1); 70 int itersPerTiming = 1);
71 #ifdef SK_BUILD_JSON_WRITER
72 Json::Value getJSON(uint32_t timerFlags,
73 Result result,
74 int itersPerTiming = 1);
75 #endif // SK_BUILD_JSON_WRITER
61 76
62 private: 77 private:
63 int fMaxNumTimings; 78 int fMaxNumTimings;
64 int fCurrTiming; 79 int fCurrTiming;
65 80
66 SkAutoTArray<double> fWallTimes; 81 SkAutoTArray<double> fWallTimes;
67 SkAutoTArray<double> fTruncatedWallTimes; 82 SkAutoTArray<double> fTruncatedWallTimes;
68 SkAutoTArray<double> fCpuTimes; 83 SkAutoTArray<double> fCpuTimes;
69 SkAutoTArray<double> fTruncatedCpuTimes; 84 SkAutoTArray<double> fTruncatedCpuTimes;
70 SkAutoTArray<double> fGpuTimes; 85 SkAutoTArray<double> fGpuTimes;
71 }; 86 };
72 87
73 #endif // TimerData_DEFINED 88 #endif // TimerData_DEFINED
OLDNEW
« no previous file with comments | « bench/ResultsWriter.cpp ('k') | bench/TimerData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698