asv.results¶
Classes¶
Manage a set of benchmark results for a single machine and commit |
Functions¶
|
Iterate over all of the result file paths. |
|
Iterate over all of the result files. |
|
Iterate over all of the result files for a particular machine. |
|
Iterate over all of the result files with a given hash for a |
|
Iterate over all of the result commit hashes and dates and yields |
|
Get a list of the commit hashes that have already been tested. |
|
Get the 8-char result commit identifier from a potentially shorter |
|
Get the result filename for a given machine, commit_hash and |
|
For parameterized benchmarks, obtain values from result that |
|
Pretty-print a benchmark result to human-readable form. |
|
Format the result from a parameterized benchmark as an ASCII table |
|
Format a parameter value for displaying it as test output. The |
Module Contents¶
- asv.results.iter_results_for_machine(results, machine_name)[source]¶
Iterate over all of the result files for a particular machine.
- asv.results.iter_results_for_machine_and_hash(results, machine_name, commit)[source]¶
Iterate over all of the result files with a given hash for a particular machine.
- asv.results.iter_existing_hashes(results)[source]¶
Iterate over all of the result commit hashes and dates and yields commit_hash.
May return duplicates. Use get_existing_hashes if that matters.
- asv.results.get_existing_hashes(results)[source]¶
Get a list of the commit hashes that have already been tested.
- asv.results.get_result_hash_from_prefix(results, machine_name, commit_prefix)[source]¶
Get the 8-char result commit identifier from a potentially shorter prefix. Only considers the set of commits that have had results computed.
Returns None if there are no matches. Raises a UserError if the prefix is non-unique.
- asv.results.get_filename(machine, commit_hash, env_name)[source]¶
Get the result filename for a given machine, commit_hash and environment.
If the environment name is too long, use its hash instead.
- asv.results._compatible_results(result, result_params, params)[source]¶
For parameterized benchmarks, obtain values from result that are compatible with parameters of benchmark
- class asv.results.Results(params, requirements, commit_hash, date, python, env_name, env_vars)[source]¶
Manage a set of benchmark results for a single machine and commit hash.
- get_result_keys(benchmarks)[source]¶
Return result keys corresponding to benchmarks.
Parameters¶
- benchmarksBenchmarks
Benchmarks to return results for. Used for checking benchmark versions.
Returns¶
- keysset
Set of benchmark result keys
- get_result_value(key, params)[source]¶
Return the value of benchmark result.
Parameters¶
- keystr
Benchmark name to return results for
- params{list of list, None}
Set of benchmark parameters to return values for
Returns¶
- value{float, list of float}
Benchmark result value. If the benchmark is parameterized, return a list of values.
- get_result_stats(key, params)[source]¶
Return the statistical information of a benchmark result.
Parameters¶
- keystr
Benchmark name to return results for
- params{list of list, None}
Set of benchmark parameters to return values for
Returns¶
- stats{None, dict, list of dict}
Result statistics. If the benchmark is parameterized, return a list of values.
- get_result_samples(key, params)[source]¶
Return the raw data points of a benchmark result.
Parameters¶
- keystr
Benchmark name to return results for
- params{list of list, None}
Set of benchmark parameters to return values for
Returns¶
- samples{None, list}
Raw result samples. If the benchmark is parameterized, return a list of values.
- remove_samples(key, selected_idx=None)[source]¶
Remove measurement samples from the selected benchmark.
- add_result(benchmark, result, started_at=None, duration=None, record_samples=False, append_samples=False, selected_idx=None)[source]¶
Add benchmark result.
Parameters¶
- benchmarkdict
Benchmark object
- resultrunner.BenchmarkResult
Result of the benchmark.
- started_atdatetime.datetime, optional
Benchmark start time.
- durationfloat, optional
Benchmark total duration in seconds.
- record_samplesbool, optional
Whether to save samples.
- append_samplesbool, optional
Whether to combine new samples with old.
- selected_idxset, optional
Which indices in a parametrized benchmark to update
- get_profile(benchmark_name)[source]¶
Get the profile data for the given benchmark name.
Parameters¶
- benchmark_namestr
Name of benchmark
Returns¶
- profile_datapstats.Stats
Profile data
- save(result_dir)[source]¶
Save the results to disk, replacing existing results.
Parameters¶
- result_dirstr
Path to root of results tree.
- asv.results.format_benchmark_result(results, benchmark)[source]¶
Pretty-print a benchmark result to human-readable form.
Parameters¶
- resultsResults
Result set object
- benchmarkdict
Benchmark dictionary
Returns¶
- info{str, None}
One-line description of results
- details{str, None}
Additional details