fire service protocol events for frames (#11565)

This commit is contained in:
Devon Carew
2017-08-21 22:12:19 -07:00
committed by GitHub
parent 5462ddb917
commit 5f9acc4125
6 changed files with 136 additions and 17 deletions

View File

@@ -473,3 +473,13 @@ String extractCloudAuthTokenArg(List<String> rawArgs) {
}
return token;
}
// "An Observatory debugger and profiler on ... is available at: http://127.0.0.1:8100/"
final RegExp _kObservatoryRegExp = new RegExp(r'An Observatory debugger .* is available at: (\S+:(\d+))');
bool lineContainsServicePort(String line) => line.contains(_kObservatoryRegExp);
int parseServicePort(String line) {
final Match match = _kObservatoryRegExp.firstMatch(line);
return match == null ? null : int.parse(match.group(2));
}