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 <link rel="import" href="/tracing/base/base.html"> | 7 <link rel="import" href="/tracing/base/base.html"> |
8 <link rel="import" href="/tracing/base/extension_registry.html"> | 8 <link rel="import" href="/tracing/base/extension_registry.html"> |
9 <link rel="import" href="/tracing/base/iteration_helpers.html"> | 9 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 } catch (error) { | 37 } catch (error) { |
38 return error.stack; | 38 return error.stack; |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 function getPathsFromStack(stack) { | 42 function getPathsFromStack(stack) { |
43 return stack.split('\n').map(line => { | 43 return stack.split('\n').map(line => { |
44 line = line.replace(/^ */, '').split(':'); | 44 line = line.replace(/^ */, '').split(':'); |
45 if (line.length < 4) return ''; | 45 if (line.length < 4) return ''; |
46 return line[line.length - 3].split('/'); | 46 return line[line.length - 3].split('/'); |
47 }).filter(tr.b.identity); | 47 }).filter(x => x); |
48 } | 48 } |
49 | 49 |
50 MetricRegistry.checkFilename = function(metricName, opt_metricPathForTest) { | 50 MetricRegistry.checkFilename = function(metricName, opt_metricPathForTest) { |
51 if (metricName === 'runtimeStatsTotalMetric' || | 51 if (metricName === 'runtimeStatsTotalMetric' || |
52 metricName === 'v8AndMemoryMetrics') { | 52 metricName === 'v8AndMemoryMetrics') { |
53 // TODO(crbug.com/688342) Remove the runtimeStatsTotalMetric exception. | 53 // TODO(crbug.com/688342) Remove the runtimeStatsTotalMetric exception. |
54 // TODO(3275) Remove the v8AndMemoryMetrics exception. | 54 // TODO(3275) Remove the v8AndMemoryMetrics exception. |
55 // https://github.com/catapult-project/catapult/issues/3275 | 55 // https://github.com/catapult-project/catapult/issues/3275 |
56 return; | 56 return; |
57 } | 57 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 104 } |
105 | 105 |
106 MetricRegistry.checkFilename(metric.name); | 106 MetricRegistry.checkFilename(metric.name); |
107 }); | 107 }); |
108 | 108 |
109 return { | 109 return { |
110 MetricRegistry, | 110 MetricRegistry, |
111 }; | 111 }; |
112 }); | 112 }); |
113 </script> | 113 </script> |
OLD | NEW |