def _check_speed(time_per_run, number=4, run_warm=True):
        def decorated(func):
            @functools.wraps(func)
            def wrapper(self):
                if run_warm:
                    func(self)
                first = time.time()
                for i in range(number):
                    func(self)
                single_time = (time.time() - first) / number
                print('\nspeed', func, single_time)
                assert single_time < time_per_run
            return wrapper
        return decorated
Calculate the metric value.
dataset/ETHPy150Open davidhalter/jedi/test/test_speed.py/TestSpeed._check_speed--crossover with--dataset/ETHPy150Open django/django-dev-dashboard/dashboard/models.py/JenkinsFailuresMetric._calculate