You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2019/11/06 19:12:01 UTC

[beam] 01/01: Increase overhaed budget for test_sampler_transition_overhead

This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch aaltay-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 9b043c983473eeb3a0b508c18426412dc67a0a58
Author: Ahmet Altay <aa...@gmail.com>
AuthorDate: Wed Nov 6 11:11:50 2019 -0800

    Increase overhaed budget for test_sampler_transition_overhead
    
    This test is flaky when it is run under load. Increasing overhead budget as a temporary fix.
    
    A better solution would be to change the test structure to not depend on specific timings.
---
 sdks/python/apache_beam/runners/worker/statesampler_test.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sdks/python/apache_beam/runners/worker/statesampler_test.py b/sdks/python/apache_beam/runners/worker/statesampler_test.py
index 176f6e5..b522294 100644
--- a/sdks/python/apache_beam/runners/worker/statesampler_test.py
+++ b/sdks/python/apache_beam/runners/worker/statesampler_test.py
@@ -117,6 +117,11 @@ class StateSamplerTest(unittest.TestCase):
     elapsed_time = time.time() - start_time
     state_transition_count = sampler.get_info().transition_count
     overhead_us = 1000000.0 * elapsed_time / state_transition_count
+    
+    # TODO: This test is flaky when it is run under load. A better solution
+    # would be to change the test structure to not depend on specific timings.
+    overhead_us = 2 * overhead_us
+    
     logging.info('Overhead per transition: %fus', overhead_us)
     # Conservative upper bound on overhead in microseconds (we expect this to
     # take 0.17us when compiled in opt mode or 0.48 us when compiled with in