| OLD | NEW |
| 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="/perf_insights/mappers/thread_grouping.html"> | 8 <link rel="import" href="/perf_insights/mappers/thread_grouping.html"> |
| 9 <link rel="import" href="/perf_insights/map_function.html"> | 9 <link rel="import" href="/perf_insights/map_function.html"> |
| 10 <link rel="import" href="/perf_insights/value/value.html"> | 10 <link rel="import" href="/perf_insights/value/value.html"> |
| 11 <link rel="import" href="/tracing/base/units/histogram.html"> | 11 <link rel="import" href="/tracing/base/units/histogram.html"> |
| 12 <link rel="import" href="/tracing/model/flow_event.html"> | 12 <link rel="import" href="/tracing/model/flow_event.html"> |
| 13 <link rel="import" href="/tracing/model/slice.html"> | 13 <link rel="import" href="/tracing/model/slice.html"> |
| 14 | 14 |
| 15 <script> | 15 <script> |
| 16 'use strict'; |
| 17 |
| 16 tr.exportTo('pi.m', function() { | 18 tr.exportTo('pi.m', function() { |
| 17 // Granularity of the histogram. | 19 // Granularity of the histogram. |
| 18 var HISTOGRAM_MAX = 250; | 20 var HISTOGRAM_MAX = 250; |
| 19 var NUM_BINS = 50; | 21 var NUM_BINS = 50; |
| 20 | 22 |
| 21 function taskInfoMapFunction(results, run_info, model) { | 23 function taskInfoMapFunction(results, run_info, model) { |
| 22 var threadGrouping = new pi.m.ThreadGrouping(); | 24 var threadGrouping = new pi.m.ThreadGrouping(); |
| 23 threadGrouping.autoInitUsingHelpers(model); | 25 threadGrouping.autoInitUsingHelpers(model); |
| 24 addTimeInQueue(results, run_info, model, threadGrouping); | 26 addTimeInQueue(results, run_info, model, threadGrouping); |
| 25 addTopLevelTasksDuration(results, run_info, model, threadGrouping); | 27 addTopLevelTasksDuration(results, run_info, model, threadGrouping); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 113 } |
| 112 | 114 |
| 113 pi.MapFunction.register(taskInfoMapFunction); | 115 pi.MapFunction.register(taskInfoMapFunction); |
| 114 | 116 |
| 115 // Exporting for tests. | 117 // Exporting for tests. |
| 116 return { | 118 return { |
| 117 taskInfoMapFunctionForTest: taskInfoMapFunction | 119 taskInfoMapFunctionForTest: taskInfoMapFunction |
| 118 }; | 120 }; |
| 119 }); | 121 }); |
| 120 </script> | 122 </script> |
| OLD | NEW |