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

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

Issue 11227042: isEven, isOdd, isNegative, isMaxValue, isMinValue, isInfinite, isPositive, isSingleValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 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
« lib/core/int.dart ('K') | « utils/pub/yaml/deep_equals.dart ('k') | no next file » | 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 /** 5 /**
6 * The results of a single block of tests (count times run, overall time). 6 * The results of a single block of tests (count times run, overall time).
7 */ 7 */
8 class BlockSample { 8 class BlockSample {
9 BlockSample(this.count, this.durationNanos); 9 BlockSample(this.count, this.durationNanos);
10 int count; 10 int count;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 String _rightAlign(String s, int width) { 176 String _rightAlign(String s, int width) {
177 List<int> outCodes = []; 177 List<int> outCodes = [];
178 outCodes.insertRange(0, width, spaceChar); 178 outCodes.insertRange(0, width, spaceChar);
179 outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length), 179 outCodes.setRange(Math.max(0, width - s.length), Math.min(width, s.length),
180 s.charCodes()); 180 s.charCodes());
181 return new String.fromCharCodes(outCodes); 181 return new String.fromCharCodes(outCodes);
182 } 182 }
183 183
184 static String _stringifyDoubleAsInt(double val) { 184 static String _stringifyDoubleAsInt(double val) {
185 if (val.isInfinite() || val.isNaN()) { 185 if (val.isInfinite || val.isNaN) {
186 return "NaN"; 186 return "NaN";
187 } else { 187 } else {
188 return val.toInt().toString(); 188 return val.toInt().toString();
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;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 _(TestReport r) => r.printReport() : reportHandler; 450 _(TestReport r) => r.printReport() : reportHandler;
451 } 451 }
452 452
453 Function _reportHandler; 453 Function _reportHandler;
454 Function get reportHandler => _reportHandler; 454 Function get reportHandler => _reportHandler;
455 int _warmup; 455 int _warmup;
456 int _targetTimeMs; 456 int _targetTimeMs;
457 int _minSampleTimeMs; 457 int _minSampleTimeMs;
458 int _blocksize; 458 int _blocksize;
459 } 459 }
OLDNEW
« lib/core/int.dart ('K') | « utils/pub/yaml/deep_equals.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698