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

Unified Diff: mojo/services/tracing/public/interfaces/tracing.mojom

Issue 1278673002: Add stats collection for telemetry startup.warm.blank_page test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment. Created 5 years, 4 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 | « mojo/services/tracing/public/interfaces/BUILD.gn ('k') | mojo/services/tracing/tracing.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/tracing/public/interfaces/tracing.mojom
diff --git a/mojo/services/tracing/public/interfaces/tracing.mojom b/mojo/services/tracing/public/interfaces/tracing.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..dbf9b3e7bfd261fbfe39fa3bdf4258dbe6e3243a
--- /dev/null
+++ b/mojo/services/tracing/public/interfaces/tracing.mojom
@@ -0,0 +1,56 @@
+// Copyright 2014 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.
+
+module tracing;
+
+// To participate in the tracing ecosystem, implement the TraceController
+// interface and connect to the tracing app. Then, when the controller's Start()
+// function is called collect tracing data and pass it back via the provided
+// TraceDataCollector interface up until Stop() is called.
+
+interface TraceController {
+ StartTracing(string categories, TraceDataCollector collector);
+ StopTracing();
+};
+
+interface TraceDataCollector {
+ DataCollected(string json);
+};
+
+interface TraceCoordinator {
+ // Request tracing data from all connected TraceControllers to stream to
+ // |stream|.
+ Start(handle<data_pipe_producer> stream, string categories);
+
+ // Stop tracing and flush results to file.
+ StopAndFlush();
+};
+
+// These times are used to determine startup performance metrics.
+// TODO(msw): Use TimeTicks to avoid system clock changes: crbug.com/521164
+struct StartupPerformanceTimes {
+ // TODO(msw): Rename to match "BrowserMainEntryTimeAbsolute" metric?
+ int64 shell_process_creation_time;
+ int64 browser_message_loop_start_time;
+ int64 browser_window_display_time;
+ int64 browser_open_tabs_time;
+ // TODO(msw): Rename to avoid "web contents"?
+ int64 first_web_contents_main_frame_load_time;
+ // TODO(msw): Rename to match "FirstWebContents.NonEmptyPaint" metric?
+ int64 first_visually_non_empty_layout_time;
+};
+
+// This interface accepts startup performance timing from a variety of sources.
+interface StartupPerformanceDataCollector {
+ // These setters may be called many times, only the first time is recorded.
+ SetShellProcessCreationTime(int64 time);
+ SetBrowserMessageLoopStartTime(int64 time);
+ SetBrowserWindowDisplayTime(int64 time);
+ SetBrowserOpenTabsTime(int64 time);
+ SetFirstWebContentsMainFrameLoadTime(int64 time);
+ SetFirstVisuallyNonEmptyLayoutTime(int64 time);
+
+ // Get the currently available startup performance times.
+ GetStartupPerformanceTimes() => (StartupPerformanceTimes times);
+};
« no previous file with comments | « mojo/services/tracing/public/interfaces/BUILD.gn ('k') | mojo/services/tracing/tracing.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698