From 155ee9cdaffd6232ef3c774d1a9f61d708fc8d6e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 30 Jan 2023 04:30:58 +0000 Subject: tests: make slow tests easier-to-find t/run.perl now prints slowest 10 tests at startup, and I've added ./devel/longest-tests to print all tests sorted by elapsed time. This should allow us to notice outliers more quickly in the future. --- devel/longest-tests | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 devel/longest-tests (limited to 'devel') diff --git a/devel/longest-tests b/devel/longest-tests new file mode 100755 index 00000000..bf46e166 --- /dev/null +++ b/devel/longest-tests @@ -0,0 +1,7 @@ +eval 'exec perl -wS $0 ${1+"$@"}' # this script is too short to copyright +if 0; # running under some shell +use v5.12; use autodie; use YAML::XS qw(Load); +open(my $fh, '<', shift // '.prove'); +my $t = Load(do { local $/; <$fh> })->{tests}; +my @t = sort { $t->{$b}->{elapsed} <=> $t->{$a}->{elapsed} } keys %$t; +printf "%0.6f %s\n", $t->{$_}->{elapsed}, $_ for @t; -- cgit v1.2.3-24-ge0c7