File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1335,6 +1335,21 @@ class CompileTest {
13351335 ...compileSecondDebug,
13361336 };
13371337
1338+ final File mainDart = File ('$testDirectory /lib/main.dart' );
1339+ if (mainDart.existsSync ()) {
1340+ final List <int > bytes = mainDart.readAsBytesSync ();
1341+ // "Touch" the file
1342+ mainDart.writeAsStringSync (' ' , mode: FileMode .append, flush: true );
1343+ // Build after "edit" without clean should be faster than first build
1344+ final Map <String , dynamic > compileAfterEditDebug = await _compileDebug (
1345+ clean: false ,
1346+ metricKey: 'debug_compile_after_edit_millis' ,
1347+ );
1348+ metrics.addAll (compileAfterEditDebug);
1349+ // Revert the changes
1350+ mainDart.writeAsBytesSync (bytes, flush: true );
1351+ }
1352+
13381353 return TaskResult .success (metrics, benchmarkScoreKeys: metrics.keys.toList ());
13391354 });
13401355 }
You can’t perform that action at this time.
0 commit comments