Commit b9d53279 authored by yjbanov's avatar yjbanov Committed by Yegor

perf_tests.dart: const constructors; constructors first

parent f59a6770
...@@ -83,7 +83,7 @@ TaskFunction createFlutterViewStartupTest() { ...@@ -83,7 +83,7 @@ TaskFunction createFlutterViewStartupTest() {
class StartupTest { class StartupTest {
static const Duration _startupTimeout = const Duration(minutes: 5); static const Duration _startupTimeout = const Duration(minutes: 5);
StartupTest(this.testDirectory, { this.reportMetrics: true, this.runPodInstall: false }); const StartupTest(this.testDirectory, { this.reportMetrics: true, this.runPodInstall: false });
final String testDirectory; final String testDirectory;
final bool reportMetrics; final bool reportMetrics;
...@@ -128,7 +128,7 @@ class StartupTest { ...@@ -128,7 +128,7 @@ class StartupTest {
/// performance. /// performance.
class PerfTest { class PerfTest {
PerfTest(this.testDirectory, this.testTarget, this.timelineFileName); const PerfTest(this.testDirectory, this.testTarget, this.timelineFileName);
final String testDirectory; final String testDirectory;
final String testTarget; final String testTarget;
...@@ -181,7 +181,7 @@ class PerfTest { ...@@ -181,7 +181,7 @@ class PerfTest {
/// code is. /// code is.
class BuildTest { class BuildTest {
BuildTest(this.testDirectory); const BuildTest(this.testDirectory);
final String testDirectory; final String testDirectory;
...@@ -263,7 +263,7 @@ class BuildTest { ...@@ -263,7 +263,7 @@ class BuildTest {
/// Measure application memory usage. /// Measure application memory usage.
class MemoryTest { class MemoryTest {
MemoryTest(this.testDirectory, this.packageName, { this.testTarget }); const MemoryTest(this.testDirectory, this.packageName, { this.testTarget });
final String testDirectory; final String testDirectory;
final String packageName; final String packageName;
...@@ -332,12 +332,12 @@ class MemoryTest { ...@@ -332,12 +332,12 @@ class MemoryTest {
/// Measure application memory usage after pausing and resuming the app /// Measure application memory usage after pausing and resuming the app
/// with the Android back button. /// with the Android back button.
class AndroidBackButtonMemoryTest { class AndroidBackButtonMemoryTest {
const AndroidBackButtonMemoryTest(this.testDirectory, this.packageName, this.activityName);
final String testDirectory; final String testDirectory;
final String packageName; final String packageName;
final String activityName; final String activityName;
AndroidBackButtonMemoryTest(this.testDirectory, this.packageName, this.activityName);
Future<TaskResult> call() { Future<TaskResult> call() {
return inDirectory(testDirectory, () async { return inDirectory(testDirectory, () async {
if (deviceOperatingSystem != DeviceOperatingSystem.android) { if (deviceOperatingSystem != DeviceOperatingSystem.android) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment