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

Side by Side Diff: runtime/bin/vmservice/observatory/test/gc_script.dart

Issue 434763002: Add VMService GC events (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library gc_script;
6
7 import 'dart:async';
8 import 'dart:io';
9
10 List<int> data;
11
12 void grow(int iterations, int size, Duration duration) {
13 if (iterations <= 0) {
14 return;
15 }
16 data = new List<int>(size);
17 new Timer(duration, () => grow(iterations - 1, size, duration));
18 }
19
20
21 main() {
22 print(''); // Print blank line to signal that we are ready.
23
24 grow(100, 1 << 24, new Duration(seconds: 1));
25
26 // Wait until signaled from spawning test.
27 stdin.first.then((_) => exit(0));
28 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/service/object.dart ('k') | runtime/bin/vmservice/observatory/test/gc_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698