1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Performance metrics collected via Chrome's built-in profiler.
9 option optimize_for = LITE_RUNTIME;
15 message ProfilerEventProto {
16 // The type of this profile.
18 UNKNOWN_PROFILE = 0; // Unknown type (should not reach here).
19 STARTUP_PROFILE = 1; // Startup profile, logged approximately 60 seconds
22 optional ProfileType profile_type = 1;
24 // The source based upon which "time" measurements are made.
25 // We currently only measure wall clock time; but we are exploring other
26 // measurement sources as well, such as CPU time or TCMalloc statistics.
28 UNKNOWN_TIME_SOURCE = 0; // Unknown source (should not reach here).
29 WALL_CLOCK_TIME = 1; // Total time elapsed between the start and end of
30 // the task's execution.
32 optional TimeSource time_source = 2;
34 // Data for a single tracked object (typically, a Task).
35 message TrackedObject {
36 // The name of the thread from which this task was posted, hashed.
37 optional fixed64 birth_thread_name_hash = 1;
39 // The name of the thread on which this task was executed, hashed.
40 optional fixed64 exec_thread_name_hash = 2;
42 // The source file name from which this task was posted, hashed.
43 optional fixed64 source_file_name_hash = 3;
45 // Function name from which this task was posted, hashed.
46 optional fixed64 source_function_name_hash = 4;
48 // The line number within the source file from which this task was posted.
49 optional int32 source_line_number = 5;
51 // The number of times this task was executed.
52 optional int32 exec_count = 6;
54 // The total execution time for instances this task.
55 optional int32 exec_time_total = 7;
57 // The execution time for a uniformly randomly sampled instance of this
59 optional int32 exec_time_sampled = 8;
61 // The total time instances this task spent waiting (e.g. in a message loop)
62 // before they were run.
63 optional int32 queue_time_total = 9;
65 // The time that a uniformly randomly sampled instance of this task spent
66 // waiting (e.g. in a message loop) before it was run.
67 optional int32 queue_time_sampled = 10;
69 // The type of process within which this task was executed.
71 UNKNOWN = 0; // Should not reach here
86 optional ProcessType process_type = 11;
88 // The local PID for the process within which this task was executed.
89 optional uint32 process_id = 12;
91 repeated TrackedObject tracked_object = 3;