File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,28 @@ B<Note:> Before Rakudo version 2020.05 the environment variable
111
111
C < PERL6_TEST_DIE_ON_FAIL > was used to enable this feature, it is still
112
112
supported but deprecated.
113
113
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
+
114
136
= head1 Test plans
115
137
116
138
Tests plans use L < C < plan > |/type/Test#plan> for declaring how many plans are
You can’t perform that action at this time.
0 commit comments