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

Unified Diff: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart

Issue 801543002: Rework instrumentation API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean-up Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
index 0fba1fbb0596cb293cc62ef49a1932fceea8655c..bcb86ccb7c48ddc0cbddcd83f0842c8456e14f9e 100644
--- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
+++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -88,9 +88,9 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
final IOSink _output;
/**
- * The instrumentation server that is to be used by this analysis server.
+ * The instrumentation service that is to be used by this analysis server.
*/
- final InstrumentationServer instrumentationServer;
+ final InstrumentationService instrumentationService;
/**
* Completer that will be signalled when the input stream is closed.
@@ -113,7 +113,8 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
*/
bool _closeRequested = false;
- ByteStreamServerChannel(this.input, this._output, this.instrumentationServer);
+ ByteStreamServerChannel(this.input, this._output,
+ this.instrumentationService);
/**
* Future that will be completed when the input stream is closed.
@@ -161,7 +162,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
String jsonEncoding = JSON.encode(notification.toJson());
ServerCommunicationChannel.ToJson.stop();
_outputLine(jsonEncoding);
- instrumentationServer.log(jsonEncoding);
+ instrumentationService.logNotification(jsonEncoding);
}
@override
@@ -175,7 +176,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
String jsonEncoding = JSON.encode(response.toJson());
ServerCommunicationChannel.ToJson.stop();
_outputLine(jsonEncoding);
- instrumentationServer.log(jsonEncoding);
+ instrumentationService.logResponse(jsonEncoding);
}
/**
@@ -233,7 +234,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
if (_closed.isCompleted) {
return;
}
- instrumentationServer.log(data);
+ instrumentationService.logRequest(data);
// Parse the string as a JSON descriptor and process the resulting
// structure as a request.
ServerCommunicationChannel.FromJson.start();
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/channel/web_socket_channel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698