File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -147,3 +147,30 @@ the test runs, and the absolute difference value is unreliable. High error
147
147
percentages are particularly common on PC builds, where the host OS may
148
148
influence test run times. Increasing the ` N ` value may help average this out by
149
149
running each test longer.
150
+
151
+ ## internal_bench
152
+
153
+ The ` internal_bench ` directory contains a set of tests for benchmarking
154
+ different internal Python features. By default, tests are run on the (unix or
155
+ Windows) host, but the ` --pyboard ` option allows them to be run on an attached
156
+ board instead.
157
+
158
+ Tests are grouped by the first part of the file name, and the test runner compares
159
+ output between each group of tests.
160
+
161
+ The benchmarks measure the elapsed (wall time) for each test, according
162
+ to MicroPython's own time module.
163
+
164
+ If run without any arguments, all test groups are run. Otherwise, it's possible
165
+ to manually specify which test cases to run.
166
+
167
+ Example:
168
+
169
+ ```
170
+ $ ./run-internalbench.py internal_bench/bytebuf-*.py
171
+ internal_bench/bytebuf:
172
+ 0.094s (+00.00%) internal_bench/bytebuf-1-inplace.py
173
+ 0.471s (+399.24%) internal_bench/bytebuf-2-join_map_bytes.py
174
+ 0.177s (+87.78%) internal_bench/bytebuf-3-bytarray_map.py
175
+ 1 tests performed (3 individual testcases)
176
+ ```
You can’t perform that action at this time.
0 commit comments