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

Side by Side Diff: components/metrics/proto/sampled_profile.proto

Issue 337813002: metrics: Protobuf supports profiling upon restoring session (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 syntax = "proto2"; 5 syntax = "proto2";
6 6
7 option optimize_for = LITE_RUNTIME; 7 option optimize_for = LITE_RUNTIME;
8 8
9 package metrics; 9 package metrics;
10 10
11 import "perf_data.proto"; 11 import "perf_data.proto";
12 12
13 // Protocol buffer for collected sample-based profiling data. 13 // Protocol buffer for collected sample-based profiling data.
14 // Contains the parameters and data from a single profile collection event. 14 // Contains the parameters and data from a single profile collection event.
15 15
16 // Next tag: 7 16 // Next tag: 9
17 message SampledProfile { 17 message SampledProfile {
18 // Indicates the event that triggered this collection. 18 // Indicates the event that triggered this collection.
19 enum TriggerEvent { 19 enum TriggerEvent {
20 UNKNOWN_TRIGGER_EVENT = 0; 20 UNKNOWN_TRIGGER_EVENT = 0;
21 21
22 // The profile was triggered by periodic sampling. Periodically sampled 22 // The profile was triggered by periodic sampling. Periodically sampled
23 // profiles are collected once per uniformly sized period interval. Within 23 // profiles are collected once per uniformly sized period interval. Within
24 // each interval, the sampled data is collected at a random time. For 24 // each interval, the sampled data is collected at a random time. For
25 // example, if the interval is 60 s, then data would be collected at a 25 // example, if the interval is 60 s, then data would be collected at a
26 // random point in each of the intervals [0, 60 s), [60 s, 120 s), etc. 26 // random point in each of the intervals [0, 60 s), [60 s, 120 s), etc.
27 PERIODIC_COLLECTION = 1; 27 PERIODIC_COLLECTION = 1;
28 28
29 // The profile was collected upon resume from suspend. 29 // The profile was collected upon resume from suspend.
30 RESUME_FROM_SUSPEND = 2; 30 RESUME_FROM_SUSPEND = 2;
31
32 // The profile was collected upon restoring a previous session.
33 RESTORE_SESSION = 3;
31 } 34 }
32 optional TriggerEvent trigger_event = 1; 35 optional TriggerEvent trigger_event = 1;
33 36
34 // Fields 2-3: Time durations are given in ticks, and represent system uptime 37 // Fields 2-3: Time durations are given in ticks, and represent system uptime
35 // rather than wall time. 38 // rather than wall time.
36 39
37 // Time after system boot when the collection took place, in milliseconds. 40 // Time after system boot when the collection took place, in milliseconds.
38 optional int64 ms_after_boot = 2; 41 optional int64 ms_after_boot = 2;
39 42
40 // Time after last login when the collection took place, in milliseconds. 43 // Time after last login when the collection took place, in milliseconds.
41 optional int64 ms_after_login = 3; 44 optional int64 ms_after_login = 3;
42 45
43 // The duration for which the machine was suspended prior to collecting the 46 // The duration for which the machine was suspended prior to collecting the
44 // sampled profile. Only set when |trigger_event| is RESUME_FROM_SUSPEND. 47 // sampled profile. Only set when |trigger_event| is RESUME_FROM_SUSPEND.
45 optional int64 suspend_duration_ms = 5; 48 optional int64 suspend_duration_ms = 5;
46 49
47 // Number of milliseconds after a resume that profile was collected. Only set 50 // Number of milliseconds after a resume that profile was collected. Only set
48 // when |trigger_event| is RESUME_FROM_SUSPEND. 51 // when |trigger_event| is RESUME_FROM_SUSPEND.
49 optional int64 ms_after_resume = 6; 52 optional int64 ms_after_resume = 6;
50 53
54 // Number of tabs restored during a session restore. Only set when
55 // |trigger_event| is RESTORE_SESSION.
56 optional int32 num_tabs_restored = 7;
57
58 // Number of milliseconds after a session restore that a profile was
59 // collected. Only set when |trigger_event| is RESTORE_SESSION.
60 optional int64 ms_after_restore = 8;
61
51 // The actual perf data that was collected. 62 // The actual perf data that was collected.
52 optional PerfDataProto perf_data = 4; 63 optional PerfDataProto perf_data = 4;
53 } 64 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698