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

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

Issue 859513002: send priority instrumentation message on startup with version info (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and address comments Created 5 years, 11 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 | Annotate | Revision Log
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 instrumentation; 5 library instrumentation;
6 6
7 /** 7 /**
8 * A container with analysis performance constants. 8 * A container with analysis performance constants.
9 */ 9 */
10 class AnalysisPerformanceKind { 10 class AnalysisPerformanceKind {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 /** 173 /**
174 * Log that a response has been sent to the client. 174 * Log that a response has been sent to the client.
175 */ 175 */
176 void logResponse(String response) { 176 void logResponse(String response) {
177 _log(TAG_RESPONSE, response); 177 _log(TAG_RESPONSE, response);
178 } 178 }
179 179
180 /** 180 /**
181 * Signal that the client has started analysis server.
182 * This method should be invoked exactly one time.
183 */
184 void logVersion(String uuid, String clientId, String clientVersion,
185 String serverVersion, String sdkVersion) {
186
187 String normalize(String value) =>
188 value != null && value.length > 0 ? value : 'unknown';
189
190 if (_instrumentationServer != null) {
191 _instrumentationServer.logWithPriority(
192 _join(
193 [
194 TAG_VERSION,
195 uuid,
196 normalize(clientId),
197 normalize(clientVersion),
198 serverVersion,
199 sdkVersion]));
200 }
201 }
202
203 /**
181 * Signal that the client is done communicating with the instrumentation 204 * Signal that the client is done communicating with the instrumentation
182 * server. This method should be invoked exactly one time and no other methods 205 * server. This method should be invoked exactly one time and no other methods
183 * should be invoked on this instance after this method has been invoked. 206 * should be invoked on this instance after this method has been invoked.
184 */ 207 */
185 void shutdown() { 208 void shutdown() {
186 if (_instrumentationServer != null) { 209 if (_instrumentationServer != null) {
187 _instrumentationServer.shutdown(); 210 _instrumentationServer.shutdown();
188 _instrumentationServer = null; 211 _instrumentationServer = null;
189 } 212 }
190 } 213 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 287 }
265 } 288 }
266 289
267 @override 290 @override
268 void shutdown() { 291 void shutdown() {
269 for (InstrumentationServer server in _servers) { 292 for (InstrumentationServer server in _servers) {
270 server.shutdown(); 293 server.shutdown();
271 } 294 }
272 } 295 }
273 } 296 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/server/driver.dart ('k') | pkg/analyzer/test/instrumentation/instrumentation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698