Skip to content

Commit

Permalink
run the benchmark directly, maybe codspeed will handle benchmarking.
Browse files Browse the repository at this point in the history
  • Loading branch information
jagerber48 committed Dec 18, 2024
1 parent f98349e commit eb29951
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import timeit

import pytest

from uncertainties import ufloat

Expand Down Expand Up @@ -38,7 +39,7 @@ def test_complexity():
assert 0.9 * log10(n / n0) < log10(t / t0) < 1.1 * log10(n / n0)


def test_speed(benchmark):
num_list = (10, 100, 1000, 10000, 100000)
for num in num_list:
benchmark(lambda: time_ufloat_sum_benchmark(num))
@pytest.mark.parametrize("num", (10, 100, 1000, 10000, 100000))
@pytest.mark.benchmark
def test_speed(num):
ufloat_sum_benchmark(num)

0 comments on commit eb29951

Please sign in to comment.