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

Side by Side Diff: tracing/tracing/metrics/system_health/responsiveness_metric.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/statistics.html"> 8 <link rel="import" href="/tracing/base/math/statistics.html">
9 <link rel="import" href="/tracing/metrics/metric_registry.html"> 9 <link rel="import" href="/tracing/metrics/metric_registry.html">
10 <link rel="import" href="/tracing/metrics/system_health/utils.html"> 10 <link rel="import" href="/tracing/metrics/system_health/utils.html">
11 <link rel="import" href="/tracing/model/user_model/animation_expectation.html"> 11 <link rel="import" href="/tracing/model/user_model/animation_expectation.html">
12 <link rel="import" href="/tracing/model/user_model/load_expectation.html"> 12 <link rel="import" href="/tracing/model/user_model/load_expectation.html">
13 <link rel="import" href="/tracing/model/user_model/response_expectation.html"> 13 <link rel="import" href="/tracing/model/user_model/response_expectation.html">
14 <link rel="import" href="/tracing/value/histogram.html"> 14 <link rel="import" href="/tracing/value/histogram.html">
15 15
16 <script> 16 <script>
17 'use strict'; 17 'use strict';
18 18
(...skipping 25 matching lines...) Expand all
44 animationExpectation.frameEvents.length === 0) 44 animationExpectation.frameEvents.length === 0)
45 throw new Error('Animation missing frameEvents ' + 45 throw new Error('Animation missing frameEvents ' +
46 animationExpectation.stableId); 46 animationExpectation.stableId);
47 47
48 var frameTimestamps = animationExpectation.frameEvents; 48 var frameTimestamps = animationExpectation.frameEvents;
49 frameTimestamps = frameTimestamps.toArray().map(function(event) { 49 frameTimestamps = frameTimestamps.toArray().map(function(event) {
50 return event.start; 50 return event.start;
51 }); 51 });
52 52
53 var absolute = true; 53 var absolute = true;
54 return tr.b.Statistics.timestampsDiscrepancy(frameTimestamps, absolute); 54 return tr.b.math.Statistics.timestampsDiscrepancy(
55 frameTimestamps, absolute);
55 } 56 }
56 57
57 /** 58 /**
58 * @param {!tr.v.HistogramSet} histograms 59 * @param {!tr.v.HistogramSet} histograms
59 * @param {!tr.model.Model} model 60 * @param {!tr.model.Model} model
60 * @param {!Object=} opt_options 61 * @param {!Object=} opt_options
61 */ 62 */
62 function responsivenessMetric(histograms, model, opt_options) { 63 function responsivenessMetric(histograms, model, opt_options) {
63 var responseNumeric = new tr.v.Histogram('response latency', 64 var responseNumeric = new tr.v.Histogram('response latency',
64 tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, 65 tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 146
146 tr.metrics.MetricRegistry.register(responsivenessMetric, { 147 tr.metrics.MetricRegistry.register(responsivenessMetric, {
147 supportsRangeOfInterest: true 148 supportsRangeOfInterest: true
148 }); 149 });
149 150
150 return { 151 return {
151 responsivenessMetric, 152 responsivenessMetric,
152 }; 153 };
153 }); 154 });
154 </script> 155 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/power_metric.html ('k') | tracing/tracing/metrics/system_health/utils.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698