Yes, something like that would be nice. But as the website states you need to use maven to build the project that uses that library.

I can only suspect, but I think they use maven to collect all functions that use @Benchmark. And this leads to the problem the unittest library proposal for phobos had.

The problem was that the user had to create a custom main that listed all modules to check for tests or use a build tool with some globbing commands. Both not perfect.

""" Shameless self promoting ON """

With PR: https://github.com/D-Programming-Language/phobos/pull/2995

you can write:

```
void funToTest(string, int, float) {
    // funToTest impl
}

unittest {
    benchmark!funToTest();
}
```

and then you only have to pass the -unittest switch to dmd and be happy.

""" Shameless self promoting OFF """
  • JMH Andrei Alexandrescu via Digitalmars-d
    • Re: JMH Robert burner Schadek via Digitalmars-d
      • Re: JMH Russel Winder via Digitalmars-d
      • Re: JMH Jacob Carlborg via Digitalmars-d
        • Re: JMH Chris Wright via Digitalmars-d
          • Re: JMH Jacob Carlborg via Digitalmars-d
      • Re: JMH Jakob Jenkov via Digitalmars-d

Reply via email to