How to track and record assembly (compilation / testing time)?

I am working on a large-explicit Java project. We use maven as our build tool, and I use Intellij (14) as my IDE.

Currently, if I am building an entire project (approximately 15 modules), it takes about 3 minutes. Due to the fact that we use our code (even in development), I end up doing a complete build quite often. Based on the fact that โ€œwhat is being measured is controlledโ€, I would like to track / record:

  • How many times per hour / day was the assembly launched?
  • How much time was spent assembling?
  • If it were possible, break it with the maven task, i.e. clean / compile / test / other plugins, etc.

One approach may be to output the maven file to files, and then have a process for reading / calculating the statistics I want. How do I approach this?

To be clear, I am not asking for comments / tips on how to reduce the execution time of the build cycle. We have already worked on this a little and continue to work on it - indeed, I am really looking for a way to track our effective progress in this.

+7
java intellij-idea maven compilation build
source share
1 answer

This Maven project project can help you.

Just install (copy) your latest jar to your $ {M2_HOME} / lib / ext, and then build as follows

mvn clean install -Dmaven.profile 

Will provide you with the following sample output

  com.sample:test:0.0.1-SNAPSHOT clean 175ms org.apache.maven.plugins:maven-clean-plugin:2.5 (default-clean) 175ms process-resources 336ms org.apache.maven.plugins:maven-resources-plugin:2.6 (default-resources) 335ms compile 1s 2ms org.apache.maven.plugins:maven-compiler-plugin:2.5.1 (default-compile) 1s 2ms process-test-resources 9ms org.apache.maven.plugins:maven-resources-plugin:2.6 (default-testResources) 9ms test-compile 59ms org.apache.maven.plugins:maven-compiler-plugin:2.5.1 (default-testCompile) 59ms test 1s 83ms org.apache.maven.plugins:maven-surefire-plugin:2.12.4 (default-test) 1s 83ms package 352ms org.apache.maven.plugins:maven-jar-plugin:2.4 (default-jar) 352ms 

Then you need an extra layer (script?) To accumulate data to get cross-assembly statistics. However, he already answers your third question, and this is probably a good start.

+1
source share

All Articles