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

Detect virtual machine environment #167

Closed
AndreyAkinshin opened this Issue May 6, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@AndreyAkinshin
Member

AndreyAkinshin commented May 6, 2016

Some people try to run benchmark on virtual machines. It can affect benchmark results because of virtualization effects and incorrect Stopwatch.Frequency value. We should definitely add a line about VM in the environment info. Possibly we also should add a warning.

See also: http://stackoverflow.com/questions/498371/how-to-detect-if-my-application-is-running-in-a-virtual-machine

@AndreyAkinshin AndreyAkinshin added this to the v0.9.x milestone May 6, 2016

@adamsitnik

This comment has been minimized.

Show comment
Hide comment
@adamsitnik

adamsitnik May 7, 2016

Member

I am one of these people ;) We could add it to the EnvironmentAnalyser

Member

adamsitnik commented May 7, 2016

I am one of these people ;) We could add it to the EnvironmentAnalyser

@lukasz-pyrzyk

This comment has been minimized.

Show comment
Hide comment
@lukasz-pyrzyk

lukasz-pyrzyk Jul 29, 2017

Collaborator

I have an idea how to do it,. Can you assign me to this feature?

Collaborator

lukasz-pyrzyk commented Jul 29, 2017

I have an idea how to do it,. Can you assign me to this feature?

@AndreyAkinshin

This comment has been minimized.

Show comment
Hide comment
@AndreyAkinshin

AndreyAkinshin Jul 29, 2017

Member

@lukasz-pyrzyk, great! I removed the up-for-grabs issue and send you an invitation to be a collaborator (I need it to put you in the assignees field). Looking forward to the PR.

Member

AndreyAkinshin commented Jul 29, 2017

@lukasz-pyrzyk, great! I removed the up-for-grabs issue and send you an invitation to be a collaborator (I need it to put you in the assignees field). Looking forward to the PR.

@lukasz-pyrzyk lukasz-pyrzyk referenced this issue Aug 14, 2017

Merged

Detecting virtual machine hypervisor, #167 #527

4 of 4 tasks complete

adamsitnik added a commit that referenced this issue Aug 31, 2017

Detecting virtual machine hypervisor, #167 (#527)
* Detecting Hyper-V hypervisor, #167

* Fixed typo

* Detecting VirtualBox

* Null checks for HyperV

* Detecting VMWare

* Typo in VMware

* Added information about VM overhead and vm detector

* Usage of the default static instanse, code cleanup

* Less null checks by usage of ContainsVmIdentifier

* Removed redundant #IF in stringextensions

* Running VmIdentifier on the Appveyor

* Message to const, initialization of the skip field from the static ctor

* Check with conditional operator

* Running WMI code only on classic .net

* Usage of RuntimeInformation.IsClassic

@adamsitnik adamsitnik modified the milestones: v0.10.10, v0.10.x Aug 31, 2017

@adamsitnik adamsitnik closed this Aug 31, 2017

alinasmirnova added a commit to alinasmirnova/BenchmarkDotNet that referenced this issue Sep 22, 2018

Detecting virtual machine hypervisor, dotnet#167 (dotnet#527)
* Detecting Hyper-V hypervisor, dotnet#167

* Fixed typo

* Detecting VirtualBox

* Null checks for HyperV

* Detecting VMWare

* Typo in VMware

* Added information about VM overhead and vm detector

* Usage of the default static instanse, code cleanup

* Less null checks by usage of ContainsVmIdentifier

* Removed redundant #IF in stringextensions

* Running VmIdentifier on the Appveyor

* Message to const, initialization of the skip field from the static ctor

* Check with conditional operator

* Running WMI code only on classic .net

* Usage of RuntimeInformation.IsClassic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment