Add clientstats (for clients).

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2025-05-30 19:48:02 +02:00
parent 963f07432c
commit 66a175c7f8
3 changed files with 606 additions and 3 deletions

View file

@ -506,16 +506,20 @@ sub FormatOutput {
if ($Format eq 'dump') {
# output as dump (key value)
$Output = sprintf ("# %s:\n",$Caption)
if ($Comments and (!defined($LastIteration) or $Caption ne $LastIteration));
if ($Caption and $Comments and (!defined($LastIteration) or $Caption ne $LastIteration));
$Output .= sprintf ("%s %u\n",$Key,$Value);
} elsif ($Format eq 'list') {
# output as list (caption key value)
$Output = sprintf ("%s %s %u\n",$Caption,$Key,$Value);
if ($Caption) {
$Output = sprintf ("%s %s %u\n",$Caption,$Key,$Value);
} else {
$Output = sprintf ("%s %u\n",$Key,$Value);
}
} elsif ($Format eq 'pretty') {
# output as a table
if ($Comments and (!defined($LastIteration) or $Caption ne $LastIteration)) {
$Output = $LeadIn;
$Output .= sprintf ("# ----- %s:\n",$Caption);
$Output .= sprintf ("# ----- %s:\n",$Caption) if $Caption;
}
# increase $PadValue for numbers with decimal point
$PadValue += $Precision+1 if $Precision;