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

Side by Side Diff: utils/tests/string_encoding/benchmark_runner.dart

Issue 46673003: Remove uses of Options from utils directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « utils/testrunner/utils.dart ('k') | utils/tests/string_encoding/utf8_benchmarks.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of BenchmarkTests; 5 part of BenchmarkTests;
6 6
7 /** 7 /**
8 * The results of a single block of tests (count times run, overall time). 8 * The results of a single block of tests (count times run, overall time).
9 */ 9 */
10 class BlockSample { 10 class BlockSample {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 } 190 }
191 191
192 String id; 192 String id;
193 String desc; 193 String desc;
194 List<BlockSample> warmup; 194 List<BlockSample> warmup;
195 List<BlockSample> results; 195 List<BlockSample> results;
196 } 196 }
197 197
198 class Runner { 198 class Runner {
199 static List<String> arguments; // Set by main.
200
199 static bool runTest(String testId) { 201 static bool runTest(String testId) {
200 Options opts = new Options(); 202 return arguments.length == 0 ||
201 return opts.arguments.length == 0 || 203 arguments.any((String id) => id == testId);
202 opts.arguments.any((String id) => id == testId);
203 } 204 }
204 } 205 }
205 206
206 /** 207 /**
207 * Run traditional blocking-style tests. Tests may be run a specified number 208 * Run traditional blocking-style tests. Tests may be run a specified number
208 * of times, or they can be run based on performance to estimate a particular 209 * of times, or they can be run based on performance to estimate a particular
209 * duration. 210 * duration.
210 */ 211 */
211 class BenchmarkRunner extends Runner { 212 class BenchmarkRunner extends Runner {
212 static void runCount(String id, String desc, CountTestConfig config, 213 static void runCount(String id, String desc, CountTestConfig config,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 _(TestReport r) => r.printReport() : reportHandler; 451 _(TestReport r) => r.printReport() : reportHandler;
451 } 452 }
452 453
453 Function _reportHandler; 454 Function _reportHandler;
454 Function get reportHandler => _reportHandler; 455 Function get reportHandler => _reportHandler;
455 int _warmup; 456 int _warmup;
456 int _targetTimeMs; 457 int _targetTimeMs;
457 int _minSampleTimeMs; 458 int _minSampleTimeMs;
458 int _blocksize; 459 int _blocksize;
459 } 460 }
OLDNEW
« no previous file with comments | « utils/testrunner/utils.dart ('k') | utils/tests/string_encoding/utf8_benchmarks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698