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

Dick bits #2965

Closed
wants to merge 7 commits into from
Closed

Dick bits #2965

wants to merge 7 commits into from

Conversation

DickBaker
Copy link
Contributor

calculate Rating as Double, optimise=true and other tweaks
Issue #2964

2. set Optimise=true (Release build) as Benchmark guidelines
3. append Readkey so results viewable
4. make [some] methods static as analyzer suggestions
5. add .editorconfig file for contributor consistency
@dnfadmin
Copy link

dnfadmin commented Dec 26, 2020

CLA assistant check
All CLA requirements met.

Copy link
Contributor Author

@DickBaker DickBaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why/where/how the .slnf came from [sorry!], but is not material to the PR

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DickBaker while some of your changes are interesting, the intent behind this specific benchmark is to show users how to set up a quick benchmark with minimal complexity, rather than to actually produce the most accurate results and write the most powerful/flexible/comprehensive benchmark. Most of your changes seem like they would make things harder for user new to benchmarking and EF.

It's best to understand exactly what it is you're trying to achieve here, keeping in mind the minimalistic goal for this benchmark.

Some specific comments:

The calculations sum / count as-is yield int when should yield double

This is technically correct, though it wouldn't have any bearing on what this benchmark is actually doing. We can change this though.

Need optimise=true in the .csproj to satisfy Benchmark.net

This is a good idea, as it would allow users to get up and running more quickly.

needs a Console.Read() at end so results can be viewed/kept

This depends on how you're running the benchmarks - I'm assuming you're on VS, where the terminal window gets closed immediately; when running from the commandline, or from an IDE such as Jetbrains Rider, the additional ReadKey is actually disruptive. IMO this doesn't really belong in the benchmark code.

.editorconfig Outdated
@@ -0,0 +1,200 @@
# editorconfig.org
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a .editorconfig for the samples isn't necessary a bad idea, but it's a good idea to split this off to another PR. Specifically, there are two different .editorconfig files in this PR, which also aren't the same as the one we currently use in EF Core itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that my CodeCleanup had wobbled some of the formatting, so I added mine as an explicit .editorconfig rather than have ambiguity. Got carried away and added 2 [whoops, like NYC so good they named it twice]. Happy that you should ditch my templates in favour of an "official one". I liked the simplicity of Roji's original that seemed to command instant wisdom of just pulling what you actually need (just cols/rows critters required not the whole prairie], but spotting the integer-division just had to follow-thru with a full-on OCD response! Honestly, not trying to over-complicate Roji's simple v1 main-dish, but to offer some vn+1 dessert as next course [maybe this should appear later once the newbie has joined the party and not frightened by too much noise. Yeah, maybe.

Anyway I have been exploring various Find/First style as well as Cold/Hot caching and even few basic ADO flavours for comparison & horses/courses. Missing so far is a commentary of when/what suitable, but I hope the BM results will speak for themselves. Your call, and I hope to revise PR 2965 with much more meat shortly and hope doesn't give you too much indigestion as pure vegans. [ok I give up speech-writing and will stay with my day-job!].

Thanks for your launching this perf journey as I find on my consultancy journey that there are many "unknown unknowns" that need a strong torch.

@roji
Copy link
Member

roji commented Jan 7, 2021

@DickBaker thanks for understanding and explaining - we're very interested in any perf results you find during your investigations.

Specifically for this PR and the samples... If you'd like to amend this PR to only contain the more minor improvements I mentioned above (e.g. add the division, the optimize-true), we can definitely merge that. Let me know how you'd like to proceed.

Dick Baker added 2 commits January 7, 2021 18:47
FYI I left in DIYMark as debug convenience [drop before merge]
PK driven like most real-world scenarios [AK too wide etc]
request/sequential/random and caching [avoid r-trip] cases
20 methods = 3xRoji, 5xADO, 4xFind, 2xFirst,2xHybrid, 2xObj, 2xDict
perhaps investigate BM RunStrategy, MaxIterationCount, SimpleJob, ShortRunJob
@roji
Copy link
Member

roji commented Jan 8, 2021

Am closing this as the relevant changes have been committed via #2990

@roji roji closed this Jan 8, 2021
@roji roji mentioned this pull request Jan 8, 2021
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

Successfully merging this pull request may close these issues.

3 participants