MetricPoint: canonical format of metricsMetricSource: where we can readMetricPoint(e.g., cocoon once we implement the translation from cocoon format toMetricPointformat)MetricDestination: where we can writeMetricPoint.FlutterCenter: the current implementation of metrics center. It has two centralMetricSourceandMetricDestinationknown asFlutterSourceandFlutterDestination. TheFlutterSourceandFlutterDestinationshare the same data so what's written intoFlutterDestinationcan be read fromFlutterSource. It also has several other sources and destinations. As a center, it can- Let benchmarks directly write metrics into the central
FlutterDestination. (Currently done by engine benchmarks.) - Automatically pull new metrics from other sources and store them in the
central
FlutterDestination. (Will be done by cocoon.) - Automatically push new metrics from the central
FlutterSourceinto other destinations. (Currently done withSkiaPerfDestination.)
- Let benchmarks directly write metrics into the central
-
Run post-submit test jobs in GKE containers managed by Cirrus. Generate and write metrics into the metrics center datastore in the canonical format
MetricPoint. Seebuild_and_benchmark_linux_releasetask in ".cirrus.yml".- Run benchmarks to generate
txt_benchmark.json - Run "parse_and_send.dart" to parse
txt_benchmark.jsonand turn Google benchmarks format into our canonical formatMetricPoint, and write it into a GCP datastore (metrics center datastore).parse_and_send.dartrelied onmetrics_centerpackage for format translation, GCP authentication, and datastore transactions. See "pubspec.yaml".MetricPointis defined in "common.dart" of metrics_center package.- The translation is defined in GoogleBenchmarksParser.
- GCP authentication is done by providing json crendentials
which also specifies which GCP project is used. In Cirrus, we used an environment variable encrypted/decrypted by Cirrus so it's not exposed in the open source code.
FlutterDestination.makeFromCredentialsJson(someJson) - When the translation finished generating
pointsand the authentication finished generatingdestination, simply callawait destination.update(points)to writepointsinto the datastore.
- Run benchmarks to generate
-
Run
FlutterCenter.synchronizeto transform all new metrics from the metrics center datastore into Skia perf format, and write them into the GCS bucket required by Skia perf.- Currently
synchronizeis run from a standalone script "run_flutter_center.dart" in a GCE instance. We plan to move it to a GAE handler in cocoon for better logging and error reporting. - In
synchronize,FlutterCenterfirst pulls new metrics from other sources and writes them into the metrics center datastore. Currently, there's no other source. In the future, we'll make cocoon datastore as the other source sosynchronizewould pull data from cocoon, translating its format to canonical formatMetricPoint, and write them into the metrics center datastore. (Cocoon datastore and metric center datastore can be the same.) - Then
FlutterCenterwrites all newMetricPointfrom the metrics center datastore, and push them to other destinations. Currently, there's only one other destinationSkiaPerfDestination. SkiaPerfDestination would do all the translations and adaptations to make sure that Skia perf can pick up the metrics. - Timestamps are properly managed so only new metrics are synchronized without duplications.
- Currently