Skip to content

Commit 97b52d9

Browse files
committed
Document {RAKU,PERL6}_TEST_TIMES
1 parent 2139dc9 commit 97b52d9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/Language/testing.pod6

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,28 @@ B<Note:> Before Rakudo version 2020.05 the environment variable
111111
C<PERL6_TEST_DIE_ON_FAIL> was used to enable this feature, it is still
112112
supported but deprecated.
113113
114+
Test timing in microseconds can be emitted by setting the
115+
C<RAKU_TEST_TIMES> environmental variable:
116+
117+
=for code :lang<shell>
118+
$ env RAKU_TEST_TIMES=1 raku -e 'use Test; plan 1; pass sleep(1);'
119+
1..1
120+
# between two timestamps 0 microseconds
121+
ok 1 -
122+
# t=1000721
123+
124+
The same variable can be used within the test file. Set it before loading
125+
the C<Test> module:
126+
127+
=for code
128+
BEGIN %*ENV<RAKU_TEST_TIMES> = 1;
129+
use Test;
130+
...
131+
132+
B<Note:> Before Rakudo version 2020.05 the environment variable
133+
C<PERL6_TEST_TIMES> was used to enable this feature, it is still
134+
supported but deprecated.
135+
114136
=head1 Test plans
115137
116138
Tests plans use L<C<plan>|/type/Test#plan> for declaring how many plans are

0 commit comments

Comments
 (0)