Skip to content

BenchmarkDotNet as global tool (#1006), fixes #213 #1033

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 2 commits into from
Feb 1, 2019
Merged

Conversation

adamsitnik
Copy link
Member

No description provided.

CodeTherapist and others added 2 commits January 12, 2019 18:30
* BenchmarkDotNet as global tool

This resolves #213.

* Set TargetFramework to "netcoreapp2.1"

* Add import for common build properties.

* Docs: BenchmarkDotNet as global dotnet tool
# Conflicts:
#	BenchmarkDotNet.sln
@adamsitnik
Copy link
Member Author

The CI failure is not related, merging!

@adamsitnik adamsitnik merged commit ccee3e8 into master Feb 1, 2019
@adamsitnik adamsitnik deleted the tools branch February 1, 2019 06:35
@WojciechNagorski
Copy link
Contributor

WojciechNagorski commented Feb 1, 2019 via email

@adamsitnik
Copy link
Member Author

@wojtpl2 thanks for letting me know!

@WojciechNagorski
Copy link
Contributor

Run .NET Core 2.x dll from bin (not published)
If you add new nuget package to your benchmark project and build it (eg `\bin\release') you can't use:

dotnet benchmark .\myassembly.dll

because global tool can't load all refenrenced assembly. .NET Core 2.x doesn't copy all referenced nugets to bin directory. This time we can't use Assembly.Load() becasue global tool is running from

C:\Users\wnagorsx\.dotnet\tools\.store\benchmarkdotnettool\0.11.3-develop\benchmarkdotnettool\0.11.3-develop\tools\netcoreapp2.1\any

Not from myassembly.dll location. I'm fixing this problem and I found solution.

BenchmarkDotNet.Diagnostic.Windows
Tool should have reference to:

<ProjectReference Include="..\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />

Without it you can't use e.g.: --profiler ETW
I'll fix it too.

Name of global tool
The name of global tool should be benchmark not benchmarkdotnet #1006 (comment)

@AndreyAkinshin AndreyAkinshin added this to the v0.11.4 milestone Feb 2, 2019
@CodeTherapist
Copy link
Contributor

@wojtpl2 Hmm.. sorry for those inconveniences from my PR. I would be happy to be mentioned here. I strongly believe in learning from my own faults and from other developers how they solve issues - It's continuous learning and improving myself to become better and some point in time teaching others...

@WojciechNagorski
Copy link
Contributor

@CodeTherapist Please, do not take it to yourself. You definitely did great job! You had a really big impact on this feature. Without you this feature wouldn't be released in this version.

I found this imperfections in task #1016 because I had to use this tools. It was working but I checked more test cases. Nothing more.

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.

4 participants