Unverified Commit acdd9206 authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Improve message when saving compilation training data. (#26084)

parent 31ed3e5f
...@@ -602,8 +602,12 @@ abstract class ResidentRunner { ...@@ -602,8 +602,12 @@ abstract class ResidentRunner {
for (FlutterDevice device in flutterDevices) { for (FlutterDevice device in flutterDevices) {
for (FlutterView view in device.views) { for (FlutterView view in device.views) {
final int index = device.views.indexOf(view); final int index = device.views.indexOf(view);
printStatus('Saving compilation training file for ' final File outputFile = fs.currentDirectory
'${device.device.name}${index == 0 ? '' :'/Isolate$index'}...'); .childFile('compilation${index == 0 ? '' : index}.txt');
printStatus('Saving compilation training data '
'for ${device.device.name}${index == 0 ? '' :'/Isolate$index'} '
'to ${fs.path.relative(outputFile.path)}...');
List<int> buffer; List<int> buffer;
try { try {
...@@ -614,12 +618,8 @@ abstract class ResidentRunner { ...@@ -614,12 +618,8 @@ abstract class ResidentRunner {
continue; continue;
} }
final File outputFile = fs.currentDirectory
.childFile('compilation${index == 0 ? '' : index}.txt');
outputFile.parent.createSync(recursive: true); outputFile.parent.createSync(recursive: true);
outputFile.writeAsBytesSync(buffer); outputFile.writeAsBytesSync(buffer);
printStatus('Compilation training written to ${fs.path.relative(outputFile.path)}.');
} }
} }
} }
......
...@@ -147,7 +147,7 @@ class ColdRunner extends ResidentRunner { ...@@ -147,7 +147,7 @@ class ColdRunner extends ResidentRunner {
} }
if (haveDetails && !details) { if (haveDetails && !details) {
if (saveCompilationTrace) { if (saveCompilationTrace) {
printStatus('Runtime compilation trace will be saved when flutter run quits...'); printStatus('Compilation training data will be saved when flutter run quits...');
} }
printStatus('For a more detailed help message, press "h". To quit, press "q".'); printStatus('For a more detailed help message, press "h". To quit, press "q".');
} else if (haveAnything) { } else if (haveAnything) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment