anchor.diff:  import 'metrics_util.dart';
   import 'visitors.dart';
   
  +// TODO(jwren) have the analysis root and verbose option be configurable via a
  +//  command line UX
   main() async {
  -  var analysisRoots = [''];
  -  await _computeCompletionMetrics(
  -      PhysicalResourceProvider.INSTANCE, analysisRoots);
  +  await CompletionMetricsComputer('', true).computeCompletionMetrics();
   }
   
  -/// When enabled, expected, but missing completion tokens will be printed to
  -/// stdout.
  -const bool _doPrintMissingCompletions = true;
  +/// This is the main metrics computer class for code completions. After the
  +/// object is constructed, [computeCompletionMetrics] is executed to do analysis
  +/// and print a summary of the metrics gathered from the completion tests.
  +class CompletionMetricsComputer {
  +  /// The analysis root path that this CompletionMetrics class will be computed.
  +  final String _rootPath;
   
  -/// TODO(jwren) put the following methods into a class
  -Future _computeCompletionMetrics(
  -    ResourceProvider resourceProvider, List<String> analysisRoots) async {
  -  int includedCount = 0;
  -  int notIncludedCount = 0;
  -  Counter completionKindCounter = Counter('completion kind counter');
  -  Counter completionElementKindCounter =
  -      Counter('completion element kind counter');
  +  /// When enabled, expected, but missing completion tokens will be printed to
  +  /// stdout.
  +  final bool _verbose;
   
  -  for (var root in analysisRoots) {
  -    print('Analyzing root: \"$root\"');
  +  CompletionMetricsComputer(this._rootPath, this._verbose);
   
  -    if (!io.Directory(root).existsSync()) {
  +  Future computeCompletionMetrics() async {
  +    int includedCount = 0;
  +    int notIncludedCount = 0;
  +    var completionKindCounter = Counter('completion kind counter');
  +    var completionElementKindCounter =
  +        Counter('completion element kind counter');
  +
  +    print('Analyzing root: \"$_rootPath\"');
  +
  +    if (!io.Directory(_rootPath).existsSync()) {
         print('\tError: No such directory exists on this machine.\n');
  -      continue;
  +      return;
       }
   
       final collection = AnalysisContextCollection(
  -      includedPaths: [root],
  -      resourceProvider: resourceProvider,
  +      includedPaths: [_rootPath],
  +      resourceProvider: PhysicalResourceProvider.INSTANCE,
       );
   
       for (var context in collection.contexts) {
  -      var declarationsTracker =
  -          DeclarationsTracker(MemoryByteStore(), resourceProvider);
  +      var declarationsTracker = DeclarationsTracker(
  +          MemoryByteStore(), PhysicalResourceProvider.INSTANCE);
         declarationsTracker.addContext(context);
   
         while (declarationsTracker.hasWork) {
  
positive.code: import 'package:analysis_server/src/status/pages.dart';
  import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
  import 'package:analyzer/dart/analysis/results.dart';
  import 'package:analyzer/file_system/file_system.dart';
  import 'package:analyzer/file_system/physical_file_system.dart';
  import 'package:analyzer/src/dart/analysis/byte_store.dart';
  import 'package:analyzer/src/generated/engine.dart';
  
negative.code:                 includedCount++;
                } else {
                  notIncludedCount++;
                  if (_verbose) {
                    // The format "/file/path/foo.dart:3:4" makes for easier input
                    // with the Files dialog in IntelliJ
                    print(
  