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

Side by Side Diff: frog/tests/bigtest.dart

Issue 9310010: Fix a few remaining issues from moving swarm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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('../lang.dart'); 5 #import('../lang.dart');
6 6
7 // TODO(jimhug): Turn this into proper benchmark! 7 // TODO(jimhug): Turn this into proper benchmark!
8 8
9 // TODO(jimhug): This is BROKEN with the move to experimental - will fix. 9 // TODO(jimhug): This is BROKEN with the move to experimental - will fix.
10 10
11 /** Path to starting library or application. */ 11 /** Path to starting library or application. */
12 final String ROOT = '../client/samples/swarm/swarm.dart'; 12 final String ROOT = '../samples/swarm/swarm.dart';
13 13
14 /** Path to core library. */ 14 /** Path to core library. */
15 final String CORE = 'lib/corelib.dart'; 15 final String CORE = 'lib/corelib.dart';
16 16
17 void main() { 17 void main() {
18 var t0 = Clock.now(); 18 var t0 = Clock.now();
19 initializeWorld(CORE); 19 initializeWorld(CORE);
20 world.getOrAddLibrary(ROOT); 20 world.getOrAddLibrary(ROOT);
21 world.process(); 21 world.process();
22 var t1 = Clock.now(); 22 var t1 = Clock.now();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 final lps = (lines - lines0) / totalTime; 72 final lps = (lines - lines0) / totalTime;
73 if (totalTime > 0.1) { 73 if (totalTime > 0.1) {
74 print('${source.filename} parsed in ${totalTime}sec, $lps lines/sec'); 74 print('${source.filename} parsed in ${totalTime}sec, $lps lines/sec');
75 } 75 }
76 } 76 }
77 77
78 final t1 = Clock.now(); 78 final t1 = Clock.now();
79 final totalTime = (t1 - t0) / Clock.frequency(); 79 final totalTime = (t1 - t0) / Clock.frequency();
80 final lps = lines/totalTime; 80 final lps = lines/totalTime;
81 print('${diet ? "diet " : ""}parsed $lines lines in $totalTime sec, $lps lines /sec'); 81 print('${diet ? "diet " : ""}parsed $lines lines in $totalTime sec, $lps lines /sec');
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698