Index: base/profiler/scoped_tracker.h |
diff --git a/base/profiler/scoped_tracker.h b/base/profiler/scoped_tracker.h |
index a1885571351a7a7ca31a3d63e80342743b0d220f..f83654e1bd48e55fa7ddd3f88837871dd4eff2c7 100644 |
--- a/base/profiler/scoped_tracker.h |
+++ b/base/profiler/scoped_tracker.h |
@@ -19,6 +19,21 @@ namespace tracked_objects { |
// ScopedTracker instruments a region within the code if the instrumentation is |
// enabled. It can be used, for example, to find out if a source of jankiness is |
// inside the instrumented code region. |
+// Details: |
+// 1. This class creates a task (like ones created by PostTask calls or IPC |
+// message handlers). This task can be seen in chrome://profiler and is sent as |
+// a part of profiler data to the UMA server. See profiler_event.proto. |
+// 2. That task's lifetime is same as the lifetime of the ScopedTracker |
+// instance. |
+// 3. The execution time associated with the task is the wallclock time between |
+// its constructor and destructor, minus wallclock times of directly nested |
+// tasks. |
+// 4. Task creation that this class utilizes is highly optimized. |
+// 5. The class doesn't create a task unless this was enabled for the current |
+// process. Search for ScopedTracker::Enable for the current list of processes |
+// and channels where it's activated. |
+// 6. The class is designed for temporarily instrumenting code to find |
+// performance problems, after which the instrumentation must be removed. |
class BASE_EXPORT ScopedTracker { |
public: |
ScopedTracker(const Location& location); |