| 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 2953701525d1a2f54fc159b5039bf9b825cc99e4..0fba1fbb0596cb293cc62ef49a1932fceea8655c 100644
|
| --- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| +++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| @@ -10,6 +10,7 @@ import 'dart:io';
|
|
|
| import 'package:analysis_server/src/channel/channel.dart';
|
| import 'package:analysis_server/src/protocol.dart';
|
| +import 'package:analyzer/instrumentation/instrumentation.dart';
|
|
|
| /**
|
| * Instances of the class [ByteStreamClientChannel] implement a
|
| @@ -87,6 +88,11 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| final IOSink _output;
|
|
|
| /**
|
| + * The instrumentation server that is to be used by this analysis server.
|
| + */
|
| + final InstrumentationServer instrumentationServer;
|
| +
|
| + /**
|
| * Completer that will be signalled when the input stream is closed.
|
| */
|
| final Completer _closed = new Completer();
|
| @@ -107,7 +113,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| */
|
| bool _closeRequested = false;
|
|
|
| - ByteStreamServerChannel(this.input, this._output);
|
| + ByteStreamServerChannel(this.input, this._output, this.instrumentationServer);
|
|
|
| /**
|
| * Future that will be completed when the input stream is closed.
|
| @@ -155,6 +161,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| String jsonEncoding = JSON.encode(notification.toJson());
|
| ServerCommunicationChannel.ToJson.stop();
|
| _outputLine(jsonEncoding);
|
| + instrumentationServer.log(jsonEncoding);
|
| }
|
|
|
| @override
|
| @@ -168,6 +175,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| String jsonEncoding = JSON.encode(response.toJson());
|
| ServerCommunicationChannel.ToJson.stop();
|
| _outputLine(jsonEncoding);
|
| + instrumentationServer.log(jsonEncoding);
|
| }
|
|
|
| /**
|
| @@ -225,6 +233,7 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| if (_closed.isCompleted) {
|
| return;
|
| }
|
| + instrumentationServer.log(data);
|
| // Parse the string as a JSON descriptor and process the resulting
|
| // structure as a request.
|
| ServerCommunicationChannel.FromJson.start();
|
|
|