Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threadsafe_timeseries.partial_history unit test takes too long #13

Open
vincentberenz opened this issue Nov 29, 2019 · 2 comments
Open

Comments

@vincentberenz
Copy link
Contributor

@luator

takes around 20 seconds on my machines. If possible, should be shorter. (I guess we can live with it otherwise). not sure who I should assign.

@luator luator changed the title threadsafe_timeseries.partial_history ut takes too long threadsafe_timeseries.partial_history unit test takes too long Dec 11, 2019
@luator
Copy link
Member

luator commented Dec 11, 2019

I looked at the code of the test. In the partial_history case, the slow flag is set to true which results in adding a 1ms sleep in a loop here.

There are two options to speed up the test:

  1. reduce the sleep duration (might not be desired for this test?)
  2. reduce the length of the input data (=number of iterations of the loop containing the sleep). Currently the length is hard-coded here.

I am not familiar with this test. Would reducing the length be okay or would this invalidate the test in some way? @mwuethri maybe you can take a look, this seems to be at least partially coming from you.

@wumanu
Copy link
Collaborator

wumanu commented Dec 11, 2019

yes, reducing the data length should be fine (as long as it is longer than the time-series).

i am not familiar with this test anymore because @MaximilienNaveau rewrote it almost completely. i think he also added the extended sleep, which makes it so slow, to prevent issues on non-realtime machines. @MaximilienNaveau could you have a look at the issue above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants