hydra-send-stats: add a --once option for testing
[?]
Mar 20, 2021, 1:12 PM
TPL3BSXGOXPJ2CGNBO7S3XBQMKQFPNVML2EUCQD7ATVAOWYJ5TMACDependencies
- [2]
BZSJO2RMhydra-send-stats: Keep track of the number of machines - [3]
DNOLOMX7hydra-send-stats: add a failing test asserting it can run - [*]
DODOGD7MSend queue runner stats to statsd - [*]
LE4VZIY5More stats
Change contents
- edit in src/script/hydra-send-stats at line 9
use Getopt::Long qw(:config gnu_getopt); - edit in src/script/hydra-send-stats at line 67
}sub showHelp {print <<EOF;Usage: $0 [--once]Send stats to statsd. The --once flag can be used to send one roundof stats and then exit.Example:\$ $0 --onceEOFexit 0; - edit in src/script/hydra-send-stats at line 82
my $once = 0;GetOptions("once" => \$once,"help" => sub { showHelp() }) or exit 1; - edit in src/script/hydra-send-stats at line 102[6.1273][5.1911]
if ($once) {last;} - replacement in t/scripts/hydra-send-stats.t at line 15
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-send-stats"));my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-send-stats", "--once"));