-
Notifications
You must be signed in to change notification settings - Fork 564
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
Setup CI for this project #66
Comments
There already is #49 |
Cool, thanks for pointing it out! |
I've looked at #49 and somehow it seems for from what we're trying to achieve, We need to standardize a few things, like:
Let me know what you guys think. |
I'm not really convinced that running benchmarks in a CI build is a stable enough environment for controlled results. Keep in mind that those machines could be running any number of tasks at any one time, and CPU time stealing may be an issue. The #49 also mentions the issue with changing hardware. Nothing wrong with checking the validity, but to get a source of truth, you'd need end user machines running the code and submitting results. Not a perfectly controlled environment, but better than CI machines for sure. As for duration of execution, somewhat longer runs should reduce frequency scaling differences, but too long, and some chips may lose their turbo boost, screwing with the results. Maybe 30 seconds should be the standard? |
The CI can trigger the jobs on whatever runners we want, for now, the GitHub runners should be fine. If we gather stats after execution we can actually determine the variation in performance and see if it's stable enough. |
Of course there always is a margin of error due to for example the images being updated (you can track updates here.)
As far as I know all runners are the same specs and all are separated virtual machines.
Keep in mind that benchmark is only benchmark and the results will be different on every machine. There is very low chance for 100% reproducible results. I disagree with the statement "Not a perfectly controlled environment, but better than CI machines for sure." Actually the GitHub runners will make it better. Not only they have the same specs as I mentioned before but also there is much less going in these runners than for example someone testing while having browser, email, text editor open and maybe even more open. |
I agree, it isn't. For the actual drag race, we'll need to run everything on a single machine, one at a time. It is, however, very useful to provide ballpark numbers. |
I agree with the standardization points. It would make it a lot easier to create tables. About the runner, can you configure it to only run one job at a time? If that's the case, we might be able to use CI for drag racing after all. |
This is what I'm doing right now, trying to figure out the GitHub actions runner. :) |
I think we can take some steps forward into standardizing the running even before we set up the runners.
If we have solved all the problems above we're ready to add additional operating systems, platforms, etc. using a build matrix. |
Cool! I'll be happy to find out about the results :)
Agreed.
Iterations? 20 seems a bit high, doesn't it? We'd be waiting for one and a half minute per language per CI run. That's not great. I think we should only run it once on CI, by default. For the drag race, we could look at increasing that number.
Yes :) I propose this:
so, simply one line per value, showing number of runs, total time, and the validation result.
In #80, I proposed adding a Dockerfile for each language, and for each type of run. That would do it, right? |
I already added a Dockerfile in my Crystal implementation from the beginning. That should take care of provisioning! |
Great! |
Ok, I think I have a pretty good idea of how this pipeline should look like. |
Perhaps changing the output format to this would make more sense:
Just shamelessly stealing from #66 |
I've added #84 as an example of what we're trying to achieve. We should also consider nightly builds. |
Hi Rolf! Looks like things have kept you hopping! I appreciate it very much!
Just a heads-up… I’m using the PrimeCPP_PAR folder for the parallel implementation that I’m working on for one of the next videos. I just checked in some changes like command line options, etc.
In any event, I was wondering what the best way to discuss things with everyone following the project in github is? Or would it be typical to open an issue for every checkin?
Not sure where the equivalent of a ‘chat’ or ‘message board’ is!
Thanks!
Dave
From: Rolf van Kleef ***@***.***>
Sent: Tuesday, April 6, 2021 11:14 AM
To: davepl/Primes ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [davepl/Primes] Setup CI for this project (#66)
Perhaps changing the output format to this would make more sense:
::set-output name=passes::<number of runs>
::set-output name=totalDuration::<total time>
::set-output name=valid::<validity: {1,true,True,0,false,False}>
Just shamelessly stealing from #66 <https://github.com/davepl/Primes/issues/66>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/davepl/Primes/issues/66#issuecomment-814334218> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCF3XPPMCMVVUU6YFRP3THNFQFANCNFSM42M4UEBQ> . <https://github.com/notifications/beacon/AA4HCF27VGC3DLEL4CYEBUTTHNFQFA5CNFSM42M4UEB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGCE4CCQ.gif>
|
Issues are okay for that but GitHub has "Discussions" feature in beta, they look much more like message boards, you can enable them in repo settings in features section And here example discussions page |
I think it´s fine for you to submit things without announcement to the |
I’m all for a separate branch confess that I have never forked a github branch. If you want to do so and then send me info on where to continue my own work, down in what branch, that’d work. Or give me a more specific mission and I’ll try to figure it out!
Thanks
Dave
From: Rolf van Kleef ***@***.***>
Sent: Wednesday, April 7, 2021 5:00 AM
To: davepl/Primes ***@***.***>
Cc: davepl ***@***.***>; Comment ***@***.***>
Subject: Re: [davepl/Primes] Setup CI for this project (#66)
In any event, I was wondering what the best way to discuss things with everyone following the project in github is? Or would it be typical to open an issue for every checkin?
I think it´s fine for you to submit things without announcement to the main branch, as you indicated you wanted that to primarily contain the code used in your videos. Typically, additions to the main branch are done through Pull/Merge Requests (PRs/MRs, they´re just different terminology used for essentially the same thing). I suspect (and as I asked before), we´ll create a separate branch that will fulfill this purpose for the community contributions (right?).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <https://github.com/davepl/Primes/issues/66#issuecomment-814856234> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA4HCF5MNO6UTQ4HIMKAFPLTHRCN3ANCNFSM42M4UEBQ> . <https://github.com/notifications/beacon/AA4HCF5VIERQG6XSNHXSKTDTHRCN3A5CNFSM42M4UEB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGCI3QKQ.gif>
|
I feel that this thread was hijacked :) |
Sorry @marghidanu :/ After this, this topic should be done with. Then we´ll get back to CI stuff. @davepl, I´ve created a |
I've opened a PR to add Docker to the Rust implementation: #109 It does look like we've got a general problem uploading artifacts from the run, though: https://github.com/davepl/Primes/runs/2305966576
I'm guessing the quick fix for this would be something like replacing We're going to run into issues with very long build times eventually too. It might be possible to limit the PR to build only the projects that have changed, but I suspect this is going to require a bit more custom scripting. |
It looks like the projects are now classified in some way (using subdirectories), this was not the case in the initial design for the CI. I just need to remove the slashes |
Yeah, sorry ´bout that 😬 |
CI is now fixed. Let's aim to standardize output and add more solutions. |
Nice one @marghidanu! |
Hello,
It would be nice to set up some CI to run these implementations in a controlled environment periodically. We're getting benchmarks from different machines, and it is hard to keep track of all the numbers for all the different implementations. We need one source of truth.
The text was updated successfully, but these errors were encountered: