anchor.diff:  /// 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';
  
positive.code: import 'package:analyzer/src/generated/source_io.dart';
  import 'package:package_config/discovery.dart';
  
  /// Cummulative total number of chars scanned.
  int scanTotalChars = 0;
  
  /// Cummulative time spent scanning.
  Stopwatch scanTimer = new Stopwatch();
  
  /// Factory to load and resolve app, packages, and sdk sources.
  SourceFactory sources;
  
  main(args) {
    // TODO(sigmund): provide sdk folder as well.
    if (args.length < 3) {
      print('usage: perf.dart <bench-id> <package-root> <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);
    if (bench == 'scan') {
      scanReachableFiles(entryUri);
    } else if (bench == 'parse') {
      Set<Source> files = scanReachableFiles(entryUri);
      parseFiles(files);
    } else {
      print('unsupported bench-id: $bench. Please specify "scan" or "parse"');
      // TODO(sigmund): implement the remaining benchmarks.
  
negative.code:   var files = new Set<Source>();
    var loadTimer = new Stopwatch()..start();
    collectSources(sources.forUri2(entryUri), files);
  
    var libs = [
      "dart:async",
      "dart:collection",
      "dart:convert",
      "dart:core",
      "dart:developer",
      "dart:_internal",
      "dart:isolate",
      "dart:math",
      "dart:mirrors",
      "dart:typed_data",
      "dart:io"
    ];
  
    for (var lib in libs) {
      collectSources(sources.forUri(lib), files);
    }
  
    loadTimer.stop();
  
    print('input size: ${scanTotalChars} chars');
  