anchor.diff:  import 'package:analyzer/src/generated/source_io.dart';
   import 'package:package_config/discovery.dart';
   
  -/// Cummulative total number of chars scanned.
  +/// Cumulative total number of chars scanned.
   int scanTotalChars = 0;
   
  -/// Cummulative time spent scanning.
  +/// Cumulative time spent scanning.
   Stopwatch scanTimer = new Stopwatch();
   
   /// Factory to load and resolve app, packages, and sdk sources.
   SourceFactory sources;
   
  -main(args) {
  +main(List<String> args) async {
     // TODO(sigmund): provide sdk folder as well.
  -  if (args.length < 3) {
  -    print('usage: perf.dart <bench-id> <package-root> <entry.dart>');
  +  if (args.length < 2) {
  +    print('usage: perf.dart <bench-id> <entry.dart>');
       exit(1);
     }
     var totalTimer = new Stopwatch()..start();
   
     var bench = args[0];
  -  var packageRoot = Uri.base.resolve(args[1]);
  -  var entryUri = Uri.base.resolve(args[2]);
  -
  -  setup(packageRoot);
  +  var entryUri = Uri.base.resolve(args[1]);
  +
  +  await setup(entryUri);
  +
     if (bench == 'scan') {
  -    scanReachableFiles(entryUri);
  +    Set<Source> files = scanReachableFiles(entryUri);
  +    // TODO(sigmund): consider replacing the warmup with instrumented snapshots.
  +    for (int i = 0; i < 10; i++) scanFiles(files);
     } else if (bench == 'parse') {
       Set<Source> files = scanReachableFiles(entryUri);
  -    parseFiles(files);
  +    // TODO(sigmund): consider replacing the warmup with instrumented snapshots.
  +    for (int i = 0; i < 10; i++) parseFiles(files);
     } else {
       print('unsupported bench-id: $bench. Please specify "scan" or "parse"');
       // TODO(sigmund): implement the remaining benchmarks.
  
positive.code:   report("load", loadTime);
    report("scan", scanTimer.elapsedMicroseconds);
    return files;
  }
  
  /// Parses every file in [files] and reports the time spent doing so.
  
negative.code: /// An entrypoint used to run portions of analyzer and measure its performance.
  library analyzer_cli.tool.perf;
  
  import 'dart:async';
  import 'dart:io' show exit;
  
  import 'package:analyzer/dart/ast/ast.dart';
  