| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 src.domain_diagnostic; | 5 library analysis_server.src.domain_diagnostic; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core' hide Resource; | 9 import 'dart:core' hide Resource; |
| 10 | 10 |
| 11 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 11 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 12 import 'package:analysis_server/src/analysis_server.dart'; | 12 import 'package:analysis_server/src/analysis_server.dart'; |
| 13 import 'package:analysis_server/src/utilities/average.dart'; | 13 import 'package:analysis_server/src/utilities/average.dart'; |
| 14 import 'package:analyzer/file_system/file_system.dart'; | 14 import 'package:analyzer/file_system/file_system.dart'; |
| 15 import 'package:analyzer/src/context/cache.dart'; | 15 import 'package:analyzer/src/context/cache.dart'; |
| 16 import 'package:analyzer/src/context/context.dart'; | 16 import 'package:analyzer/src/context/context.dart'; |
| 17 import 'package:analyzer/src/generated/engine.dart' | 17 import 'package:analyzer/src/generated/engine.dart'; |
| 18 hide AnalysisCache, AnalysisContextImpl; | |
| 19 import 'package:analyzer/src/generated/source.dart'; | 18 import 'package:analyzer/src/generated/source.dart'; |
| 20 import 'package:analyzer/src/generated/utilities_collection.dart'; | 19 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| 21 import 'package:analyzer/src/task/driver.dart'; | 20 import 'package:analyzer/src/task/driver.dart'; |
| 22 import 'package:analyzer/task/model.dart'; | 21 import 'package:analyzer/task/model.dart'; |
| 23 | 22 |
| 24 int _workItemCount(AnalysisContextImpl context) { | 23 int _workItemCount(AnalysisContextImpl context) { |
| 25 AnalysisDriver driver = context.driver; | 24 AnalysisDriver driver = context.driver; |
| 26 List<WorkItem> items = driver.currentWorkOrder?.workItems; | 25 List<WorkItem> items = driver.currentWorkOrder?.workItems; |
| 27 return items?.length ?? 0; | 26 return items?.length ?? 0; |
| 28 } | 27 } |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 averages[folder] = average; | 180 averages[folder] = average; |
| 182 } | 181 } |
| 183 average.addSample(_workItemCount(context)); | 182 average.addSample(_workItemCount(context)); |
| 184 } | 183 } |
| 185 }); | 184 }); |
| 186 } on Exception { | 185 } on Exception { |
| 187 stop(); | 186 stop(); |
| 188 } | 187 } |
| 189 } | 188 } |
| 190 } | 189 } |
| OLD | NEW |