Index: base/test/perftimer.h |
diff --git a/base/test/perftimer.h b/base/test/perftimer.h |
index 1a26cf5cfec31b05966b732895848f55dcb90154..86ee1260ac13fcec2228a96d455ce60284bb12eb 100644 |
--- a/base/test/perftimer.h |
+++ b/base/test/perftimer.h |
@@ -5,8 +5,6 @@ |
#ifndef BASE_TEST_PERFTIMER_H_ |
#define BASE_TEST_PERFTIMER_H_ |
-#include <string> |
- |
#include "base/basictypes.h" |
#include "base/time/time.h" |
@@ -14,25 +12,7 @@ namespace base { |
class FilePath; |
} |
-// ---------------------------------------------------------------------- |
-// Initializes and finalizes the perf log. These functions should be |
-// called at the beginning and end (respectively) of running all the |
-// performance tests. The init function returns true on success. |
-// ---------------------------------------------------------------------- |
-bool InitPerfLog(const base::FilePath& log_path); |
-void FinalizePerfLog(); |
- |
-// ---------------------------------------------------------------------- |
-// LogPerfResult |
-// Writes to the perf result log the given 'value' resulting from the |
-// named 'test'. The units are to aid in reading the log by people. |
-// ---------------------------------------------------------------------- |
-void LogPerfResult(const char* test_name, double value, const char* units); |
- |
-// ---------------------------------------------------------------------- |
-// PerfTimer |
-// A simple wrapper around Now() |
-// ---------------------------------------------------------------------- |
+// A simple wrapper around Now() |
class PerfTimer { |
public: |
PerfTimer() { |
@@ -46,40 +26,8 @@ class PerfTimer { |
private: |
base::TimeTicks begin_; |
-}; |
- |
-// ---------------------------------------------------------------------- |
-// PerfTimeLogger |
-// Automates calling LogPerfResult for the common case where you want |
-// to measure the time that something took. Call Done() when the test |
-// is complete if you do extra work after the test or there are stack |
-// objects with potentially expensive constructors. Otherwise, this |
-// class with automatically log on destruction. |
-// ---------------------------------------------------------------------- |
-class PerfTimeLogger { |
- public: |
- explicit PerfTimeLogger(const char* test_name) |
- : logged_(false), |
- test_name_(test_name) { |
- } |
- |
- ~PerfTimeLogger() { |
- if (!logged_) |
- Done(); |
- } |
- void Done() { |
- // we use a floating-point millisecond value because it is more |
- // intuitive than microseconds and we want more precision than |
- // integer milliseconds |
- LogPerfResult(test_name_.c_str(), timer_.Elapsed().InMillisecondsF(), "ms"); |
- logged_ = true; |
- } |
- |
- private: |
- bool logged_; |
- std::string test_name_; |
- PerfTimer timer_; |
+ DISALLOW_COPY_AND_ASSIGN(PerfTimer); |
}; |
#endif // BASE_TEST_PERFTIMER_H_ |