summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/metrics.gypi1
-rw-r--r--components/metrics/proto/chrome_user_metrics_extension.proto7
-rw-r--r--components/metrics/proto/sampled_profile.proto42
3 files changed, 49 insertions, 1 deletions
diff --git a/components/metrics.gypi b/components/metrics.gypi
index 61e9855..5c9b1f9 100644
--- a/components/metrics.gypi
+++ b/components/metrics.gypi
@@ -37,6 +37,7 @@
'metrics/proto/omnibox_event.proto',
'metrics/proto/perf_data.proto',
'metrics/proto/profiler_event.proto',
+ 'metrics/proto/sampled_profile.proto',
'metrics/proto/system_profile.proto',
'metrics/proto/user_action_event.proto',
],
diff --git a/components/metrics/proto/chrome_user_metrics_extension.proto b/components/metrics/proto/chrome_user_metrics_extension.proto
index 80f3499..7efa5b4 100644
--- a/components/metrics/proto/chrome_user_metrics_extension.proto
+++ b/components/metrics/proto/chrome_user_metrics_extension.proto
@@ -16,8 +16,9 @@ import "profiler_event.proto";
import "system_profile.proto";
import "user_action_event.proto";
import "perf_data.proto";
+import "sampled_profile.proto";
-// Next tag: 11
+// Next tag: 12
message ChromeUserMetricsExtension {
// The product (i.e. end user application) for a given UMA log.
enum Product {
@@ -54,5 +55,9 @@ message ChromeUserMetricsExtension {
repeated HistogramEventProto histogram_event = 6;
repeated ProfilerEventProto profiler_event = 7;
+ // TODO(sque): Deprecate this field and use |sampled_profile| instead.
repeated PerfDataProto perf_data = 8;
+
+ // A list of all collected sample-based profiles since the last UMA upload.
+ repeated SampledProfile sampled_profile = 11;
}
diff --git a/components/metrics/proto/sampled_profile.proto b/components/metrics/proto/sampled_profile.proto
new file mode 100644
index 0000000..86f07be
--- /dev/null
+++ b/components/metrics/proto/sampled_profile.proto
@@ -0,0 +1,42 @@
+// 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.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package metrics;
+
+import "perf_data.proto";
+
+// Protocol buffer for collected sample-based profiling data.
+// Contains the parameters and data from a single profile collection event.
+
+// Next tag: 5
+message SampledProfile {
+ // Indicates the event that triggered this collection.
+ enum TriggerEvent {
+ UNKNOWN_TRIGGER_EVENT = 0;
+
+ // The profile was triggered by periodic sampling. Periodically sampled
+ // profiles are collected once per uniformly sized period interval. Within
+ // each interval, the sampled data is collected at a random time. For
+ // example, if the interval is 60 s, then data would be collected at a
+ // random point in each of the intervals [0, 60 s), [60 s, 120 s), etc.
+ PERIODIC_COLLECTION = 1;
+ }
+ optional TriggerEvent trigger_event = 1;
+
+ // Fields 2-3: Time durations are given in ticks, and represent system uptime
+ // rather than wall time.
+
+ // Time after system boot when the collection took place, in milliseconds.
+ optional int64 ms_after_boot = 2;
+
+ // Time after last login when the collection took place, in milliseconds.
+ optional int64 ms_after_login = 3;
+
+ // The actual perf data that was collected.
+ optional PerfDataProto perf_data = 4;
+}