[benchmark] Migrate Example benchmark to be null safe.

Analyzer lints are fixed while here.

TBR=whesse@google.com

Change-Id: I4e43d9b356608c5cb885f008fb232ea2390b9dd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151840
Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
Jonas Termansen 2020-06-23 08:41:19 +00:00 committed by William Hesse
parent b54a95b0bb
commit 912ae8230f
2 changed files with 10 additions and 4 deletions

View file

@ -5,18 +5,21 @@
import 'package:benchmark_harness/benchmark_harness.dart';
class Example extends BenchmarkBase {
const Example() : super("Example");
const Example() : super('Example');
// The benchmark code.
@override
void run() {}
// Not measured setup code executed prior to the benchmark runs.
@override
void setup() {}
// Not measures teardown code executed after the benchark runs.
@override
void teardown() {}
}
main() {
void main() {
const Example().report();
}

View file

@ -5,18 +5,21 @@
import 'package:benchmark_harness/benchmark_harness.dart';
class Example extends BenchmarkBase {
const Example() : super("Example");
const Example() : super('Example');
// The benchmark code.
@override
void run() {}
// Not measured setup code executed prior to the benchmark runs.
@override
void setup() {}
// Not measures teardown code executed after the benchark runs.
@override
void teardown() {}
}
main() {
void main() {
const Example().report();
}