Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Bound sampler buffer, add length feedback message, fix intermittence in test #23139
@jdm I think this should fix the intermittent issue in the tests, and I hope this isn't just extra code to support the tests, since one can also imagine the extra message later becoming useful to show feedback on the sampling process in devtools and the likes, a little bit like the performance feature show below...
Sending the constellation a message after every single sample for each thread seems excessive :) to fix the intermittency of the test, I think we should just check that >0 samples were taken and wait for 100ms.
For the bounding, a VecDeque is a good idea, but 100 is a really small number of samples. It should be configurable via the enabling message, and we should try to bound it by time, rather than number of samoles, defaulting to 10s.
changed the title
Bound sampler buffer, add lenght feedback message, fix intermittence in test
Mar 30, 2019
@jdm Ok, I've added an attempt to limit the sampling in time.
Re checking the number of samples in the test, it appears to me that an issue there is that we only receive the data after having stopped the sampling, so we could do another round if not enough have been taken, and it would seem to make the test too complicated(we would also have to limit the number of tries, and decide on what to do in the unlikely case that all tries resulted in not enough frames having been sampled).
I've instead increased the sleep to 100ms, which seems to reduce the chance of sampling less than 2 rounds to something close to zero(I get 8 or 9 samples taken on a few test runs locally with 100ms, as opposed to 2 or 3 with 30ms).