Some fixes for the microbenchmarks (#7781)

* Return null from VM.mainView if no view exists
* Retry in connectToServiceProtocol if a view is not yet available
* Do not explicitly call exit from the benchmarks - it will not cleanly shut down the engine
This commit is contained in:
Jason Simmons
2017-02-01 11:54:27 -08:00
committed by GitHub
parent fe01c71cf4
commit 59cacd7102
6 changed files with 10 additions and 11 deletions

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'package:flutter/gestures.dart';
import 'data/velocity_tracker_data.dart';
@@ -33,5 +32,4 @@ void main() {
name: 'velocity_tracker_iteration',
);
printer.printToStdout();
exit(0);
}

View File

@@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/material.dart';
@@ -102,6 +101,4 @@ Future<Null> main() async {
name: 'stock_animation_subsequent_frame_average',
);
printer.printToStdout();
exit(0);
}

View File

@@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/material.dart';
@@ -47,5 +46,4 @@ Future<Null> main() async {
name: 'stock_build_iteration',
);
printer.printToStdout();
exit(0);
}

View File

@@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/material.dart';
@@ -46,5 +45,4 @@ Future<Null> main() async {
name: 'stock_layout_iteration',
);
printer.printToStdout();
exit(0);
}