1Test2::Plugin::Times(3)User Contributed Perl DocumentatioTnest2::Plugin::Times(3)
2
3
4
6 Test2::Plugin::Times - Output timing data at the end of the test.
7
9 It is important to note that this timing data does not include global
10 destruction. This data is only collected up until the point
11 done_testing() is called. If your program takes time for END blocks,
12 garbage collection, and similar, then this timing data will fall short
13 of reality.
14
16 This plugin will output a diagnostics message at the end of testing
17 that tells you how much time elapsed, and how hard the system worked on
18 the test.
19
20 This will produce a string like one of these (Note these numbers are
21 completely made up). Which string is used depends on the time elapsed.
22
23 0.12345s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
24
25 11.1234s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
26
27 01m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
28
29 18h:22m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
30
31 04d:18h:22m:54.45s on wallclock (0.05 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.05 CPU)
32
34 use Test2::Plugin::Times;
35
36 This is also useful at the command line for 1-time use:
37
38 $ perl -MTest2::Plugin::Times path/to/test.t
39
41 The source code repository for Test2-Suite can be found at
42 https://github.com/Test-More/Test2-Suite/.
43
45 Chad Granum <exodist@cpan.org>
46
48 Chad Granum <exodist@cpan.org>
49
51 Copyright 2018 Chad Granum <exodist@cpan.org>.
52
53 This program is free software; you can redistribute it and/or modify it
54 under the same terms as Perl itself.
55
56 See http://dev.perl.org/licenses/
57
58
59
60perl v5.36.0 2022-07-22 Test2::Plugin::Times(3)