update TimelineStream in flutter_driver (#64258)

This commit is contained in:
Ming Lyu (CareF)
2020-08-20 18:01:10 -04:00
committed by GitHub
parent abbd5b149a
commit c8c575c894
2 changed files with 6 additions and 1 deletions

View File

@@ -41,6 +41,9 @@ enum TimelineStream {
/// Marks events from the Dart VM's JIT compiler.
compiler,
/// The verbose version of compiler.
compilerVerbose,
/// Marks events emitted using the `dart:developer` API.
dart,

View File

@@ -651,13 +651,15 @@ Future<VMServiceClientConnection> _waitAndConnect(
/// the VM service.
const Duration _kPauseBetweenReconnectAttempts = Duration(seconds: 1);
// See https://github.com/dart-lang/sdk/blob/master/runtime/vm/timeline.cc#L32
// See `timeline_streams` in
// https://github.com/dart-lang/sdk/blob/master/runtime/vm/timeline.cc
String _timelineStreamsToString(List<TimelineStream> streams) {
final String contents = streams.map<String>((TimelineStream stream) {
switch (stream) {
case TimelineStream.all: return 'all';
case TimelineStream.api: return 'API';
case TimelineStream.compiler: return 'Compiler';
case TimelineStream.compilerVerbose: return 'CompilerVerbose';
case TimelineStream.dart: return 'Dart';
case TimelineStream.debugger: return 'Debugger';
case TimelineStream.embedder: return 'Embedder';