NAME
Test2::Harness::Runner::Resource::Throttle - Limit how many tests can be in their just-spawned phase at once.
SYNOPSIS
yath test -R Throttle --throttle 5/2s
yath test -R Throttle --throttle 5
yath test -R Throttle --throttle 10/500ms
yath test -R Throttle --throttle 1/core/1s
yath test -R Throttle --throttle 1/core,100mb/1s
DESCRIPTION
A "slot" is occupied from when a test starts (assign) until either the test releases or window seconds elapse, whichever comes first. Cap is N slots per window.
OPTIONS
--throttle SPEC:
CAP/DURATION-
Positive integer cap. Duration accepts
ms/s/m; bare number is seconds. e.g.5/2s,10/500ms,3/1m. CAP-
Shorthand for
CAP/1s. CAP/BASIS[,BASIS...]/DURATION-
BASIS is
core/cores(system core count) or a byte size (100mb,1gb) giving free-RAM-divided tokens.
ADAPTIVE SCALING
When a RAM basis is configured and free RAM falls below the basis unit, the unit halves and the window doubles (up to twice). After two halvings the RAM basis contributes zero tokens and the throttle defers all new launches.
SOURCE
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/