Skip to content

Benchmarking implementation #2813

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

Merged
merged 9 commits into from
Jul 27, 2017
Merged

Conversation

codebrain
Copy link
Contributor

@codebrain codebrain commented Jul 25, 2017

First PR!

Benchmarking

  • Sets up the basic benchmark plumbing in the FAKE scripts;
    • Optional command line switch for 'non-interactive' that allows you to run all discovered benchmarks.
    • Can index into an ES instance (command line arguments for url/user/pass)
  • "Clean" target now always performs a clean.
  • Example benchmarks now include PostData benchmarks.
  • Using a custom JSON exporter, until this issue is resolved: JsonExporterBase doesn't include MemoryDiagnoser stats in output dotnet/BenchmarkDotNet#505

@codebrain codebrain requested review from russcam and Mpdreamz July 25, 2017 06:45
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Left some comments skim reading the change set, still need to pull it down and run it locally 👍 💯

let indexName = IndexName.op_Implicit("benchmark-reports")
let typeName = TypeName.op_Implicit("benchmarkreport")

type Memory(gen0Collections:int, gen1Collections: int, gen2Collections: int, totalOperations:int64, bytesAllocatedPerOperation:int64) =
Copy link
Member

Choose a reason for hiding this comment

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

Do we have plans to create a custom Elasticssearch BenchMarkDotNet exporter?

https://github.com/dotnet/BenchmarkDotNet/blob/master/docs/guide/Configs/Exporters.md

That would be such a cool nuget package

Copy link
Member

@Mpdreamz Mpdreamz Jul 25, 2017

Choose a reason for hiding this comment

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

While this works and I know we have these types because the json type provider garbled certain types I rather in the long run we don't maintain these POCO's as part of our build script.

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 completely agree, it's really not ideal - I will switch to just using the raw JSON output at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In terms of the exporter, it might be a nicer way for us to get the data into ES than using the F# script :)

Copy link
Contributor

Choose a reason for hiding this comment

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

++ I think this is good to merge now for progression over perfection and build an exporter afterwards

@@ -70,12 +72,8 @@ module Build =
compileCore incremental

let Clean() =
match (quickBuild, getBuildParam "target" = "clean") with
Copy link
Member

Choose a reason for hiding this comment

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

Why was this removed? this section helped when running tests from the command line to rely on incremental builds. Incremental builds are not that fast on .NET core 1.1 but they still help a great deal.

DotNetCli.RunCommand(fun p ->
{ p with
WorkingDir = testsProjectDirectory
}) "run -f net46 -c Release Benchmark"
Copy link
Member

Choose a reason for hiding this comment

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

Should we hardcode net46 here? The fake command line parser snoops -all off target names so we can e.g do built test and build test-all or build integrate-all which would tests all the TFM's we support.

Should we do something similar for benchmark ?

let private dotnetTest (target: Commandline.MultiTarget) =

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed offline. The net46 framework is only the framework under which to run Tests.exe and the benchmark switcher. The framework used for benchmarking tests is chose through the benchmark configuration for the chosen benchmark.

@Mpdreamz
Copy link
Member

Appveyor is not happy because it can not find the DocGenerator

https://ci.appveyor.com/project/Mpdreamz/elasticsearch-net/build/1.0.245

Output path changes not completely in sync with: #2806

@codebrain codebrain force-pushed the feature/master-profiling-benchmarking branch from 4fa7dae to 2485f1b Compare July 27, 2017 00:35
Renamed TestMain to Main to allow for benchmarking, if you'd like to run tests in VS rename back to TestMain.
Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

LGTM

@codebrain codebrain merged commit eca4335 into master Jul 27, 2017
codebrain pushed a commit that referenced this pull request Jul 27, 2017
Added benchmarking capabilities;

- Control over run counts
- Collects memory diagnostics
- Store results in an ES instance

(cherry picked from commit eca4335)
codebrain pushed a commit that referenced this pull request Jul 27, 2017
Added benchmarking capabilities;

- Control over run counts
- Collects memory diagnostics
- Store results in an ES instance

(cherry picked from commit eca4335)
awelburn pushed a commit to Artesian/elasticsearch-net that referenced this pull request Nov 6, 2017
Added benchmarking capabilities;

- Control over run counts
- Collects memory diagnostics
- Store results in an ES instance
@Mpdreamz Mpdreamz deleted the feature/master-profiling-benchmarking branch January 30, 2018 15:08
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.

JsonExporterBase doesn't include MemoryDiagnoser stats in output
3 participants