JMH

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 20 13:05:06 PST 2016


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 """


More information about the Digitalmars-d mailing list