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

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

Issue 2283213002: Rename Histogram.add() to addSample(). (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: rebase Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 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/metrics/metric_registry.html"> 8 <link rel="import" href="/tracing/metrics/metric_registry.html">
9 <link rel="import" href="/tracing/metrics/system_health/utils.html"> 9 <link rel="import" href="/tracing/metrics/system_health/utils.html">
10 <link rel="import" href="/tracing/model/model.html"> 10 <link rel="import" href="/tracing/model/model.html">
(...skipping 27 matching lines...) Expand all
38 var domain = marker.domainId; 38 var domain = marker.domainId;
39 if (domain === tr.model.ClockDomainId.TELEMETRY) 39 if (domain === tr.model.ClockDomainId.TELEMETRY)
40 latency = (marker.endTs - marker.startTs); 40 latency = (marker.endTs - marker.startTs);
41 else 41 else
42 targetDomain = domain.toLowerCase(); 42 targetDomain = domain.toLowerCase();
43 } 43 }
44 44
45 var hist = new tr.v.Histogram( 45 var hist = new tr.v.Histogram(
46 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter, 46 tr.v.Unit.byName.timeDurationInMs_smallerIsBetter,
47 tr.v.HistogramBinBoundaries.createExponential(1e-3, 1e3, 30)); 47 tr.v.HistogramBinBoundaries.createExponential(1e-3, 1e3, 30));
48 hist.add(latency); 48 hist.addSample(latency);
49 values.addValue(new tr.v.NumericValue( 49 values.addValue(new tr.v.NumericValue(
50 'clock_sync_latency_' + targetDomain, hist, 50 'clock_sync_latency_' + targetDomain, hist,
51 {description: 'Clock sync latency for domain ' + targetDomain})); 51 {description: 'Clock sync latency for domain ' + targetDomain}));
52 } 52 }
53 }; 53 };
54 54
55 tr.metrics.MetricRegistry.register(clockSyncLatencyMetric); 55 tr.metrics.MetricRegistry.register(clockSyncLatencyMetric);
56 56
57 return { 57 return {
58 clockSyncLatencyMetric: clockSyncLatencyMetric 58 clockSyncLatencyMetric: clockSyncLatencyMetric
59 }; 59 };
60 }); 60 });
61 </script> 61 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/sample_metric.html ('k') | tracing/tracing/metrics/system_health/hazard_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698