mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 06:00:14 +00:00
Stop using /(?=)/ since /.+/ is good enough.
Originally, DiskstatsMenu differentiated between an empty pattern entered by the user (which in the shell version meant "match all") and any other valid pattern by replacing it with /(?=)/. However, Diskstats now carries the original string, inside the OptionParser object, so the above was redundant.
This commit is contained in:
@@ -45,7 +45,7 @@ sub new {
|
|||||||
# Defaults
|
# Defaults
|
||||||
filename => '/proc/diskstats',
|
filename => '/proc/diskstats',
|
||||||
column_regex => qr/cnc|rt|busy|prg|time|io_s/,
|
column_regex => qr/cnc|rt|busy|prg|time|io_s/,
|
||||||
device_regex => qr/(?=)/,
|
device_regex => qr/.+/,
|
||||||
block_size => 512,
|
block_size => 512,
|
||||||
out_fh => \*STDOUT,
|
out_fh => \*STDOUT,
|
||||||
filter_zeroed_rows => $o->get('zero-rows') ? undef : 1,
|
filter_zeroed_rows => $o->get('zero-rows') ? undef : 1,
|
||||||
|
@@ -413,7 +413,7 @@ sub get_new_regex_for {
|
|||||||
# somewhat magical, and basically just asking for trouble.
|
# somewhat magical, and basically just asking for trouble.
|
||||||
# Instead we give them what awk would, a pattern that always
|
# Instead we give them what awk would, a pattern that always
|
||||||
# matches.
|
# matches.
|
||||||
$args{options}->{current_group_by_obj}->$looking_for( qr/(?=)/ );
|
$args{options}->{current_group_by_obj}->$looking_for( qr/.+/ );
|
||||||
$args{options}->{OptionParser}->set($looking_for_o, '');
|
$args{options}->{OptionParser}->set($looking_for_o, '');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user