Sniffer4j is tool for mesuring Java code performance included in the specified packages.
Although we can use several methods to obtain microbenchmarks, there are disadvantages as follows:
-
Hard code to the measurement target:
We have to embed measurement code every time we want to measure,
and we DO NOT want to corrupt the implementation with code not related essential more than anything else.... -
AspectJ:
We need to prepare advices for measuring microbenchmarks and also require AspectJ learning costs.
We want to obtain microbenchmarks more SIMPLY!!
- Java 8+ (-Java 7 does not work)
See instructions as follows:
mvn package
./gradlew jar
java -javaagent:/path/to/sniffer4j.jar=<options> <YOUR_APP>
Option | Type | Description | Example |
---|---|---|---|
patterns |
Regex | Regular Expression that specifies the packages to be measure. You can use ; to specify multiple packages. |
patterns=org.example.*;com.example.controller |
logpath |
String | UNDERCONSTRUCTIONS | logpath=/path/to/sniffer4j.log |
-
threshold
option - JUL(java.util.logging) implementation
- Pluggable implementation
- periodically output
- Virsualization