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

Unified Diff: tracing/tracing/value/diagnostics/iteration_info.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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
Index: tracing/tracing/value/diagnostics/iteration_info.html
diff --git a/tracing/tracing/value/diagnostics/iteration_info.html b/tracing/tracing/value/diagnostics/iteration_info.html
index 9d4f54413e06ff47a368f2afa146276c353acb78..b972c93c72e49b9a37551936d39582cc1cc0371b 100644
--- a/tracing/tracing/value/diagnostics/iteration_info.html
+++ b/tracing/tracing/value/diagnostics/iteration_info.html
@@ -5,6 +5,7 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
+<link rel="import" href="/tracing/base/utils.html">
<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
<script>
@@ -34,9 +35,30 @@ tr.exportTo('tr.v.d', function() {
this.storysetRepeatCounter_ = info.storysetRepeatCounter;
}
+ // Diagnostics generally do not need a constant name or getFromValue().
+ // IterationInfo is a special kind of Diagnostic that is produced by
+ // telemetry, which shepherds whole flocks of traces at once, and needs a
+ // system to identify and find traces by these attributes.
+
+ // Values produced by telemetry all have a single IterationInfo at this key in
+ // their DiagnosticMap.
+ IterationInfo.NAME = 'iteration';
+
+ /**
+ * @param {!tr.v.Value} value
+ * @return {(undefined|!IterationInfo)}
+ */
+ IterationInfo.getFromValue = function(value) {
+ return value.diagnostics.get(IterationInfo.NAME);
+ };
+
IterationInfo.prototype = {
__proto__: tr.v.d.Diagnostic.prototype,
+ addToValue: function(value) {
+ value.diagnostics.add(IterationInfo.NAME, this);
+ },
+
asDictInto_: function(d) {
d.benchmarkName = this.benchmarkName;
d.benchmarkStartMs = this.benchmarkStart.getTime();
@@ -51,7 +73,7 @@ tr.exportTo('tr.v.d', function() {
get displayLabel() {
if (this.label)
return this.label;
- return this.benchmarkName + ' ' + this.benchmarkStartMs;
+ return this.benchmarkName + ' ' + this.benchmarkStartString;
},
get benchmarkName() {
@@ -78,12 +100,24 @@ tr.exportTo('tr.v.d', function() {
return this.storyRepeatCounter_;
},
+ get storyRepeatCounterLabel() {
+ return 'story repeat ' + this.storyRepeatCounter;
+ },
+
get storysetRepeatCounter() {
return this.storysetRepeatCounter_;
},
+ get storysetRepeatCounterLabel() {
+ return 'storyset repeat ' + this.storysetRepeatCounter;
+ },
+
get benchmarkStart() {
return this.benchmarkStart_;
+ },
+
+ get benchmarkStartString() {
+ return tr.b.formatDate(this.benchmarkStart);
}
};
@@ -92,7 +126,7 @@ tr.exportTo('tr.v.d', function() {
};
tr.v.d.Diagnostic.register(IterationInfo, {
- elementName: 'tr-v-ui-generic-diagnostic-span'
+ elementName: 'tr-v-ui-iteration-info-span'
});
return {
« no previous file with comments | « tracing/tracing/value/diagnostics/diagnostic_map.html ('k') | tracing/tracing/value/diagnostics/related_event_set.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698