OLD | NEW |
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 Loading... |
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> |
OLD | NEW |