OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library services.completion.manager; | |
6 | |
7 import 'package:analyzer/src/generated/source.dart'; | 5 import 'package:analyzer/src/generated/source.dart'; |
8 | 6 |
9 /** | 7 /** |
10 * Overall performance of a code completion operation. | 8 * Overall performance of a code completion operation. |
11 */ | 9 */ |
12 class CompletionPerformance { | 10 class CompletionPerformance { |
13 final DateTime start = new DateTime.now(); | 11 final DateTime start = new DateTime.now(); |
14 final Map<String, Duration> _startTimes = new Map<String, Duration>(); | 12 final Map<String, Duration> _startTimes = new Map<String, Duration>(); |
15 final Stopwatch _stopwatch = new Stopwatch(); | 13 final Stopwatch _stopwatch = new Stopwatch(); |
16 final List<OperationPerformance> operations = <OperationPerformance>[]; | 14 final List<OperationPerformance> operations = <OperationPerformance>[]; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 */ | 108 */ |
111 final String name; | 109 final String name; |
112 | 110 |
113 /** | 111 /** |
114 * The elapse time or `null` if undefined. | 112 * The elapse time or `null` if undefined. |
115 */ | 113 */ |
116 final Duration elapsed; | 114 final Duration elapsed; |
117 | 115 |
118 OperationPerformance(this.name, this.elapsed); | 116 OperationPerformance(this.name, this.elapsed); |
119 } | 117 } |
OLD | NEW |