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

Side by Side Diff: pkg/analysis_server/test/timing/timing_framework.dart

Issue 709493002: Fix 'Unused local variable' hints in analyzer and analysis_server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 test.timing; 5 library test.timing;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:math'; 9 import 'dart:math';
10 10
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 /** 199 /**
200 * Shut the server down unless [skipShutdown] is `true`. 200 * Shut the server down unless [skipShutdown] is `true`.
201 */ 201 */
202 Future _shutdownIfNeeded() { 202 Future _shutdownIfNeeded() {
203 if (skipShutdown) { 203 if (skipShutdown) {
204 return new Future.value(); 204 return new Future.value();
205 } 205 }
206 // Give the server a short time to comply with the shutdown request; if it 206 // Give the server a short time to comply with the shutdown request; if it
207 // doesn't exit, then forcibly terminate it. 207 // doesn't exit, then forcibly terminate it.
208 Completer processExited = new Completer();
209 sendServerShutdown(); 208 sendServerShutdown();
210 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () { 209 return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
211 return server.kill(); 210 return server.kill();
212 }); 211 });
213 } 212 }
214 } 213 }
215 214
216 /** 215 /**
217 * Instances of the class [TimingResult] represent the timing information 216 * Instances of the class [TimingResult] represent the timing information
218 * gathered while executing a given timing test. 217 * gathered while executing a given timing test.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 */ 310 */
312 List<int> toMilliseconds(List<int> times) { 311 List<int> toMilliseconds(List<int> times) {
313 int count = times.length; 312 int count = times.length;
314 List<int> convertedValues = new List<int>(); 313 List<int> convertedValues = new List<int>();
315 for (int i = 0; i < count; i++) { 314 for (int i = 0; i < count; i++) {
316 convertedValues.add(times[i] ~/ NANOSECONDS_PER_MILLISECOND); 315 convertedValues.add(times[i] ~/ NANOSECONDS_PER_MILLISECOND);
317 } 316 }
318 return convertedValues; 317 return convertedValues;
319 } 318 }
320 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698