问题
Guava has a guava-tests
subdirectory that contains a directory subtree called benchmark
. It appears that executing mvn test
(or mvn install
) runs the full suite of unit tests in the test
subtree, but nothing is run in the benchmarks suite.
My question is: how do you actually run the benchmark suite? In other words, if I download the guava source from git (say, in a Linux environment), what are the steps I need to take to build guava and run its benchmark suite locally?
There is surprisingly little information about this online. I stumbled across this old Google groups post, as well as a git issue about adding documentation for this, but I haven't found much else.
回答1:
Based on the comment by cgdecker it seems you cannot (easily) run the benchmarks since they don't even compile externally. For now they're effectively released simply for reference. Clearly the Guava team intends to let external users run the benchmarks, but it hasn't been done yet. Commenting on the bug, especially if you include use-case information (i.e. say more than just "+1"), would presumably help them prioritize getting this done.
来源:https://stackoverflow.com/questions/36996056/how-do-i-run-guavas-benchmark-suite