PySpeedIT.benchmark_it

Overview

Can be used instead of python’s timeit.

Benchmark-IT supports also timing of only selected code parts within a function using Comment lines with a START/END TAG.

START-TAG: # ::SPEEDIT::
END-TAG:   # **SPEEDIT**

Important

Only functions within one module can be compared to each other for ranking

  • multiple modules can be run at once just ranking is restricted to functions within one module

For usage see PySpeedIT.speed_it

OUTPUT HTML

../_images/benchmark_it_results.png

Functions

PySpeedIT.benchmark_it._helper_get_perf_counter_reference_time()

Returns 2 times the smallest difference of calling perf_counter() immediately after each other a couple of times.

Returns:(float) 2 times the smallest difference of calling perf_counter() immediately after each other a couple of times.
PySpeedIT.benchmark_it.benchmark_functions_in_module(loaded_module, module_path, module_name, benchmarks_dir_path, module_tuple_of_func_tuples, output_max_slashes_fileinfo, use_func_name, output_in_sec, benchmarkit__output_source, benchmarkit__with_gc, benchmarkit__check_too_fast, benchmarkit__rank_by, benchmarkit__run_sec, benchmarkit__repeat)

Writes the results for one loaded_module for all defined functions to a html files overwriting them if they existed.

SeeAlso

for the meaning of the parameters speed_it

This Page