Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Give a warning when the [Benchmark] method is static #983

Closed
adamsitnik opened this issue Dec 7, 2018 · 3 comments
Closed

Give a warning when the [Benchmark] method is static #983

adamsitnik opened this issue Dec 7, 2018 · 3 comments
Assignees
Milestone

Comments

@adamsitnik
Copy link
Member

adamsitnik commented Dec 7, 2018

BDN supports only instance methods, when our users try to do sth like:

public class Some
{
   [Benchmark]
   public static void This() { }
}

they get a silent error.

@AndreyAkinshin or maybe we should allow for static method calls?

@AndreyAkinshin
Copy link
Member

@adamsitnik, I'm not sure that static benchmarks is a good idea. It will complicate our generation template and it can introduce some undesirable effects in nanobenchmarks (such a feature should be carefully checked). Let's just warn users about an incorrect signature.

@Rizzen
Copy link
Contributor

Rizzen commented Dec 7, 2018

I can do it.

@AndreyAkinshin
Copy link
Member

@Rizzen thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants