Productivity Statistics


We're using Intellij IDEA in our company and very happy with it! We're building quite a big project and want to profile our compilation time to see if we organize our modules well.
We'd like to collect stats on how much time is spent on project compilation, module compilation, whole build assembly.

Just wondering if Intellij IDEA already calculates statistics for built-in actions as built, make, etc? If this statistics are in any way accessible - is there are the API to retrieve such stats (compiler milliseconds, etc)? Maybe some events are published, which could be used in in plugins to track the time? Maybe it's in some files at  ~/.IntelliJIdea12/config/options/ ? Do you have any 'hacks' or 'tricks' in you mind?

I assume that none of that could be calculated (or is private to Jetbrains only).
In such case, what would be your advice to add such profiling? Should one develop a profiling compiler (kinda TranslatingCompiler) as a plugin and use it? Any other ideas?


Comment actions Permalink

Hi Ignat,

IJ doesn't collect metrics for compilation speed at the moment. The only availability I'm aware of is to parse idea.log (main menu | help | show log). It contains entries like below (note processing time at the COMPILATION FINISHED line):

2013-05-07 17:48:32,134 [18279481]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2013-05-07 17:48:38,660 [18286007]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /home/denis/work/idea-local/lib/jna.jar:/home/denis/work/idea-local/lib/protobuf-2.4.1.jar:/home/denis/work/idea-local/lib/jna-utils.jar:/home/denis/work/idea-local/lib/jgoodies-forms.jar:/home/denis/work/idea-local/lib/idea.jar:/home/denis/work/idea-local/lib/annotations.jar:/home/denis/work/idea-local/lib/openapi.jar:/home/denis/work/idea-local/lib/util.jar:/home/denis/work/idea-local/lib/javac2.jar:/home/denis/work/idea-local/lib/log4j.jar:/home/denis/work/idea-local/lib/asm4-all.jar:/home/denis/work/idea-local/lib/picocontainer.jar:/home/denis/work/idea-local/lib/optimizedFileManager.jar:/home/denis/work/idea-local/lib/trove4j.jar:/home/denis/work/idea-local/lib/nanoxml-2.2.3.jar:/home/denis/work/idea-local/lib/jps-server.jar:/home/denis/work/idea-local/lib/idea_rt.jar:/home/denis/work/idea-local/lib/resources_en.jar:/home/denis/work/idea-local/lib/oromatcher.jar:/home/denis/work/idea-local/lib/netty-3.6.2.Final.jar:/home/denis/work/idea-local/lib/ecj-4.2.1.jar:/home/denis/work/idea-local/lib/jdom.jar:/home/denis/dev/jdk/jdk1.7.0_05/lib/tools.jar:/home/denis/work/idea-local/plugins/devkit/lib/jps/devkit-jps-plugin.jar:/home/denis/work/idea-local/plugins/uiDesigner/lib/jps/ui-designer-jps-plugin.jar:/home/denis/work/idea-local/plugins/IntelliLang/lib/intellilang-jps-plugin.jar:/home/denis/work/idea-local/plugins/Groovy/lib/groovy-jps-plugin.jar
2013-05-07 17:49:24,978 [18332325]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 89 ms
2013-05-07 17:49:24,978 [18332325]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to update
2013-05-07 17:49:24,978 [18332325]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 0 ms
2013-05-07 17:49:25,067 [18332414]   INFO - lij.compiler.impl.CompilerUtil -      COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 184 took 52148 ms: 0 min 52sec

Regarding providing such statistics - we don't have such demand at the moment as our use-case (distinct projects, no point in comparing their compilation time) differs from yours (single evolving project). However, if you're really interested in that, you can check IJ compilation sub-system sources and send us a patch which exposes that handles making them eligible for plugin writers.

Regards, Denis
Comment actions Permalink

Hey Denis,

First of all, thank you for a promt reply. We'll evaluate which options would we the best for our case.
If any patched would be developed, - we will attach to the post or ask for a pull request.



Please sign in to leave a comment.