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

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

Issue 2532053005: Store library paths relative to a given application root folder. (Closed)
Patch Set: Revert changes to testcase baseline 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') | 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) 2016, the Dart project authors. Please see the AUTHORS file 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 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 import 'dart:io'; 5 import 'dart:io';
6 import 'package:analyzer/src/context/cache.dart'; 6 import 'package:analyzer/src/context/cache.dart';
7 import 'package:analyzer/task/model.dart'; 7 import 'package:analyzer/task/model.dart';
8 import 'package:args/args.dart'; 8 import 'package:args/args.dart';
9 import 'package:kernel/analyzer/loader.dart'; 9 import 'package:kernel/analyzer/loader.dart';
10 import 'package:kernel/kernel.dart'; 10 import 'package:kernel/kernel.dart';
(...skipping 27 matching lines...) Expand all
38 if (options.rest.length != 1) { 38 if (options.rest.length != 1) {
39 print('Exactly one file must be given'); 39 print('Exactly one file must be given');
40 exit(1); 40 exit(1);
41 } 41 }
42 42
43 String sdk = options['sdk']; 43 String sdk = options['sdk'];
44 String packagePath = options['packages']; 44 String packagePath = options['packages'];
45 bool strongMode = options['strong']; 45 bool strongMode = options['strong'];
46 46
47 String path = options.rest.single; 47 String path = options.rest.single;
48 var uri = new Uri(scheme: 'file', path: new File(path).absolute.path);
48 var packages = 49 var packages =
49 getPackagesDirectory(new Uri(scheme: 'file', path: packagePath)); 50 getPackagesDirectory(new Uri(scheme: 'file', path: packagePath));
50 Repository repository = new Repository(); 51 Repository repository = new Repository();
51 52
52 new DartLoader( 53 new DartLoader(
53 repository, 54 repository,
54 new DartOptions( 55 new DartOptions(
55 strongMode: strongMode, sdk: sdk, packagePath: packagePath), 56 strongMode: strongMode, sdk: sdk, packagePath: packagePath),
56 packages) 57 packages)
57 .loadProgram(path); 58 .loadProgram(uri);
58 59
59 CacheEntry.recomputedCounts.forEach((key, value) { 60 CacheEntry.recomputedCounts.forEach((key, value) {
60 print('Recomputed $key $value times'); 61 print('Recomputed $key $value times');
61 }); 62 });
62 63
63 AnalysisTask.stopwatchMap.forEach((key, Stopwatch watch) { 64 AnalysisTask.stopwatchMap.forEach((key, Stopwatch watch) {
64 print('$key took ${watch.elapsedMilliseconds} ms'); 65 print('$key took ${watch.elapsedMilliseconds} ms');
65 }); 66 });
66 } 67 }
OLDNEW
« no previous file with comments | « pkg/kernel/test/baseline_tester.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698