Skip to content

Commit

Permalink
increase tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim committed Dec 20, 2024
1 parent fdb2c30 commit e6750cc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/profiling_v2/test_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def test_accuracy_libdd():

from ddtrace.profiling import profiler
from tests.profiling.collector import pprof_utils
from tests.profiling.test_accuracy import CPU_TOLERANCE
from tests.profiling.test_accuracy import assert_almost_equal
from tests.profiling.test_accuracy import spend_16

Expand Down Expand Up @@ -47,10 +46,10 @@ def test_accuracy_libdd():
assert_almost_equal(wall_times["spend_16"], 16e9)
assert_almost_equal(wall_times["spend_7"], 7e9)

assert_almost_equal(wall_times["spend_cpu_2"], 2e9)
assert_almost_equal(wall_times["spend_cpu_3"], 3e9)
assert_almost_equal(cpu_times["spend_cpu_2"], 2e9, CPU_TOLERANCE)
assert_almost_equal(cpu_times["spend_cpu_3"], 3e9, CPU_TOLERANCE)
assert_almost_equal(wall_times["spend_cpu_2"], 2e9, tolerance=0.07)
assert_almost_equal(wall_times["spend_cpu_3"], 3e9, tolerance=0.07)
assert_almost_equal(cpu_times["spend_cpu_2"], 2e9, tolerance=0.07)
assert_almost_equal(cpu_times["spend_cpu_3"], 3e9, tolerance=0.07)


@pytest.mark.subprocess(
Expand Down Expand Up @@ -96,7 +95,7 @@ def test_accuracy_stack_v2():
assert_almost_equal(wall_times["spend_16"], 16e9)
assert_almost_equal(wall_times["spend_7"], 7e9)

assert_almost_equal(wall_times["spend_cpu_2"], 2e9)
assert_almost_equal(wall_times["spend_cpu_3"], 3e9)
assert_almost_equal(wall_times["spend_cpu_2"], 2e9, tolerance=0.07)
assert_almost_equal(wall_times["spend_cpu_3"], 3e9, tolerance=0.07)
assert_almost_equal(cpu_times["spend_cpu_2"], 2e9, tolerance=0.07)
assert_almost_equal(cpu_times["spend_cpu_3"], 3e9, tolerance=0.07)

0 comments on commit e6750cc

Please sign in to comment.