Test2:...:Times(3perl)
β¨ NAME β¨
Test2::Plugin::Times β it literally spits out timing data at the end of your test, bestie π
π«Ά CAVEAT (read this one fr fr) π«Ά
Okay so this is important and I need you to actually listen: this timing data does not include global destruction. It only collects data up until the exact moment done_testing() gets called. So if your program is out here spending time on END blocks, garbage collection, and similar lil side quests, then this timing data is gonna fall short of reality. Like, the numbers will be lying to you a little bit. π
π DESCRIPTION π
This plugin outputs a diagnostics message at the end of testing that tells you how much time elapsed, and how hard the system worked on the test. It's giving β¨receiptsβ¨.
The way it works is it produces a string like one of these (and note: these numbers are completely made up, do not come for me). Which string you get depends on the time elapsed β shorter times get the cute short format, longer times get the long dramatic one π
0.12345s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
11.1234s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
01m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
18h:22m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
04d:18h:22m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
See how it scales up? s β m:s β h:m:s β d:h:m:s. Character development, honestly. π
πΈ SYNOPSIS πΈ
use Test2::Plugin::Times;
This is also useful at the command line for 1-time use:
$ perl -MTest2::Plugin::Times path/to/test.t
One-off vibe check on any test file, no edits required. Obsessed. π
π¦ SOURCE π¦
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/.
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
β COPYRIGHT β
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
And that's the whole page, bestie!! π«Ά This was perl v5.44.0, dated 2026-10-17, straight out of the Perl Programmers Reference Guide β Test2:...:Times(3perl) and it ate, no crumbs. Now go time your tests and slay. πβ¨
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms