anchor.diff:          // Build after "edit" without clean should be faster than first build
           final Map<String, dynamic> compileAfterEditDebug = await _compileDebug(
             clean: false,
  +          deleteGradleCache: false,
             metricKey: 'debug_compile_after_edit_millis',
           );
           metrics.addAll(compileAfterEditDebug);
  
positive.code:     }
  
      metrics.addAll(<String, dynamic>{
        'release_full_compile_millis': watch.elapsedMilliseconds,
        'release_size_bytes': releaseSizeInBytes,
      });
  
      return metrics;
    }
  
    static Future<Map<String, dynamic>> _compileDebug({
      required bool clean,
      required String metricKey,
    }) async {
      if (clean) {
        await flutter('clean');
      }
      final Stopwatch watch = Stopwatch();
      final List<String> options = <String>['--debug'];
  
negative.code:     return inDirectory<TaskResult>(testDirectory, () async {
        await flutter('packages', options: <String>['get']);
  
        // "initial" compile required downloading and creating the `android/.gradle` directory while "full"
        // compiles only run `flutter clean` between runs.
        final Map<String, dynamic> compileInitialRelease = await _compileApp(deleteGradleCache: true);
        final Map<String, dynamic> compileFullRelease = await _compileApp(deleteGradleCache: false);
        final Map<String, dynamic> compileInitialDebug = await _compileDebug(
          clean: true,
          deleteGradleCache: true,
          metricKey: 'debug_initial_compile_millis',
        );
        final Map<String, dynamic> compileFullDebug = await _compileDebug(
          clean: true,
          deleteGradleCache: false,
          metricKey: 'debug_full_compile_millis',
        );
        // Build again without cleaning, should be faster.
        final Map<String, dynamic> compileSecondDebug = await _compileDebug(
          clean: false,
          deleteGradleCache: false,
          metricKey: 'debug_second_compile_millis',
        );
  
        final Map<String, dynamic> metrics = <String, dynamic>{
          ...compileInitialRelease,
          ...compileFullRelease,
          ...compileInitialDebug,
          ...compileFullDebug,
          ...compileSecondDebug,
        };
  
  