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

Side by Side Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 1906543002: Remove a couple of unnecessary is checks (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months 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 | pkg/analyzer/lib/src/context/context.dart » ('j') | 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 analyzer.instrumentation.instrumentation; 5 library analyzer.instrumentation.instrumentation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:analyzer/task/model.dart'; 10 import 'package:analyzer/task/model.dart';
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 * The current time, expressed as a decimal encoded number of milliseconds. 99 * The current time, expressed as a decimal encoded number of milliseconds.
100 */ 100 */
101 String get _timestamp => new DateTime.now().millisecondsSinceEpoch.toString(); 101 String get _timestamp => new DateTime.now().millisecondsSinceEpoch.toString();
102 102
103 /** 103 /**
104 * Log that the given analysis [task] is being performed in the given 104 * Log that the given analysis [task] is being performed in the given
105 * [context]. 105 * [context].
106 */ 106 */
107 void logAnalysisTask(String context, AnalysisTask task) { 107 void logAnalysisTask(String context, AnalysisTask task) {
108 if (_instrumentationServer != null) { 108 if (_instrumentationServer != null) {
109 String description =
110 (task is AnalysisTask) ? task.description : task.toString();
111 _instrumentationServer 109 _instrumentationServer
112 .log(_join([TAG_ANALYSIS_TASK, context, description])); 110 .log(_join([TAG_ANALYSIS_TASK, context, task.description]));
113 } 111 }
114 } 112 }
115 113
116 /** 114 /**
117 * Log the fact that an error, described by the given [message], has occurred. 115 * Log the fact that an error, described by the given [message], has occurred.
118 */ 116 */
119 void logError(String message) { 117 void logError(String message) {
120 _log(TAG_ERROR, message); 118 _log(TAG_ERROR, message);
121 } 119 }
122 120
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 369 }
372 } 370 }
373 371
374 @override 372 @override
375 Future shutdown() async { 373 Future shutdown() async {
376 for (InstrumentationServer server in _servers) { 374 for (InstrumentationServer server in _servers) {
377 await server.shutdown(); 375 await server.shutdown();
378 } 376 }
379 } 377 }
380 } 378 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698