mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-20 02:20:04 +08: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:
@@ -48,7 +48,18 @@ BEGIN {
|
||||
my $have_readkey = eval { require Term::ReadKey };
|
||||
|
||||
if ($have_readkey) {
|
||||
Term::ReadKey->import(@EXPORT_OK);
|
||||
*ReadMode = sub {
|
||||
eval { return Term::ReadKey::ReadMode( @_ ) };
|
||||
if ( $@ ) {
|
||||
return _ReadMode(@_);
|
||||
}
|
||||
};
|
||||
*GetTerminalSize = sub {
|
||||
eval { return Term::ReadKey::GetTerminalSize( @_ ) };
|
||||
if ( $@ ) {
|
||||
return _GetTerminalSize(@_);
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
# If we don't have Term::ReadKey, fake it. We clobber our own glob,
|
||||
|
||||
Reference in New Issue
Block a user