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

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

Issue 2055043002: Plumb IterationInfo from telemetry to a diagnostic (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: IterationInfo python class Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/diagnostics/diagnostic_map.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..9d4f54413e06ff47a368f2afa146276c353acb78
--- /dev/null
+++ b/tracing/tracing/value/diagnostics/iteration_info.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+Copyright 2016 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.
+-->
+
+<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
+
+<script>
+'use strict';
+
+tr.exportTo('tr.v.d', function() {
+ /**
+ * @constructor
+ * @param {!Object} info
+ * @param {string} info.benchmarkName
+ * @param {undefined|string} info.label
+ * @param {undefined|!Object} info.storyGroupingKeys
+ * @param {undefined|string} info.storyDisplayName
+ * @param {string} info.storyUrl
+ * @param {number} info.storyRepeatCounter
+ * @param {number} info.storysetRepeatCounter
+ * @param {number} info.benchmarkStartMs Milliseconds since Unix epoch.
+ */
+ function IterationInfo(info) {
+ this.benchmarkName_ = info.benchmarkName;
+ this.benchmarkStart_ = new Date(info.benchmarkStartMs);
+ this.label_ = info.label;
+ this.storyDisplayName_ = info.storyDisplayName;
+ this.storyGroupingKeys_ = info.storyGroupingKeys;
+ this.storyRepeatCounter_ = info.storyRepeatCounter;
+ this.storyUrl_ = info.storyUrl;
+ this.storysetRepeatCounter_ = info.storysetRepeatCounter;
+ }
+
+ IterationInfo.prototype = {
+ __proto__: tr.v.d.Diagnostic.prototype,
+
+ asDictInto_: function(d) {
+ d.benchmarkName = this.benchmarkName;
+ d.benchmarkStartMs = this.benchmarkStart.getTime();
+ d.label = this.label;
+ d.storyDisplayName = this.storyDisplayName;
+ d.storyGroupingKeys = this.storyGroupingKeys;
+ d.storyRepeatCounter = this.storyRepeatCounter;
+ d.storyUrl = this.storyUrl;
+ d.storysetRepeatCounter = this.storysetRepeatCounter;
+ },
+
+ get displayLabel() {
+ if (this.label)
+ return this.label;
+ return this.benchmarkName + ' ' + this.benchmarkStartMs;
+ },
+
+ get benchmarkName() {
+ return this.benchmarkName_;
+ },
+
+ get label() {
+ return this.label_;
+ },
+
+ get storyGroupingKeys() {
+ return this.storyGroupingKeys_;
+ },
+
+ get storyDisplayName() {
+ return this.storyDisplayName_;
+ },
+
+ get storyUrl() {
+ return this.storyUrl_;
+ },
+
+ get storyRepeatCounter() {
+ return this.storyRepeatCounter_;
+ },
+
+ get storysetRepeatCounter() {
+ return this.storysetRepeatCounter_;
+ },
+
+ get benchmarkStart() {
+ return this.benchmarkStart_;
+ }
+ };
+
+ IterationInfo.fromDict = function(d) {
+ return new IterationInfo(d);
+ };
+
+ tr.v.d.Diagnostic.register(IterationInfo, {
+ elementName: 'tr-v-ui-generic-diagnostic-span'
+ });
+
+ return {
+ IterationInfo: IterationInfo
+ };
+});
+</script>
« no previous file with comments | « tracing/tracing/value/diagnostics/diagnostic_map.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698