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

Side by Side Diff: bench/ResultsWriter.h

Issue 329993008: Make SKP bench JSON ouput better (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pulling from master Created 6 years, 5 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 | « no previous file | bench/ResultsWriter.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 * Classes for writing out bench results in various formats. 7 * Classes for writing out bench results in various formats.
8 */ 8 */
9 9
10 #ifndef SkResultsWriter_DEFINED 10 #ifndef SkResultsWriter_DEFINED
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 * "results" : [ 95 * "results" : [
96 * { 96 * {
97 * "name": "565", 97 * "name": "565",
98 * "cmsecs" : 143.188128906250, 98 * "cmsecs" : 143.188128906250,
99 * "msecs" : 143.835957031250 99 * "msecs" : 143.835957031250
100 * }, 100 * },
101 * ... 101 * ...
102 */ 102 */
103 103
104 Json::Value* SkFindNamedNode(Json::Value* root, const char name[]); 104 Json::Value* SkFindNamedNode(Json::Value* root, const char name[]);
105 Json::Value SkMakeBuilderJSON(const SkString &buildername);
106
105 class JSONResultsWriter : public ResultsWriter { 107 class JSONResultsWriter : public ResultsWriter {
106 public: 108 public:
107 explicit JSONResultsWriter(const char filename[]) 109 explicit JSONResultsWriter(const char filename[])
108 : fFilename(filename) 110 : fFilename(filename)
109 , fRoot() 111 , fRoot()
110 , fResults(fRoot["results"]) 112 , fResults(fRoot["results"])
111 , fBench(NULL) 113 , fBench(NULL)
112 , fConfig(NULL) { 114 , fConfig(NULL) {
113 } 115 }
114 virtual void option(const char name[], const char value[]) { 116 virtual void option(const char name[], const char value[]) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 */ 191 */
190 template <typename T> class CallEnd : SkNoncopyable { 192 template <typename T> class CallEnd : SkNoncopyable {
191 public: 193 public:
192 CallEnd(T& obj) : fObj(obj) {} 194 CallEnd(T& obj) : fObj(obj) {}
193 ~CallEnd() { fObj.end(); } 195 ~CallEnd() { fObj.end(); }
194 private: 196 private:
195 T& fObj; 197 T& fObj;
196 }; 198 };
197 199
198 #endif 200 #endif
OLDNEW
« no previous file with comments | « no previous file | bench/ResultsWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698