| 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 analysis.server; | 5 library analysis.server; |
| 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 import 'dart:io' as io; |
| 10 import 'dart:math' show max; | 11 import 'dart:math' show max; |
| 11 | 12 |
| 12 import 'package:analysis_server/plugin/protocol/protocol.dart' | 13 import 'package:analysis_server/plugin/protocol/protocol.dart' |
| 13 hide AnalysisOptions, Element; | 14 hide AnalysisOptions, Element; |
| 14 import 'package:analysis_server/src/analysis_logger.dart'; | 15 import 'package:analysis_server/src/analysis_logger.dart'; |
| 15 import 'package:analysis_server/src/channel/channel.dart'; | 16 import 'package:analysis_server/src/channel/channel.dart'; |
| 16 import 'package:analysis_server/src/context_manager.dart'; | 17 import 'package:analysis_server/src/context_manager.dart'; |
| 17 import 'package:analysis_server/src/operation/operation.dart'; | 18 import 'package:analysis_server/src/operation/operation.dart'; |
| 18 import 'package:analysis_server/src/operation/operation_analysis.dart'; | 19 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
| 19 import 'package:analysis_server/src/operation/operation_queue.dart'; | 20 import 'package:analysis_server/src/operation/operation_queue.dart'; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 _onPriorityChangeController = | 358 _onPriorityChangeController = |
| 358 new StreamController<PriorityChangeEvent>.broadcast(); | 359 new StreamController<PriorityChangeEvent>.broadcast(); |
| 359 running = true; | 360 running = true; |
| 360 onAnalysisStarted.first.then((_) { | 361 onAnalysisStarted.first.then((_) { |
| 361 onAnalysisComplete.then((_) { | 362 onAnalysisComplete.then((_) { |
| 362 performanceAfterStartup = new ServerPerformance(); | 363 performanceAfterStartup = new ServerPerformance(); |
| 363 _performance = performanceAfterStartup; | 364 _performance = performanceAfterStartup; |
| 364 }); | 365 }); |
| 365 }); | 366 }); |
| 366 _setupIndexInvalidation(); | 367 _setupIndexInvalidation(); |
| 368 String pid = io.pid.toString(); |
| 367 Notification notification = | 369 Notification notification = |
| 368 new ServerConnectedParams(VERSION).toNotification(); | 370 new ServerConnectedParams(VERSION, pid).toNotification(); |
| 369 channel.sendNotification(notification); | 371 channel.sendNotification(notification); |
| 370 channel.listen(handleRequest, onDone: done, onError: error); | 372 channel.listen(handleRequest, onDone: done, onError: error); |
| 371 handlers = serverPlugin.createDomains(this); | 373 handlers = serverPlugin.createDomains(this); |
| 372 } | 374 } |
| 373 | 375 |
| 374 /** | 376 /** |
| 375 * Return the [AnalysisContext]s that are being used to analyze the analysis | 377 * Return the [AnalysisContext]s that are being used to analyze the analysis |
| 376 * roots. | 378 * roots. |
| 377 */ | 379 */ |
| 378 Iterable<AnalysisContext> get analysisContexts => | 380 Iterable<AnalysisContext> get analysisContexts => |
| (...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 /** | 1752 /** |
| 1751 * The [PerformanceTag] for time spent in server request handlers. | 1753 * The [PerformanceTag] for time spent in server request handlers. |
| 1752 */ | 1754 */ |
| 1753 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1755 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1754 | 1756 |
| 1755 /** | 1757 /** |
| 1756 * The [PerformanceTag] for time spent in split store microtasks. | 1758 * The [PerformanceTag] for time spent in split store microtasks. |
| 1757 */ | 1759 */ |
| 1758 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1760 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1759 } | 1761 } |
| OLD | NEW |