Add Web Benchmarks for Flutter Gallery (Flutter Side) — 1/4 (#57576)

This commit is contained in:
Tianguang
2020-06-24 19:28:03 +02:00
committed by GitHub
parent 5d61bff294
commit 02f8e02880
6 changed files with 419 additions and 48 deletions

View File

@@ -99,6 +99,13 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
profileData.complete(collectedProfiles);
return Response.notFound('Finished running benchmarks.');
}
} else if (request.requestedUri.path.endsWith('/print-to-console')) {
// A passthrough used by
// `dev/benchmarks/macrobenchmarks/lib/web_benchmarks.dart`
// to print information.
final String message = await request.readAsString();
print('[Gallery] $message');
return Response.ok('Reported.');
} else {
return Response.notFound(
'This request is not handled by the profile-data handler.');