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

Test-BenchmarkGate

Namespace PSPublishModule
Inputs
None
Outputs
PowerForge.BenchmarkGateResult

Tests normalized benchmark summaries against a JSON baseline.

Remarks

Tests normalized benchmark summaries against a JSON baseline.

Examples

Authored help example

Verify a benchmark summary against a baseline


Test-BenchmarkGate -SummaryPath .\Build\Benchmarks\summary.json -BaselinePath .\Build\Benchmarks\baseline.json -Metric MedianMs
        

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

Test-BenchmarkGate [-AbsoluteToleranceMs <Double>] [-AllowNew] -BaselinePath <String> [-GroupBy <String[]>] [-Metric <String>] [-MetricDirection <Auto|LowerIsBetter|HigherIsBetter>] [-RelativeTolerance <Double>] -SummaryPath <String> [-Update] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AbsoluteToleranceMs Double optionalposition: namedpipeline: False
Absolute tolerance in milliseconds.
AllowNew SwitchParameter optionalposition: namedpipeline: False
Allows new metrics missing from baseline.
BaselinePath String requiredposition: namedpipeline: False
Baseline JSON path.
GroupBy String[] optionalposition: namedpipeline: False
Fields used to construct stable metric keys.
Metric String optionalposition: namedpipeline: False
Metric name to evaluate.
MetricDirection BenchmarkMetricDirection optionalposition: namedpipeline: Falsevalues: 3
Metric direction for regression checks.
Possible values: Auto, LowerIsBetter, HigherIsBetter
RelativeTolerance Double optionalposition: namedpipeline: False
Relative tolerance.
SummaryPath String requiredposition: namedpipeline: False
Summary JSON path.
Update SwitchParameter optionalposition: namedpipeline: False
Updates the baseline instead of verifying it.

Outputs

PowerForge.BenchmarkGateResult