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

Unified Diff: base/profiler.h

Issue 40255: Add API functions to control Quantify, as well as expose these... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/build/base.vcproj ('k') | base/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler.h
===================================================================
--- base/profiler.h (revision 0)
+++ base/profiler.h (revision 0)
@@ -0,0 +1,39 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// An abstraction for functions used to control execution time profiling.
+// All methods are effectively no-ops unless this program is being run through
+// a supported tool (currently only Quantify, a companion tool to Purify)
+
+#ifndef BASE_PROFILER_H__
+#define BASE_PROFILER_H__
+
+#include "base/basictypes.h"
+
+namespace base {
+
+class Profiler {
+ public:
+ // Starts or resumes recording.
+ static void StartRecording();
+
+ // Stops recording until StartRecording is called or the program exits.
+ static void StopRecording();
+
+ // Throw away data collected so far. This can be useful to call before
+ // your first call to StartRecording, for instance to avoid counting any
+ // time in application startup.
+ static void ClearData();
+
+ // Sets the name of the current thread for display in the profiler's UI.
+ static void SetThreadName(const char *name);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Profiler);
+};
+
+} // namespace base
+
+#endif // BASE_PROFILER_H__
+
Property changes on: base\profiler.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « base/build/base.vcproj ('k') | base/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698