mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 23:45:44 +00:00
Tweaks requested by Baron, plus fixes.
Tweaks: * --headers command line option, which can be used to enable/disable the automatic headers, and the automatic empty lines between samples. * --show-timestamps, which changes the #ts line with a timestamp in the HH:MM:SS format. * Always use ReadKeyMini, even when we have Term::ReadKey. In the latter case, use the Term::ReadKey functions, but if they fail, try again with our own versions. Fix: Looks like I forgot to actually enable the "save the current, first and last" samples. This is now on. It should mean faster and better output when changing --group-by modes.
This commit is contained in:
@@ -79,7 +79,7 @@ sub test_diskstats_file {
|
||||
? @{ $args{options} }
|
||||
: (
|
||||
'--show-inactive',
|
||||
'--no-automatic-headers',
|
||||
'--headers', '',
|
||||
'--columns-regex','cnc|rt|mb|busy|prg',
|
||||
);
|
||||
die "$file does not exist" unless -f $file;
|
||||
@@ -117,7 +117,7 @@ test_diskstats_file(
|
||||
|
||||
test_diskstats_file(
|
||||
file => "small.txt",
|
||||
options => [ '--no-automatic-headers', '--columns-regex','time', ],
|
||||
options => [ '--headers', '', '--columns-regex','time', ],
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
@@ -145,9 +145,8 @@ while (my $line = <$samples_fh>) {
|
||||
$count++ if $line =~ /^TS/;
|
||||
}
|
||||
|
||||
is(
|
||||
$count,
|
||||
$iterations,
|
||||
ok(
|
||||
($count == $iterations) || ($count == $iterations+1),
|
||||
"--save-samples and --iterations work"
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user