Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

Invoke-BenchmarkSuite

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.BenchmarkRunResult PowerForge.PowerShellBenchmarkWorkItem

Runs a reusable PowerShell benchmark suite.

Remarks

Runs a reusable PowerShell benchmark suite.

Examples

Authored help example

Run a benchmark spec


Invoke-BenchmarkSuite -Path .\Benchmarks\module.benchmark.ps1
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Invoke-BenchmarkSuite [-Case <String[]>] [-Cleanup <Always|KeepOnFailure|KeepAlways>] [-CooldownMilliseconds <Int32>] [-Engine <String[]>] [-ExternalHostTimeoutSeconds <Int32>] [-HostName <String[]>] [-IterationCount <Int32>] [-MemoryCleanup <BeforeIteration>] [-Operation <String[]>] [-OutlierMode <ExcludeMinMax>] [-OutputRoot <String>] -Path <String> [-Plan] [-Profile <Current|TemporaryLocalUser>] [-RunMode <String>] [-RunOrder <Sequential|Rotated|Randomized|GroupedRotated>] [-Suite <String>] [-Variable <Hashtable>] [-WarmupCount <Int32>] [<CommonParameters>]
#
Parameter set: Path

Parameters

Case String[] optionalposition: namedpipeline: Falsealiases: Cases, Scenario, Scenarios
Case or scenario names to include.
Cleanup PowerShellBenchmarkCleanupMode optionalposition: namedpipeline: Falsevalues: 3
Optional cleanup override.
Possible values: Always, KeepOnFailure, KeepAlways
CooldownMilliseconds Int32 optionalposition: namedpipeline: False
Optional delay between measured samples, in milliseconds.
Engine String[] optionalposition: namedpipeline: Falsealiases: Engines
Engine names to include.
ExternalHostTimeoutSeconds Int32 optionalposition: namedpipeline: False
Maximum time allowed for each external PowerShell host process.
HostName String[] optionalposition: namedpipeline: Falsealiases: Host, Hosts
Host labels to include.
IterationCount Int32 optionalposition: namedpipeline: False
Optional measured iteration count override.
MemoryCleanup PowerShellBenchmarkMemoryCleanupMode optionalposition: namedpipeline: Falsevalues: 1
Optional managed-memory cleanup override.
Possible values: BeforeIteration
Operation String[] optionalposition: namedpipeline: Falsealiases: Operations
Operation names to include.
OutlierMode PowerShellBenchmarkOutlierMode optionalposition: namedpipeline: Falsevalues: 1
Optional summary outlier policy override.
Possible values: ExcludeMinMax
OutputRoot String optionalposition: namedpipeline: False
Optional output root override.
Path String requiredposition: 0pipeline: False
Path to a .benchmark.ps1 spec.
Plan SwitchParameter optionalposition: namedpipeline: False
Prints the resolved plan instead of executing measurements.
Profile PowerShellBenchmarkProfileKind optionalposition: namedpipeline: Falsevalues: 2
Optional profile override.
Possible values: Current, TemporaryLocalUser
RunMode String optionalposition: namedpipeline: False
Run mode label.
RunOrder PowerShellBenchmarkRunOrder optionalposition: namedpipeline: Falsevalues: 4
Optional work-item ordering override.
Possible values: Sequential, Rotated, Randomized, GroupedRotated
Suite String optionalposition: namedpipeline: False
Optional suite name override.
Variable Hashtable optionalposition: namedpipeline: Falsealiases: Variables
Optional variables exposed to benchmark specs as $BenchmarkVariables.
WarmupCount Int32 optionalposition: namedpipeline: False
Optional warmup count override.

Outputs

PowerForge.BenchmarkRunResult, PowerForge.PowerShellBenchmarkWorkItem

Invoke-BenchmarkSuite [-Case <String[]>] [-Cleanup <Always|KeepOnFailure|KeepAlways>] [-CooldownMilliseconds <Int32>] [-Engine <String[]>] [-ExternalHostTimeoutSeconds <Int32>] [-HostName <String[]>] [-IterationCount <Int32>] [-MemoryCleanup <BeforeIteration>] [-Operation <String[]>] [-OutlierMode <ExcludeMinMax>] [-OutputRoot <String>] [-Plan] [-Profile <Current|TemporaryLocalUser>] [-RunMode <String>] [-RunOrder <Sequential|Rotated|Randomized|GroupedRotated>] -Settings <ScriptBlock> [-Suite <String>] [-Variable <Hashtable>] [-WarmupCount <Int32>] [<CommonParameters>]
#
Parameter set: Settings

Parameters

Case String[] optionalposition: namedpipeline: Falsealiases: Cases, Scenario, Scenarios
Case or scenario names to include.
Cleanup PowerShellBenchmarkCleanupMode optionalposition: namedpipeline: Falsevalues: 3
Optional cleanup override.
Possible values: Always, KeepOnFailure, KeepAlways
CooldownMilliseconds Int32 optionalposition: namedpipeline: False
Optional delay between measured samples, in milliseconds.
Engine String[] optionalposition: namedpipeline: Falsealiases: Engines
Engine names to include.
ExternalHostTimeoutSeconds Int32 optionalposition: namedpipeline: False
Maximum time allowed for each external PowerShell host process.
HostName String[] optionalposition: namedpipeline: Falsealiases: Host, Hosts
Host labels to include.
IterationCount Int32 optionalposition: namedpipeline: False
Optional measured iteration count override.
MemoryCleanup PowerShellBenchmarkMemoryCleanupMode optionalposition: namedpipeline: Falsevalues: 1
Optional managed-memory cleanup override.
Possible values: BeforeIteration
Operation String[] optionalposition: namedpipeline: Falsealiases: Operations
Operation names to include.
OutlierMode PowerShellBenchmarkOutlierMode optionalposition: namedpipeline: Falsevalues: 1
Optional summary outlier policy override.
Possible values: ExcludeMinMax
OutputRoot String optionalposition: namedpipeline: False
Optional output root override.
Plan SwitchParameter optionalposition: namedpipeline: False
Prints the resolved plan instead of executing measurements.
Profile PowerShellBenchmarkProfileKind optionalposition: namedpipeline: Falsevalues: 2
Optional profile override.
Possible values: Current, TemporaryLocalUser
RunMode String optionalposition: namedpipeline: False
Run mode label.
RunOrder PowerShellBenchmarkRunOrder optionalposition: namedpipeline: Falsevalues: 4
Optional work-item ordering override.
Possible values: Sequential, Rotated, Randomized, GroupedRotated
Settings ScriptBlock requiredposition: 0pipeline: False
Inline benchmark DSL settings.
Suite String optionalposition: namedpipeline: False
Optional suite name override.
Variable Hashtable optionalposition: namedpipeline: Falsealiases: Variables
Optional variables exposed to benchmark specs as $BenchmarkVariables.
WarmupCount Int32 optionalposition: namedpipeline: False
Optional warmup count override.

Outputs

PowerForge.BenchmarkRunResult, PowerForge.PowerShellBenchmarkWorkItem