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,