30 Commits

Author SHA1 Message Date
Sveta Smirnova
13fff8382e PT-2313 - pt-diskstat fails with new kernels again
- Added forgotten sample file
2024-03-18 14:43:36 +03:00
Sveta Smirnova
2df691d913 PT-2313 - pt-diskstat fails with new kernels again
- Ported fix for PT-1887
- Added test case
2024-03-15 19:15:51 +03:00
Viktor Szépe
3867d10ba5 Fix line ends (#664)
* Fix line ends of pt-mongodb-query-digest README

* Fix line ends of t/pt-diskstats/samples/small.txt
2023-08-23 16:27:18 +03:00
Daniel Nichter
9e4bcf0324 Remove headers from pt-diskstats bug 1035311 tests because they're not consistent everywhere. 2013-08-09 18:54:14 +00:00
Daniel Nichter
1987744a1d Clean up t/pt-diskstats/pt-diskstats.t and update samples: I'm guessing the diff is just cosmetic since no data has changed. 2013-08-09 17:18:44 +00:00
Brian Fraser
c08c0c6a7a Fix for 1035311: pt-diskstats shows wrong device name 2012-08-10 15:36:34 -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 fraserb@gmail.com
a00542aec8 t/pt-diskstats/pt-diskstats.t: Make sure the STDIN magic doesn't leak out 2012-06-05 10:59:42 -03:00
Daniel Nichter
5a77e8c09c Fix scrolling header for --group-by=all. 2012-05-10 14:06:52 -07:00
Brian Fraser
27c4c3ed5c Merged Baron's doc branch, updated tests. 2012-02-03 15:30:21 -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
73c1e466d7 Several fixes & changes:
* qtime and stime computed correctly
* Interactive mode and changing groups doesn't fail
* Interactive mode no longer uses a file to gather samples.
2012-01-30 17:44:18 -03:00
Brian Fraser
ad552756b2 Automatic headers & improvements. 2012-01-18 19:01:19 -03:00
Brian Fraser
5b43ed0d5e More changes as per Baron's review.
Tries to implement a facsimile to http://www.xaprb.com/blog/2011/03/18/how-to-gather-statistics-at-regular-intervals/
For both sampling and rendering.
2012-01-18 05:19:48 -03:00
Brian Fraser
05fec15473 Fixes as per Baron's review. 2012-01-17 11:40:01 -03:00
Brian Fraser
076c0d70b1 (Whoops. Forgot to commit the changed tests) 2012-01-16 09:48:59 -03:00
Daniel Nichter
60e16254d3 Correction to r140: only the test marked in this diff needs to be fixed. 2012-01-12 12:09:01 -07:00
Daniel Nichter
9404ff84ef Rewrite pt-diskstats.t but all tests need to be fixed. Update modules in pt-diskstats, use PTDEBUG, check regex opts. Remove output_fh from Diskstats. Fix DiskstatsMenu header so update-modules can see it. 2012-01-12 12:06:50 -07:00
Brian Fraser
3165b3c0f8 Slew of changes from Daniel's review. 2012-01-12 10:37:49 -03:00
Brian Fraser
9fd8e8d61d Make a test clean up after itself. 2012-01-10 11:26:11 -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
467254aca3 Fixes to the Menu; additionally, changed the accepted format for samples.
Also made it hide rows that are all zeroes by default, as per the
blueprint.
2011-12-20 12:53:35 -03:00
Brian Fraser
8da8d1ff61 Diskstats.pm: Wrong math for millisecond to second.
Sorry about that. Mind bug on my side.
2011-12-16 13:55:31 -03:00
Brian Fraser
13c9c5b0bb Added the actual pt-diskstats tool.
Missing a doc overhaul and tests, but this deals with most of the
feature upgrades in the blueprint.

The shell version of pt-diskstats is now in bin has pt-diskstats-shell,
in case that's needed.
2011-12-16 13:40:22 -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
Daniel Nichter
b21578a86f Combine and change all pt-diskstats test to new format. Use generic .t for bash tools. Number tests in each test file and use as default test name. 2011-08-18 09:02:46 -06:00
Daniel Nichter
eb01431399 Change MaatkitTest to PerconaTest in all tool tests. Add stub tests for pt-align and pt-collect. 2011-07-12 16:56:55 -06:00
Daniel Nichter
a9e002cc5a Add Aspersa tools, their tests, and util/test-bash-tool.
Update and simplify copyright notices.
2011-07-01 10:29:50 -06:00