Skip to content

Commit 1154b64

Browse files
committed
Document PERL6_TEST_TIMES env var
Fixes #738
1 parent dc25e76 commit 1154b64

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/Programs/00-running.pod6

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,27 @@ C<IO::Spec::Cygwin> inherits this from C<IO::Spec::Unix>.
132132
C<IO::Spec::Win32.path> will read the first defined of either C<%PATH%> or C<%Path%> as a
133133
semicolon-delimited list.
134134
135+
=defn C<PERL6_TEST_TIMES>, (I<Bool>; C<lib/Test.pm6>)
136+
137+
When set to a true value will cause timing information to be printed when
138+
the test suite is running:
139+
140+
$ PERL6_TEST_TIMES=1 perl6 -MTest -e 'plan 2; is sleep(2), Nil; nok sleep(.5)'
141+
1..2
142+
# between two timestamps 1 microseconds
143+
ok 1 -
144+
# t=2000562
145+
ok 2 -
146+
# t=500388
147+
148+
The C<# between two timestamps> is printed when C<plan> is called and
149+
indicates how long it takes
150+
just to read the clock to produce a timestamp. C<# t=> values that follow
151+
are printed after each test function is executed and the value represents
152+
the time in microseconds that elapsed from the previous timestamp (or the
153+
C<# between...> message).
154+
155+
Note that if you use C<done-testing> instead of C<plan>, the C<# between...>
156+
message will not be displayed and the first C<# t=> value will be a C<NaN>.
157+
135158
=end pod

0 commit comments

Comments
 (0)