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

Unified Diff: bench/TimerData.h

Issue 344213003: Move BenchTimer to tools as Timer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes 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 side-by-side diff with in-line comments
Download patch
Index: bench/TimerData.h
diff --git a/bench/TimerData.h b/bench/TimerData.h
deleted file mode 100644
index fb84df1a9eb7950ea503fcadaaea11b6a384645b..0000000000000000000000000000000000000000
--- a/bench/TimerData.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef TimerData_DEFINED
-#define TimerData_DEFINED
-
-#include "SkString.h"
-#include "SkTemplates.h"
-
-#ifdef SK_BUILD_FOR_WIN
- #pragma warning(push)
- #pragma warning(disable : 4530)
-#endif
-
-#include "SkJSONCPP.h"
-
-#ifdef SK_BUILD_FOR_WIN
- #pragma warning(pop)
-#endif
-
-class BenchTimer;
-
-class TimerData {
-public:
- /**
- * Constructs a TimerData to hold at most maxNumTimings sets of elapsed timer values.
- **/
- explicit TimerData(int maxNumTimings);
-
- /**
- * Collect times from the BenchTimer for an iteration. It will fail if called more often than
- * indicated in the constructor.
- *
- * @param BenchTimer Must not be null.
- */
- bool appendTimes(BenchTimer*);
-
- enum Result {
- kMin_Result,
- kAvg_Result,
- kPerIter_Result
- };
-
- enum TimerFlags {
- kWall_Flag = 0x1,
- kTruncatedWall_Flag = 0x2,
- kCpu_Flag = 0x4,
- kTruncatedCpu_Flag = 0x8,
- kGpu_Flag = 0x10
- };
-
- /**
- * Gets the timer data results as a string.
- * @param doubleFormat printf-style format for doubles (e.g. "%02d")
- * @param result the type of result desired
- * @param the name of the config being timed (prepended to results string)
- * @param timerFlags bitfield of TimerFlags values indicating which timers should be reported.
- * @param itersPerTiming the number of test/bench iterations that correspond to each
- * appendTimes() call, 1 when appendTimes is called for each iteration.
- */
- SkString getResult(const char* doubleFormat,
- Result result,
- const char* configName,
- uint32_t timerFlags,
- int itersPerTiming = 1);
- Json::Value getJSON(uint32_t timerFlags,
- Result result,
- int itersPerTiming = 1);
-
-private:
- int fMaxNumTimings;
- int fCurrTiming;
-
- SkAutoTArray<double> fWallTimes;
- SkAutoTArray<double> fTruncatedWallTimes;
- SkAutoTArray<double> fCpuTimes;
- SkAutoTArray<double> fTruncatedCpuTimes;
- SkAutoTArray<double> fGpuTimes;
-};
-
-#endif // TimerData_DEFINED
« no previous file with comments | « bench/BenchTimer.cpp ('k') | bench/TimerData.cpp » ('j') | tools/timer/GpuTimer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698