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

Side by Side Diff: runtime/vm/snapshot_test.dart

Issue 2850783002: Dart SDK Spelling b, c, and d. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « runtime/vm/redundancy_elimination.cc ('k') | runtime/vm/stub_code_x64.cc » ('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 import 'dart:isolate'; 5 import 'dart:isolate';
6 import 'dart:async'; 6 import 'dart:async';
7 7
8 class Expect { 8 class Expect {
9 static void equals(x, y) { 9 static void equals(x, y) {
10 if (x != y) throw new ArgumentError('not equal'); 10 if (x != y) throw new ArgumentError('not equal');
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 // Exercices the benchmark. By default invokes [run] 10 times. 724 // Exercices the benchmark. By default invokes [run] 10 times.
725 void exercise() { 725 void exercise() {
726 for (int i = 0; i < 10; i++) { 726 for (int i = 0; i < 10; i++) {
727 run(); 727 run();
728 } 728 }
729 } 729 }
730 730
731 // Not measured setup code executed prior to the benchmark runs. 731 // Not measured setup code executed prior to the benchmark runs.
732 void setup() {} 732 void setup() {}
733 733
734 // Not measures teardown code executed after the benchark runs. 734 // Not measures teardown code executed after the benchmark runs.
735 void teardown() {} 735 void teardown() {}
736 736
737 // Measures the score for this benchmark by executing it repeately until 737 // Measures the score for this benchmark by executing it repeately until
738 // time minimum has been reached. 738 // time minimum has been reached.
739 static double measureFor(Function f, int timeMinimum) { 739 static double measureFor(Function f, int timeMinimum) {
740 int time = 0; 740 int time = 0;
741 int iter = 0; 741 int iter = 0;
742 DateTime start = new DateTime.now(); 742 DateTime start = new DateTime.now();
743 while (time < timeMinimum) { 743 while (time < timeMinimum) {
744 f(); 744 f();
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 void processLines() { 1542 void processLines() {
1543 port.receive((message, SendPort replyTo) { 1543 port.receive((message, SendPort replyTo) {
1544 if (message == TERMINATION_MESSAGE) { 1544 if (message == TERMINATION_MESSAGE) {
1545 assert(replyTo == null); 1545 assert(replyTo == null);
1546 port.close(); 1546 port.close();
1547 } else { 1547 } else {
1548 replyTo.send(processLine(message), null); 1548 replyTo.send(processLine(message), null);
1549 } 1549 }
1550 }); 1550 });
1551 } 1551 }
OLDNEW
« no previous file with comments | « runtime/vm/redundancy_elimination.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698