create build directory for startup trace if missing (#5589)
This commit is contained in:
@@ -155,9 +155,14 @@ class Tracing {
|
|||||||
Future<Null> downloadStartupTrace(VMService observatory) async {
|
Future<Null> downloadStartupTrace(VMService observatory) async {
|
||||||
File traceInfoFile = new File('build/start_up_info.json');
|
File traceInfoFile = new File('build/start_up_info.json');
|
||||||
|
|
||||||
|
// Delete old startup data, if any.
|
||||||
if (await traceInfoFile.exists())
|
if (await traceInfoFile.exists())
|
||||||
await traceInfoFile.delete();
|
await traceInfoFile.delete();
|
||||||
|
|
||||||
|
// Create "build" directory, if missing.
|
||||||
|
if (!(await traceInfoFile.parent.exists()))
|
||||||
|
await traceInfoFile.parent.create();
|
||||||
|
|
||||||
Tracing tracing = new Tracing(observatory);
|
Tracing tracing = new Tracing(observatory);
|
||||||
|
|
||||||
Map<String, dynamic> timeline = await tracing.stopTracingAndDownloadTimeline(
|
Map<String, dynamic> timeline = await tracing.stopTracingAndDownloadTimeline(
|
||||||
|
|||||||
Reference in New Issue
Block a user