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

Side by Side Diff: tests/standalone/io/code_collection_test.dart

Issue 259693004: Fix GC triggering test by limiting its initial heap growth. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Dart test program testing code GC. 5 // Dart test program testing code GC.
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 42
43 main(List<String> arguments) { 43 main(List<String> arguments) {
44 if (arguments.contains("--run")) { 44 if (arguments.contains("--run")) {
45 doTest(); 45 doTest();
46 } else { 46 } else {
47 // Run the test and capture stdout. 47 // Run the test and capture stdout.
48 var pr = Process.runSync(Platform.executable, 48 var pr = Process.runSync(Platform.executable,
49 ["--collect-code", 49 ["--collect-code",
50 "--code-collection-interval-in-us=100000", 50 "--code-collection-interval-in-us=100000",
51 "--heap_growth_rate=10",
51 "--log-code-drop", 52 "--log-code-drop",
52 "--optimization-counter-threshold=-1", 53 "--optimization-counter-threshold=-1",
53 "--package-root=${Platform.packageRoot}", 54 "--package-root=${Platform.packageRoot}",
54 Platform.script.toFilePath(), 55 Platform.script.toFilePath(),
55 "--run"]); 56 "--run"]);
56 57
57 // Code drops are logged with --log-code-drop. Look through stdout for the 58 // Code drops are logged with --log-code-drop. Look through stdout for the
58 // message that foo's code was dropped. 59 // message that foo's code was dropped.
59 var found = false; 60 var found = false;
60 pr.stdout.split("\n").forEach((line) { 61 pr.stdout.split("\n").forEach((line) {
61 if (line.contains("Detaching code") && line.contains("foo")) { 62 if (line.contains("Detaching code") && line.contains("foo")) {
62 found = true; 63 found = true;
63 } 64 }
64 }); 65 });
65 Expect.isTrue(found); 66 Expect.isTrue(found);
66 } 67 }
67 } 68 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698