-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add CircleCI build #213
Add CircleCI build #213
Conversation
You are right the 250ms in this case wrong as the thread is sleeping for 250ms, so at least we should add 50ms. However your changes will measure the time for the |
Hmm, I don't think so. I'm just doing the calculation in the main thread after the join to avoid concurrent access to
|
The test measured the time take by a successful call to
Your measure the time for
|
Yes, technically it includes the
Where does the 50 ms come from? |
I use to give 50ms to the cost of an operation. It is often too much, but this is what I've taken as delta. |
How about trying to measure the sleep time and subtract that?
It also adds overhead, but it seems like it could be more precise than than a constant 50 ms. |
Yes, |
Could we could move I'm just trying to avoid having semi-arbitrary constants that vary by both OS and processor in there combined with making the test case rely on another semi-arbitrary threshold ( |
I understand your position. The 50ms is something like a QoI. If an operation takes more than that, there is surely a problem. I don't think moving the measure will change anything. The operation you want to measure should take some time. This is what these tests are measuring. How long do you think is acceptable for a call to a A PR that allows to configure at compile time whether these kind of timing checks are errors or warnings would be a good idea. An alternative idea is to configure at compile time the time acceptable for an operation. With these PR, we could be able to change the delta acceptable or move those checks to warnings. Would you be interested in such a PR? |
It seems that we have already do that, as the Boost release are built already on CircleCI. |
Boost.Geometry is already using CircleCI. What should I do from my side? |
CircleCi doc says to create a .circleci/config.yml file, not a circle.yml file |
I'll merge it to see if I reaches to setup the account. |
"boostorg/geometry" is a separate project from the perspective of CircleCI (each repo in the "boostorg" is a separate project), so it will have to specifically be enabled on this page with someone who is part of the "boostorg" team/org: https://circleci.com/gh/boostorg/thread.
|
Ok. I'll try it. |
It works. The duration is very good. Now it is time to fix the timing issues. Thanks a lot, |
Do you have a PR where you apply only once this change? |
BTW, my changes are not enough. I have yet some issues on some tests that I'll look at later on. https://circleci.com/workflow-run/ab368099-02d9-4030-a82c-6cc0e3988204 |
Here's an example of the change to subtract the measured sleep time (instead of exactly 250ms) in one of the tests: thughes@8cac50b |
@viboes ping ^ |
I see what you are doing, but I want to measure the time of the tested operation, not the whole test. |
You could move I guess the problem is that since on CircleCI the sleep time is highly variable (50 - 100 ms over requested time) by always subtracting exactly 250 ms, the calculation is even more wrong since that extra sleep time swamps the actual locking time. |
Actually, I'm a bit confused as to how the two calculations are actually different. In the case where Note that I only moved the location of |
Oh, I mixed where t1,t0 are stored and where they are used. Your algo is good. Please, could you provide a PR? |
As discussed in #212.
Some notes:
boostorg
group will need to enable the build on CircleCI for it to start building against theboostorg/thread
repo: https://circleci.com/gh/boostorg/threadStill seeing timing issues with some of the lock measurement timing, especially on macOS VMs. I think something like this would fix it if it's measuring the same thing you were originally intending to measure (time to acquire the lock): thughes@d9536b8. The issue that I've seen is that the
boost::this_thread::sleep_for
can oversleep (as allowed) on the VMs, so just subtracting the requested sleep time of 250ms in the calculation will not give an accurate result.