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

Unified Diff: tracing/tracing/metrics/metric_map_function.html

Issue 1685683003: Implement Timeline Based Measurement v2 (Closed) Base URL: git@github.com:catapult-project/catapult.git@new_style_results
Patch Set: fix vinn tests Created 4 years, 10 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/metrics/__init__.py ('k') | tracing/tracing/metrics/metric_map_function_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/metric_map_function.html
diff --git a/tracing/tracing/metrics/metric_map_function.html b/tracing/tracing/metrics/metric_map_function.html
new file mode 100644
index 0000000000000000000000000000000000000000..fc80d1e73ae9128465769bf272f8df0c54fbf541
--- /dev/null
+++ b/tracing/tracing/metrics/metric_map_function.html
@@ -0,0 +1,31 @@
+<!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="/perf_insights/function_handle.html">
+<link rel="import" href="/tracing/metrics/metric_registry.html">
+<link rel="import" href="/tracing/metrics/value_list.html">
+
+<script>
+'use strict';
+
+tr.exportTo('tr.metrics', function() {
+ function metricMapFunction(result, model) {
+ var valueList = new tr.metrics.ValueList();
+ var metrics = tr.metrics.MetricRegistry.metrics;
+ for (var metric in metrics) {
+ metrics[metric](valueList, model);
+ }
+
+ result.addPair('values', valueList.valueDicts);
+ }
+
+ pi.FunctionRegistry.register(metricMapFunction);
+
+ return {
+ metricMapFunction: metricMapFunction
+ };
+});
+</script>
« no previous file with comments | « tracing/tracing/metrics/__init__.py ('k') | tracing/tracing/metrics/metric_map_function_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698