9 lines
285 B
Python
9 lines
285 B
Python
from ._result import BenchmarkResult
|
|
|
|
|
|
class ComputeTime:
|
|
"""Extracts a runtime benchmark result from the passed Explanation."""
|
|
|
|
def __call__(self, explanation, name):
|
|
return BenchmarkResult("compute time", name, value=explanation.compute_time / explanation.shape[0])
|