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

Unified Diff: frog/tests/bigtest.dart

Issue 10548047: Remove frog from the repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move test and update apidoc.gyp. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/tests/await/while_normalization_test.dart ('k') | frog/tests/canvastest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tests/bigtest.dart
diff --git a/frog/tests/bigtest.dart b/frog/tests/bigtest.dart
deleted file mode 100644
index b8b32a1e74a6b61fb415455eb360c91ebc70ee8d..0000000000000000000000000000000000000000
--- a/frog/tests/bigtest.dart
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#import('../lang.dart');
-
-// TODO(jimhug): Turn this into proper benchmark!
-
-// TODO(jimhug): This is BROKEN with the move to experimental - will fix.
-
-/** Path to starting library or application. */
-final String ROOT = '../samples/swarm/swarm.dart';
-
-/** Path to core library. */
-final String CORE = 'lib/corelib.dart';
-
-void main() {
- var t0 = Clock.now();
- initializeWorld(CORE);
- world.getOrAddLibrary(ROOT);
- world.process();
- var t1 = Clock.now();
- print ('first pass in ${(t1 - t0) / Clock.frequency()}secs');
-
- testTokenize(world.sourcefiles);
- testParse(world.sourcefiles, true);
- testParse(world.sourcefiles, false);
-
- world.resolveAll();
-}
-
-void testTokenize(List<String> files) {
- int count = 0;
- final t0 = Clock.now();
-
- for (var source in files) {
- final tokenizer = new Tokenizer(source, true);
-
- while (true) {
- final tok = tokenizer.next();
- if (tok.kind == TokenKind.ERROR) {
- print(source.getLocationMessage('error ${tok}', tok.start, tok.end));
- }
- count += 1;
- if (tok.kind == TokenKind.END_OF_FILE) break;
- }
- }
-
- final t1 = Clock.now();
- final totalTime = (t1 - t0) / Clock.frequency();
- final tps = count / totalTime;
- print('$count tokens in $totalTime secs, $tps tokens/sec');
-}
-
-void testParse(List<String> files, [bool diet=false]) {
- int lines = 0;
-
- final t0 = Clock.now();
-
- for (var source in files) {
- final t00 = Clock.now();
- var p = new Parser(source, diet);
- var decl = p.compilationUnit();
- var lines0 = lines;
- lines += 1;
- var code = source.text;
- for (int i = 0; i < code.length; i++) {
- if (code.charCodeAt(i) == 10/*newline*/) lines++;
- }
- final t11 = Clock.now();
- final totalTime = (t11 - t00) / Clock.frequency();
- final lps = (lines - lines0) / totalTime;
- if (totalTime > 0.1) {
- print('${source.filename} parsed in ${totalTime}sec, $lps lines/sec');
- }
- }
-
- final t1 = Clock.now();
- final totalTime = (t1 - t0) / Clock.frequency();
- final lps = lines/totalTime;
- print('${diet ? "diet " : ""}parsed $lines lines in $totalTime sec, $lps lines/sec');
-}
« no previous file with comments | « frog/tests/await/while_normalization_test.dart ('k') | frog/tests/canvastest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698