machines-in-motion / real_time_tools

BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

threadsafe_timeseries.partial_history unit test takes too long #13

Open vincentberenz opened 4 years ago

vincentberenz commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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?