Commit Graph

20 Commits

Author SHA1 Message Date
Daniel Nichter
feab2f0925 s/Percona Inc/Percona Ireland Ltd/g 2013-01-02 17:19:16 -07:00
Daniel Nichter
9d809ce5ea Use int($flags) to prevent fcntl(F_SETFL) error. Clean up ReadKeyMini.pm and Diskstats.t. 2012-08-15 13:28:14 -06:00
Daniel Nichter
75295707de Disable tty check. 2012-08-15 13:06:38 -06:00
Daniel Nichter
b5d7e7d0b6 More debug hacks. 2012-08-15 12:58:55 -06:00
Daniel Nichter
53c382730a See if STDIN is tty. 2012-08-15 12:52:34 -06:00
Daniel Nichter
523a74da36 More debug hacks. 2012-08-15 12:27:37 -06:00
Daniel Nichter
d00702f193 Even more debug hacks. 2012-08-15 11:54:01 -06:00
Daniel Nichter
4e4a28bff6 Debug hack for ReadKeyMini::cooked(). 2012-08-15 10:31:18 -06:00
Brian Fraser
5d8be022e9 Merge ubuntu-12-64-issues 2012-07-20 17:33:13 -03:00
Brian Fraser
4266e92692 Silence tput and stty warnings in ReadKeyMini 2012-07-12 16:25:39 -03:00
Daniel Nichter
7813aeef55 eval tput which fails if TERM isn't set, like when ran via Jenkins. 2012-07-09 15:59:00 -06:00
Brian Fraser fraserb@gmail.com
345a21a82e Replace the last instances of MKDEBUG 2012-06-05 12:28:36 -03:00
Brian Fraser fraserb@gmail.com
6b93d51e43 ReadKeyMini: Restore STDIN flags in cooked()
This will probably resolve bug #946707: pt-sift loses STDIN after pt-diskstats
2012-06-05 12:16:49 -03:00
Brian Fraser
27323776a8 Applied Baron's patch, which changes how qtime and stime are calculated.
Also includes a second attempt at fixing the $Diskstats::printed_lines bug,
and fixed how the timestamp is chosen if --show-timestamps is in effect.
2012-02-03 14:00:40 -03:00
Brian Fraser
b0f7bc4fc6 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.
2012-02-01 19:12:03 -03:00
Brian Fraser
ad552756b2 Automatic headers & improvements. 2012-01-18 19:01:19 -03:00
Brian Fraser
b4289010b1 Several fixes. --save-samples and --help should work now. 2012-01-10 10:47:50 -03:00
Brian Fraser
d3ef9edaaa Several corrections as per Daniel and Baron's feedback.
Still TODO: Attributes still have a single method that doubles
as a getter and setter. The constructor for Diskstats is still
weird -- A tad more stricter than it should be, if anything.
->print_rest is still rest, even though that's hardly
memorable, mostly because of a lack of ideas on what to
rename it. The main loop in the Menu is still a while (1).

As a nice perk, it's nearly twice as fast now! It also adds a
_very_ experimental --memory-for-speed argument, which
turns on memoization for the current biggest bottleneck.
2011-12-22 19:24:56 -03:00
Brian Fraser
0fd09e8f6e Work in progress v2: Redesign pt-diskstats in Perl. 2011-12-13 14:53:05 -03:00
Brian Fraser
43b29d6374 Work in progress: Redesign pt-diskstats in Perl.
Mostly bits and pieces at the moments. ReadKeyMini is a portable-ish
Term::ReadKey. Used here by DiskstatsMenu, which is currently only
for show.

Diskstats has most of the logic of the old pt-diskstats, with parts
now implemented by the DiskstatsGroupBy* classes; The latter subclass
the former.

As mentioned at the start, this is a work in progress. In addition to to
not having all the parts attached, also missing are the data-gathering mode,
the command-line argument parsing, and a large amount of tests.
2011-12-08 19:26:04 -03:00