Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 1413563009: enable analysis server cmdline instrumentation log file option (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cleanup code per suggestion Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 driver; 5 library driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:math'; 9 import 'dart:math';
10 10
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 if (results[SDK_OPTION] != null) { 374 if (results[SDK_OPTION] != null) {
375 defaultSdk = new DirectoryBasedDartSdk(new JavaFile(results[SDK_OPTION])); 375 defaultSdk = new DirectoryBasedDartSdk(new JavaFile(results[SDK_OPTION]));
376 } else { 376 } else {
377 // No path to the SDK provided; use DirectoryBasedDartSdk.defaultSdk, 377 // No path to the SDK provided; use DirectoryBasedDartSdk.defaultSdk,
378 // which will make a guess. 378 // which will make a guess.
379 defaultSdk = DirectoryBasedDartSdk.defaultSdk; 379 defaultSdk = DirectoryBasedDartSdk.defaultSdk;
380 } 380 }
381 // 381 //
382 // Initialize the instrumentation service. 382 // Initialize the instrumentation service.
383 // 383 //
384 if (instrumentationServer != null) { 384 String logFilePath = results[INSTRUMENTATION_LOG_FILE];
385 String filePath = results[INSTRUMENTATION_LOG_FILE]; 385 if (logFilePath != null) {
386 if (filePath != null) { 386 FileInstrumentationServer fileBasedServer =
387 instrumentationServer = new MulticastInstrumentationServer( 387 new FileInstrumentationServer(logFilePath);
388 [instrumentationServer, new FileInstrumentationServer(filePath)]); 388 instrumentationServer = instrumentationServer != null
389 } 389 ? new MulticastInstrumentationServer(
390 [instrumentationServer, fileBasedServer])
391 : fileBasedServer;
390 } 392 }
391 InstrumentationService service = 393 InstrumentationService service =
392 new InstrumentationService(instrumentationServer); 394 new InstrumentationService(instrumentationServer);
393 service.logVersion(_readUuid(service), results[CLIENT_ID], 395 service.logVersion(_readUuid(service), results[CLIENT_ID],
394 results[CLIENT_VERSION], AnalysisServer.VERSION, defaultSdk.sdkVersion); 396 results[CLIENT_VERSION], AnalysisServer.VERSION, defaultSdk.sdkVersion);
395 AnalysisEngine.instance.instrumentationService = service; 397 AnalysisEngine.instance.instrumentationService = service;
396 // 398 //
397 // Enable the new task model, if appropriate. 399 // Enable the new task model, if appropriate.
398 // 400 //
399 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL]; 401 AnalysisEngine.instance.useTaskModel = !results[DISABLE_NEW_TASK_MODEL];
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 uuidFile.parent.createSync(recursive: true); 570 uuidFile.parent.createSync(recursive: true);
569 uuidFile.writeAsStringSync(uuid); 571 uuidFile.writeAsStringSync(uuid);
570 } catch (exception, stackTrace) { 572 } catch (exception, stackTrace) {
571 service.logPriorityException(exception, stackTrace); 573 service.logPriorityException(exception, stackTrace);
572 // Slightly alter the uuid to indicate it was not persisted 574 // Slightly alter the uuid to indicate it was not persisted
573 uuid = 'temp-$uuid'; 575 uuid = 'temp-$uuid';
574 } 576 }
575 return uuid; 577 return uuid;
576 } 578 }
577 } 579 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698