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

Side by Side Diff: pkg/dev_compiler/test/codegen/BenchmarkBase.dart

Issue 2957593002: Spelling fixes e to i. (Closed)
Patch Set: Created 3 years, 6 months 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
OLDNEW
1 // Copyright 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 2
3 library BenchmarkBase; 3 library BenchmarkBase;
4 4
5 class Expect { 5 class Expect {
6 static void equals(var expected, var actual) { 6 static void equals(var expected, var actual) {
7 if (expected != actual) { 7 if (expected != actual) {
8 throw "Values not equal: $expected vs $actual"; 8 throw "Values not equal: $expected vs $actual";
9 } 9 }
10 } 10 }
(...skipping 20 matching lines...) Expand all
31 31
32 // The benchmark code. 32 // The benchmark code.
33 // This function is not used, if both [warmup] and [exercise] are overwritten. 33 // This function is not used, if both [warmup] and [exercise] are overwritten.
34 void run() {} 34 void run() {}
35 35
36 // Runs a short version of the benchmark. By default invokes [run] once. 36 // Runs a short version of the benchmark. By default invokes [run] once.
37 void warmup() { 37 void warmup() {
38 run(); 38 run();
39 } 39 }
40 40
41 // Exercices the benchmark. By default invokes [run] 10 times. 41 // Exercises the benchmark. By default invokes [run] 10 times.
42 void exercise() { 42 void exercise() {
43 for (int i = 0; i < 10; i++) { 43 for (int i = 0; i < 10; i++) {
44 run(); 44 run();
45 } 45 }
46 } 46 }
47 47
48 // Not measured setup code executed prior to the benchmark runs. 48 // Not measured setup code executed prior to the benchmark runs.
49 void setup() {} 49 void setup() {}
50 50
51 // Not measures teardown code executed after the benchmark runs. 51 // Not measures teardown code executed after the benchmark runs.
(...skipping 28 matching lines...) Expand all
80 }, 2000); 80 }, 2000);
81 teardown(); 81 teardown();
82 return result; 82 return result;
83 } 83 }
84 84
85 void report() { 85 void report() {
86 double score = measure(); 86 double score = measure();
87 print("$name(RunTime): $score us."); 87 print("$name(RunTime): $score us.");
88 } 88 }
89 } 89 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/src/js_ast/builder.dart ('k') | pkg/dev_compiler/tool/input_sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698