maven-profiler
maven-profiler copied to clipboard
Plugin total impact
Can the HTML include a table with the cumulative reactor time for each plugin execution?
Could you give an example ? Will you be interested in contributing it ?
You could sum up the plugin execution times for the project's modules. That would produce a JSON like
{
"mojo": "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile {execution: default-compile}",
"time": "765 ms",
"moduleTime": "312611 ms"
}
But then the table for the parent project would include plugins that didn't run on it, and the HTML would get quite heavy.
Another way would be to make a single table with the vertical axis as all plugin executions, and the horizontal as projects. The order of the executions must be lost, but I don't think that's such an issue. In such a table you'd have to add the module times to the project, so that won't work.
The question is, what am I going to do with this information? I really just want to see how the addition of a plugin slows down my build. I can't see that when the plugin's affect is spread over 500 projects. So I would be content with a list of totals for all plugin executions run in the build, in descending times, i.e. add a mojos array to the root of the JSON.
{
"name": "My Top Level Project",
"profile_name": "",
"time": "356356 ms",
"mojos": [{
...
Maybe one of these days I'll get into writing Java :)