mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[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:
parent
b54a95b0bb
commit
912ae8230f
|
@ -5,18 +5,21 @@
|
||||||
import 'package:benchmark_harness/benchmark_harness.dart';
|
import 'package:benchmark_harness/benchmark_harness.dart';
|
||||||
|
|
||||||
class Example extends BenchmarkBase {
|
class Example extends BenchmarkBase {
|
||||||
const Example() : super("Example");
|
const Example() : super('Example');
|
||||||
|
|
||||||
// The benchmark code.
|
// The benchmark code.
|
||||||
|
@override
|
||||||
void run() {}
|
void run() {}
|
||||||
|
|
||||||
// Not measured setup code executed prior to the benchmark runs.
|
// Not measured setup code executed prior to the benchmark runs.
|
||||||
|
@override
|
||||||
void setup() {}
|
void setup() {}
|
||||||
|
|
||||||
// Not measures teardown code executed after the benchark runs.
|
// Not measures teardown code executed after the benchark runs.
|
||||||
|
@override
|
||||||
void teardown() {}
|
void teardown() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
const Example().report();
|
const Example().report();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,18 +5,21 @@
|
||||||
import 'package:benchmark_harness/benchmark_harness.dart';
|
import 'package:benchmark_harness/benchmark_harness.dart';
|
||||||
|
|
||||||
class Example extends BenchmarkBase {
|
class Example extends BenchmarkBase {
|
||||||
const Example() : super("Example");
|
const Example() : super('Example');
|
||||||
|
|
||||||
// The benchmark code.
|
// The benchmark code.
|
||||||
|
@override
|
||||||
void run() {}
|
void run() {}
|
||||||
|
|
||||||
// Not measured setup code executed prior to the benchmark runs.
|
// Not measured setup code executed prior to the benchmark runs.
|
||||||
|
@override
|
||||||
void setup() {}
|
void setup() {}
|
||||||
|
|
||||||
// Not measures teardown code executed after the benchark runs.
|
// Not measures teardown code executed after the benchark runs.
|
||||||
|
@override
|
||||||
void teardown() {}
|
void teardown() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
const Example().report();
|
const Example().report();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue