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

Side by Side Diff: pkg/kernel/test/class_hierarchy_membench.dart

Issue 2896613003: Update cli description for a couple of benchmarks. (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 | « pkg/kernel/test/class_hierarchy_bench.dart ('k') | 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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 import 'package:kernel/kernel.dart'; 5 import 'package:kernel/kernel.dart';
6 import 'package:kernel/class_hierarchy.dart'; 6 import 'package:kernel/class_hierarchy.dart';
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'class_hierarchy_basic.dart'; 8 import 'class_hierarchy_basic.dart';
9 import 'dart:io'; 9 import 'dart:io';
10 10
11 ArgParser argParser = new ArgParser() 11 ArgParser argParser = new ArgParser()
12 ..addFlag('basic', help: 'Measure the basic implementation', negatable: false) 12 ..addFlag('basic', help: 'Measure the basic implementation', negatable: false)
13 ..addOption('count', 13 ..addOption('count',
14 abbr: 'c', 14 abbr: 'c',
15 help: 'Build N copies of the class hierarchy', 15 help: 'Build N copies of the class hierarchy',
16 defaultsTo: '300'); 16 defaultsTo: '300');
17 17
18 String usage = """ 18 String usage = """
19 Usage: class_hierarchy_membench [options] FILE.dart 19 Usage: class_hierarchy_membench [options] FILE.dill
20 20
21 Options: 21 Options:
22 ${argParser.usage} 22 ${argParser.usage}
23 """; 23 """;
24 24
25 /// Builds N copies of the class hierarchy for the given program. 25 /// Builds N copies of the class hierarchy for the given program.
26 /// Pass --print-metrics to the Dart VM to measure the memory use. 26 /// Pass --print-metrics to the Dart VM to measure the memory use.
27 main(List<String> args) { 27 main(List<String> args) {
28 if (args.length == 0) { 28 if (args.length == 0) {
29 print(usage); 29 print(usage);
(...skipping 25 matching lines...) Expand all
55 55
56 if (args.contains('-v')) { 56 if (args.contains('-v')) {
57 // Use of the list for something to avoid premature GC. 57 // Use of the list for something to avoid premature GC.
58 int size = 0; 58 int size = 0;
59 for (var classHierarchy in keepAlive) { 59 for (var classHierarchy in keepAlive) {
60 size += classHierarchy.getSuperTypeHashTableSize(); 60 size += classHierarchy.getSuperTypeHashTableSize();
61 } 61 }
62 print(size); 62 print(size);
63 } 63 }
64 } 64 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/class_hierarchy_bench.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698