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

Unified Diff: base/profiler/scoped_tracker.h

Issue 696483002: Instrumenting URLRequestJob::NotifyHeadersComplete to locate the source of jankiness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Indent fix Created 6 years, 2 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 | « no previous file | net/base/network_delegate.cc » ('j') | net/url_request/url_request_job.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/scoped_tracker.h
diff --git a/base/profiler/scoped_tracker.h b/base/profiler/scoped_tracker.h
index fbd73099bcf122f59b2d639b381939c177120a0c..8cfee343144335919133a16e7a89ab0db1db2d03 100644
--- a/base/profiler/scoped_tracker.h
+++ b/base/profiler/scoped_tracker.h
@@ -18,6 +18,22 @@ 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 extends from the object's constructor to its destructor
+// executions.
+// 3. The execution time associated with the task is the wallclock time between
+// its constructor and destructor, minus wallclock times of directly nested
+// tasks.
mmenke 2014/11/03 16:19:15 Ahh...This is the important detail I was really co
+// 4. Task creation that this class utilizes was highly optimized by jar@.
+// 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 has to be removed.
+// However, in rare cases it might be added permanently, as an exception.
class BASE_EXPORT ScopedTracker {
public:
ScopedTracker(const Location& location);
« no previous file with comments | « no previous file | net/base/network_delegate.cc » ('j') | net/url_request/url_request_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698