From 7b819f9629d2649b6cc7eda55b53861a9bd18f8c Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Mon, 16 Dec 2019 14:26:18 -0800 Subject: [PATCH 1/3] Added some documentation for gauge. --- packages/gauge/lib/commands/ioscpugpu/new.dart | 1 + packages/gauge/lib/commands/ioscpugpu/parse.dart | 1 + packages/gauge/lib/parser.dart | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/packages/gauge/lib/commands/ioscpugpu/new.dart b/packages/gauge/lib/commands/ioscpugpu/new.dart index c53b5d14c1be..dc7da01f76d4 100644 --- a/packages/gauge/lib/commands/ioscpugpu/new.dart +++ b/packages/gauge/lib/commands/ioscpugpu/new.dart @@ -8,6 +8,7 @@ import 'dart:io'; import 'package:gauge/commands/base.dart'; import 'package:gauge/parser.dart'; +/// See also: [IosCpuGpu] class IosCpuGpuNew extends IosCpuGpuSubcommand { IosCpuGpuNew() { argParser.addOption( diff --git a/packages/gauge/lib/commands/ioscpugpu/parse.dart b/packages/gauge/lib/commands/ioscpugpu/parse.dart index 15295f63c7f9..ba4cc086883d 100644 --- a/packages/gauge/lib/commands/ioscpugpu/parse.dart +++ b/packages/gauge/lib/commands/ioscpugpu/parse.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:gauge/commands/base.dart'; import 'package:gauge/parser.dart'; +/// See also: [IosCpuGpu] class IosCpuGpuParse extends IosCpuGpuSubcommand { @override String get name => 'parse'; diff --git a/packages/gauge/lib/parser.dart b/packages/gauge/lib/parser.dart index c1b168799fa9..d1cc7be95cac 100644 --- a/packages/gauge/lib/parser.dart +++ b/packages/gauge/lib/parser.dart @@ -5,6 +5,9 @@ import 'dart:convert'; import 'dart:io'; +/// Class that represents the CPU and GPU usage percentage. +/// +/// See also: [IosTraceParser.parseCpuGpu] class CpuGpuResult { CpuGpuResult(this.gpuPercentage, this.cpuPercentage); @@ -25,7 +28,12 @@ class CpuGpuResult { } } +/// Parser that distills the output from TraceUtility. +/// +/// See also: https://github.com/Qusic/TraceUtility class IosTraceParser { + /// Creates a [IosTraceParser] that runs the TraceUtility executable at + /// [traceUtilityPath], verbosely if [isVerbose] is true. IosTraceParser(this.isVerbose, this.traceUtilityPath); final bool isVerbose; @@ -35,6 +43,8 @@ class IosTraceParser { List _gpuMeasurements; List _cpuMeasurements; + /// Runs TraceUtility on the file at [filename] and parses the output for the + /// process named [processName] that is needed for [CpuGpuResult]. CpuGpuResult parseCpuGpu(String filename, String processName) { final ProcessResult result = Process.runSync( traceUtilityPath, From 3a1e11f3cf070a3dece936757b04fc54b12a65de Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Wed, 18 Dec 2019 15:26:17 -0800 Subject: [PATCH 2/3] Removed special analysis options --- .cirrus.yml | 3 +-- packages/gauge/analysis_options.yaml | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 packages/gauge/analysis_options.yaml diff --git a/.cirrus.yml b/.cirrus.yml index 0eb22c138a80..d3c2581a1780 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -11,8 +11,7 @@ task: activate_script: pub global activate flutter_plugin_tools matrix: - name: analyze - # TODO(goderbauer): remove custom-analysis once gauge has proper API docs. - script: ./script/incremental_build.sh analyze --custom-analysis gauge + script: ./script/incremental_build.sh analyze - name: publishable script: ./script/check_publish.sh depends_on: diff --git a/packages/gauge/analysis_options.yaml b/packages/gauge/analysis_options.yaml deleted file mode 100644 index d9742aba00c1..000000000000 --- a/packages/gauge/analysis_options.yaml +++ /dev/null @@ -1,6 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: -linter: - rules: - public_member_api_docs: false # TODO(goderbauer): enable when package is ready. From 1df7a3ababeb6786341dc5f19571e91e073a3a94 Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Wed, 18 Dec 2019 15:29:48 -0800 Subject: [PATCH 3/3] Revert "Removed special analysis options" This reverts commit 3a1e11f3cf070a3dece936757b04fc54b12a65de. --- .cirrus.yml | 3 ++- packages/gauge/analysis_options.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 packages/gauge/analysis_options.yaml diff --git a/.cirrus.yml b/.cirrus.yml index d3c2581a1780..0eb22c138a80 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -11,7 +11,8 @@ task: activate_script: pub global activate flutter_plugin_tools matrix: - name: analyze - script: ./script/incremental_build.sh analyze + # TODO(goderbauer): remove custom-analysis once gauge has proper API docs. + script: ./script/incremental_build.sh analyze --custom-analysis gauge - name: publishable script: ./script/check_publish.sh depends_on: diff --git a/packages/gauge/analysis_options.yaml b/packages/gauge/analysis_options.yaml new file mode 100644 index 000000000000..d9742aba00c1 --- /dev/null +++ b/packages/gauge/analysis_options.yaml @@ -0,0 +1,6 @@ +include: ../../analysis_options.yaml + +analyzer: +linter: + rules: + public_member_api_docs: false # TODO(goderbauer): enable when package is ready.