@@ -29,75 +29,57 @@ void _printColumn(StringBuffer sb, String text, int keyLen,
2929 sb.writeCharCode (SPACE );
3030}
3131
32- /**
33- * [Driver] launches and manages an instance of analysis server,
34- * reads a stream of operations, sends requests to analysis server
35- * based upon those operations, and evaluates the results.
36- */
32+ /// [Driver] launches and manages an instance of analysis server,
33+ /// reads a stream of operations, sends requests to analysis server
34+ /// based upon those operations, and evaluates the results.
3735class Driver extends IntegrationTestMixin {
38- /**
39- * The amount of time to give the server to respond to a shutdown request
40- * before forcibly terminating it.
41- */
36+ /// The amount of time to give the server to respond to a shutdown request
37+ /// before forcibly terminating it.
4238 static const Duration SHUTDOWN_TIMEOUT = Duration (seconds: 5 );
4339
4440 final Logger logger = Logger ('Driver' );
4541
46- /**
47- * The diagnostic port for Analysis Server or `null` if none.
48- */
42+ /// The diagnostic port for Analysis Server or `null` if none.
4943 final int diagnosticPort;
5044
51- /**
52- * A flag indicating whether the server is running.
53- */
45+ /// A flag indicating whether the server is running.
5446 bool running = false ;
5547
5648 @override
5749 Server server;
5850
59- /**
60- * The results collected while running analysis server.
61- */
51+ /// The results collected while running analysis server.
6252 final Results results = Results ();
6353
6454 /// The [Completer] for [runComplete] .
6555 final Completer <Results > _runCompleter = Completer <Results >();
6656
6757 Driver ({this .diagnosticPort});
6858
69- /**
70- * Return a [Future] that completes with the [Results] of running
71- * the analysis server once all operations have been performed.
72- */
59+ /// Return a [Future] that completes with the [Results] of running
60+ /// the analysis server once all operations have been performed.
7361 Future <Results > get runComplete => _runCompleter.future;
7462
75- /**
76- * Perform the given operation.
77- * Return a [Future] that completes when the next operation can be performed,
78- * or `null` if the next operation can be performed immediately
79- */
63+ /// Perform the given operation.
64+ /// Return a [Future] that completes when the next operation can be performed,
65+ /// or `null` if the next operation can be performed immediately
8066 Future perform (Operation op) {
8167 return op.perform (this );
8268 }
8369
84- /**
85- * Send a command to the server. An 'id' will be automatically assigned.
86- * The returned [Future] will be completed when the server acknowledges the
87- * command with a response. If the server acknowledges the command with a
88- * normal (non-error) response, the future will be completed with the 'result'
89- * field from the response. If the server acknowledges the command with an
90- * error response, the future will be completed with an error.
91- */
70+ /// Send a command to the server. An 'id' will be automatically assigned.
71+ /// The returned [Future] will be completed when the server acknowledges the
72+ /// command with a response. If the server acknowledges the command with a
73+ /// normal (non-error) response, the future will be completed with the
74+ /// 'result' field from the response. If the server acknowledges the command
75+ /// with an error response, the future will be completed with an error.
9276 Future <Map <String , dynamic >> send (
9377 String method, Map <String , dynamic > params) {
9478 return server.send (method, params);
9579 }
9680
97- /**
98- * Launch the analysis server.
99- * Return a [Future] that completes when analysis server has started.
100- */
81+ /// Launch the analysis server.
82+ /// Return a [Future] that completes when analysis server has started.
10183 Future startServer () async {
10284 logger.log (Level .FINE , 'starting server' );
10385 initializeInttestMixin ();
@@ -121,9 +103,7 @@ class Driver extends IntegrationTestMixin {
121103 });
122104 }
123105
124- /**
125- * Shutdown the analysis server if it is running.
126- */
106+ /// Shutdown the analysis server if it is running.
127107 Future stopServer ([Duration timeout = SHUTDOWN_TIMEOUT ]) async {
128108 if (running) {
129109 logger.log (Level .FINE , 'requesting server shutdown' );
@@ -137,19 +117,15 @@ class Driver extends IntegrationTestMixin {
137117 _resultsReady ();
138118 }
139119
140- /**
141- * If not already complete, signal the completer with the collected results.
142- */
120+ /// If not already complete, signal the completer with the collected results.
143121 void _resultsReady () {
144122 if (! _runCompleter.isCompleted) {
145123 _runCompleter.complete (results);
146124 }
147125 }
148126}
149127
150- /**
151- * [Measurement] tracks elapsed time for a given operation.
152- */
128+ /// [Measurement] tracks elapsed time for a given operation.
153129class Measurement {
154130 final String tag;
155131 final bool notification;
@@ -218,16 +194,12 @@ class Measurement {
218194 }
219195}
220196
221- /**
222- * [Results] contains information gathered by [Driver]
223- * while running the analysis server
224- */
197+ /// [Results] contains information gathered by [Driver]
198+ /// while running the analysis server
225199class Results {
226200 Map <String , Measurement > measurements = < String , Measurement > {};
227201
228- /**
229- * Display results on stdout.
230- */
202+ /// Display results on stdout.
231203 void printResults () {
232204 print ('' );
233205 print ('==================================================================' );
@@ -266,9 +238,7 @@ class Results {
266238(2) all times in milliseconds''' );
267239 }
268240
269- /**
270- * Record the elapsed time for the given operation.
271- */
241+ /// Record the elapsed time for the given operation.
272242 void record (String tag, Duration elapsed,
273243 {bool notification = false , bool success = true }) {
274244 Measurement measurement = measurements[tag];
0 commit comments