From ba8e64d81d66653a2f7a12e80f83d1af63d4709b Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Tue, 27 Dec 2011 16:39:56 -0700 Subject: [PATCH] Fix typo, add stub test and a little more docu. --- bin/pt-ioprofile | 10 +++++++++- t/pt-ioprofile/pt-ioprofile.t | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 t/pt-ioprofile/pt-ioprofile.t diff --git a/bin/pt-ioprofile b/bin/pt-ioprofile index abe2a758..fa709b42 100755 --- a/bin/pt-ioprofile +++ b/bin/pt-ioprofile @@ -678,7 +678,15 @@ See also L<"BUGS"> for more information on filing bugs and getting help. =head1 DESCRIPTION pt-iostats uses strace and lsof to watch a process's IO and print out -a table of files and I/O activity. +a table of files and I/O activity. By default, it watches the mysqld +process for 30 seconds. The output is like: + + Tue Dec 27 15:33:57 PST 2011 + Tracing process ID 1833 + total read write lseek ftruncate filename + 0.000150 0.000029 0.000068 0.000038 0.000015 /tmp/ibBE5opS + +You probably need to run this tool as root. =head1 OPTIONS diff --git a/t/pt-ioprofile/pt-ioprofile.t b/t/pt-ioprofile/pt-ioprofile.t new file mode 100644 index 00000000..53cd45e4 --- /dev/null +++ b/t/pt-ioprofile/pt-ioprofile.t @@ -0,0 +1,24 @@ +#!/usr/bin/env perl + +BEGIN { + die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" + unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH}; + unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib"; +}; + +use strict; +use warnings FATAL => 'all'; +use English qw(-no_match_vars); +use Test::More tests => 1; + +use PerconaTest; + +TODO: { + local $TODO = "Test pt-ioprofile"; + ok(1, 'ok'); +}; + +# ############################################################################# +# Done. +# ############################################################################# +exit;