ProfileHarnessCommand class
Profile subcommand provided by HarnessCommandsMixin.
- Inheritance
- Mixed-in types
-
- ReplayHarnessMixin<
void> - ProfileHarnessMixin<
void>
- ReplayHarnessMixin<
Constructors
- ProfileHarnessCommand(String entrypointPath)
Properties
-
aliases
→ List<
String> -
Alternative names for this command.
no setterinherited
- argParser → ArgParser
-
The argument parser for this command.
no setterinherited
- argResults → ArgResults?
-
The parsed argument results for this command.
no setterinherited
- argumentCount → int
-
Number of positional arguments.
no setterinherited
-
arguments
→ List<
String> -
All positional arguments passed to this command.
no setterinherited
- category → String
-
The command's category.
no setterinherited
- description → String
-
A description of this command, included in usage.
no setteroverride
- entrypointPath → String
-
final
- globalResults → ArgResults?
-
The parsed global argument results.
no setterinherited
- harnessEntrypointPath → String
-
Path to the entrypoint Dart file to run for replay.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether or not this command should be hidden from help listings.
no setterinherited
- invocation → String
-
A single-line template for how to invoke this command (e.g.
"pub getpackage").no setteroverride - io → Console
-
Access to the I/O helper for console output.
no setterinherited
- name → String
-
The name of this command.
no setteroverride
- namespaceSeparator → String
-
Separator used to group subcommands for display.
no setterinherited
-
parent
→ Command<
void> ? -
The command's parent command, if this is a subcommand.
no setterinherited
- profileArtifactDir → String
-
no setteroverride
- profileCaptureRegions → bool
-
no setterinherited
- profileConfig → ProfileHarnessConfig?
-
no setterinherited
- profileEventPrefix → String
-
no setterinherited
- profileProfilerCommand → String
-
no setteroverride
- profileRegionName → String
-
no setteroverride
-
runner
→ CommandRunner<
void> ? -
The command runner for this command.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subcommands
→ Map<
String, Command< void> > -
An unmodifiable view of all sublevel commands of this command.
no setterinherited
-
suggestionAliases
→ List<
String> -
Alternate non-functional names for this command.
no setterinherited
- summary → String
-
A short description of this command, included in
parent'sCommandRunner.usage.no setterinherited - takesArguments → bool
-
Whether or not this command takes positional arguments in addition to
options.
no setterinherited
- usage → String
-
Generates a string displaying usage information for this command.
no setterinherited
-
An optional footer for
usage.no setterinherited
Methods
-
addSubcommand(
Command< void> command) → void -
Adds
Commandas a subcommand of this.inherited -
alert(
Object message, {Verbosity? verbosity}) → void -
Writes an alert box (Laravel-style).
inherited
-
argument(
int index) → String? -
Returns the positional argument at
index(0-based), ornullif fewer positional arguments were provided.inherited -
buildAppSpecificReplayArgs(
ReplayHarnessConfig config, String scenarioPath) → List< String> -
Override to add app-specific arguments after the entrypoint.
inherited
-
buildDevtoolsProfilerRunArgs(
ProfileHarnessConfig config, String scenarioPath) → List< String> -
inherited
-
buildProfileArgs(
ProfileHarnessConfig config, String scenarioPath) → List< String> -
Override to build profiler-specific arguments.
inherited
-
comment(
Object message, {Verbosity? verbosity}) → void -
Writes a comment message (Laravel-style).
inherited
-
customizeLeadInSleep(
ReplayHarnessConfig config, String scenarioPath, int actionCount) → Future< int> ? -
Override to customize lead-in sleep handling.
Return the final action count or use the mixin default.
inherited
-
customizeReplayEnvironment(
ReplayHarnessConfig config) → Map< String, String> ? -
Override to customize environment variables for the child process.
inherited
-
customizeReplayScenario(
ReplayScenario scenario, String scenarioPath) → Future< ReplayScenario?> -
Inject profile region start/stop events into the replay scenario.
inherited
-
defaultProfileReplayConfig(
) → ReplayHarnessConfig -
inherited
-
error(
Object message, {Verbosity? verbosity}) → void -
Writes an error message (Laravel-style).
inherited
-
executeProfile(
ReplayHarnessConfig replayConfig, ProfileHarnessConfig config) → Future< void> -
inherited
-
executeReplay(
ReplayHarnessConfig config) → Future< void> -
Execute replay using the provided configuration.
inherited
-
formatUsage(
{bool includeDescription = true}) → String -
Formats help output for this command.
inherited
-
hasOption(
String name) → bool -
Returns
trueifnamewas explicitly provided on the command line.inherited -
info(
Object message, {Verbosity? verbosity}) → void -
Writes an info message (Laravel-style).
inherited
-
line(
Object message, {String? style, Verbosity? verbosity}) → void -
Writes a plain line to output (Laravel-style).
inherited
-
loadReplayScenarioActionCount(
String scenarioPath) → Future< int> -
Load a replay scenario and return its action count.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onProfileCompleted(
ProfileHarnessConfig config, int exitCode) → void -
Override to log profile completion.
inherited
-
onReplayCompleted(
PreparedReplay prepared, int exitCode, {String? tracePath, int summaryCount = 0}) → void -
Called after replay execution completes.
Use to analyze trace output or report custom status.
inherited
-
onReplayPrepared(
PreparedReplay prepared) → void -
Called after replay preparation but before execution.
Use to print custom status or perform app-specific setup.
inherited
-
option(
String name) → Object? -
Returns the value of a named option (e.g.,
--name,--force).inherited -
prepareProfileArtifactDir(
String artifactDir) → Future< void> -
Override to prepare the artifact directory before profiling.
inherited
-
printUsage(
) → void -
Prints the command usage information.
inherited
-
profileRegionMetadata(
String? scenarioPath) → Map< String, Object?> -
inherited
-
question(
Object message, {Verbosity? verbosity}) → void -
Writes a question message (Laravel-style).
inherited
-
registerHarnessFlags(
) → void -
Register the standard harness flags on the argParser.
Override to add app-specific flags alongside standard ones.
inherited
-
registerProfileHarnessFlags(
) → void -
inherited
-
resolveScenarioPath(
String path) → String -
Override to resolve special scenario path values.
Return a file system path, or throw if resolution fails.
The default implementation checks the path directly and
also searches candidates like
scenarios/<name>.json.inherited -
resolveTracePath(
String path) → String -
Override to resolve special trace path values (e.g.
latest). Return a file system path, or throw if resolution fails.inherited -
run(
) → Future< void> -
Runs this command.
override
-
selectTraceSession(
List< TraceSessionSplit> sessions, String scriptFilter) → TraceSessionSplit -
inherited
-
selectTraceSessionIndex(
List< TraceSessionSplit> sessions, String scriptFilter) → int? -
Override to customize trace session selection (script filtering, etc).
Return the selected session index or let the mixin pick the last matching.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryResolveScenarioPath(
String path) → Future< String?> -
Override to resolve special scenario path values.
Return a file system path, or null to fall back to resolveScenarioPath.
inherited
-
tryResolveTracePath(
String path) → Future< String?> -
Override to resolve
--trace latestor other special trace path values. Return a file system path, or null if not handled.inherited -
usageException(
String message) → Never -
Throws a usage error with the given message.
inherited
-
warn(
Object message, {Verbosity? verbosity}) → void -
Writes a warning message (Laravel-style).
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited