mpi_array.benchmarks.benchmarkΒΆ

Manages finding, running and recoding benchmark results.

This module has shamelessly borrows from the airspeed velocity (asv) file benchmark.py. See the airspeed velocity (asv) LICENSE.

Functions

create_runner_argument_parser()
disc_benchmarks(root[, package]) Discover all benchmarks in a given directory tree, yielding Benchmark
disc_files(root[, package]) Iterate over all .py files in a given directory tree.
get_process_time_timer() The best timer we can use is time.process_time(), but it is not available in the Python stdlib until Python 3.3.
get_setup_cache_key(func)
get_source_code(items) Extract source code of given items, and concatenate and dedent it.
import_module(name[, package]) Import a module.
root_and_package_from_name(module_name) Returns root filename for the package/module named by module_name.
run_main(argv) Runs the benchmarks.
sha256 Returns a sha256 hash object; optionally initialized with a string

Classes

Benchmark(name, func, attr_sources) Represents a single benchmark.
BenchmarkRunner([argv]) Discovers and runs benchmarks.
TimeBenchmark(name, func, attr_sources) Represents a single benchmark for timing.