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

Unified Diff: base/test/perf_log.cc

Issue 23985006: base: Split logging functions and PerfTimeLogger out of perftimer.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix visitedlink Created 7 years, 3 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
« no previous file with comments | « base/test/perf_log.h ('k') | base/test/perf_test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/perf_log.cc
diff --git a/base/test/perftimer.cc b/base/test/perf_log.cc
similarity index 82%
copy from base/test/perftimer.cc
copy to base/test/perf_log.cc
index 6815f0b082acf0917085221cc2f9e8b7d0b7e59d..aaeb26c4cd6446369996c5280e198af7c07bc36a 100644
--- a/base/test/perftimer.cc
+++ b/base/test/perf_log.cc
@@ -2,19 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/test/perftimer.h"
+#include "base/test/perf_log.h"
-#include <stdio.h>
-#include <string>
-
-#include "base/basictypes.h"
#include "base/file_util.h"
-#include "base/files/file_path.h"
#include "base/logging.h"
+namespace base {
+
static FILE* perf_log_file = NULL;
-bool InitPerfLog(const base::FilePath& log_file) {
+bool InitPerfLog(const FilePath& log_file) {
if (perf_log_file) {
// trying to initialize twice
NOTREACHED();
@@ -43,3 +40,5 @@ void LogPerfResult(const char* test_name, double value, const char* units) {
fprintf(perf_log_file, "%s\t%g\t%s\n", test_name, value, units);
printf("%s\t%g\t%s\n", test_name, value, units);
}
+
+} // namespace base
« no previous file with comments | « base/test/perf_log.h ('k') | base/test/perf_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698