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

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

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 years 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/baseline_tester.dart ('k') | pkg/kernel/test/parent_pointer_test_disabled.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, 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 import 'dart:io';
6 import 'package:kernel/checks.dart';
7 import 'package:kernel/kernel.dart';
8
9 final String usage = '''
10 Usage: check_bench FILE.dill
11
12 Measures the time it takes to run sanity checks on the given program.
13 ''';
14
15 main(List<String> args) {
16 if (args.length != 1) {
17 print(usage);
18 exit(1);
19 }
20 var program = loadProgramFromBinary(args[0]);
21 var watch = new Stopwatch()..start();
22 runSanityChecks(program);
23 print('Cold: ${watch.elapsedMilliseconds} ms');
24 const int warmUpTrials = 20;
25 for (int i = 0; i < warmUpTrials; ++i) {
26 runSanityChecks(program);
27 }
28 watch.reset();
29 const int numberOfTrials = 100;
30 for (int i = 0; i < numberOfTrials; ++i) {
31 runSanityChecks(program);
32 }
33 double millisecondsPerRun = watch.elapsedMilliseconds / numberOfTrials;
34 print('Hot: $millisecondsPerRun ms');
35 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/baseline_tester.dart ('k') | pkg/kernel/test/parent_pointer_test_disabled.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698