PT-2037 Option --system-only for pt-stalk

Option --system-only triggers only operating system related captures, ignoring all others.
This commit is contained in:
svetasmirnova
2022-01-19 18:34:05 +03:00
parent 5a46d3df77
commit d6e899404e

View File

@@ -556,6 +556,30 @@ is(
"Retention test 5: retention by count works as expected"
);
# ###########################################################################
# Test if option --system-only works correctly
# ###########################################################################
cleanup();
$retval = system("$trunk/bin/pt-stalk --no-stalk --system-only --run-time 10 --sleep 2 --dest $dest --pid $pid_file --iterations 1 -- --defaults-file=$cnf >$log_file 2>&1");
PerconaTest::wait_until(sub { !-f $pid_file });
$output = `ls $dest`;
like(
$output,
qr/(df)|(ps)/,
"Option --system-only collects system data"
);
unlike(
$output,
qr/(innodbstatus)|(mysqladmin)/,
"Option --system-only does not collect MySQL data"
);
# ###########################################################################
# Test report about performance schema transactions in MySQL 5.7+
# ###########################################################################