Only some performance bottlenecks can be detected by bad coding practives, but only real profiling tools can quite easily detect new memory or CPU perfs problems between releases and dev commits.
Most profiling tools (jprofiler for example) can export results of profiling session. Very interesting metrics could be extracted from such reports and reported into the sonar interface.
Profiling session on a reference test project for the project to analyse could be launched from command line via a maven plugin, and results then collected by sonar as a first integration. This would be a first step for a POC, as well as choosing a good profiling tool, that exports data in an easily usable format
|Field||Original Value||New Value|
|Priority||Major [ 3 ]||Minor [ 4 ]|
|Status||Open [ 1 ]||In Progress [ 3 ]|
|Component/s||Profiler [ 14374 ]|
|Resolution||Fixed [ 1 ]|
|Status||In Progress [ 3 ]||Resolved [ 5 ]|
|Fix Version/s||PROFILER-0.1 [ 16310 ]|
|Project Import||Wed May 27 15:34:50 CEST 2015 [ 1432733690440 ]|
|Project Import||Wed Jun 03 10:43:16 UTC 2015 [ 1433328196345 ]|
|Workflow||jira [ 38527 ]||Default SonarSource Workflow [ 58878 ]|
|Workflow||Default SonarSource Workflow [ 58878 ]||Default Agile SonarSource Workflow [ 78743 ]|
|Workflow||Default Agile SonarSource Workflow [ 78743 ]||Default Agile SonarSource Workflow V2 [ 107525 ]|
|Workflow||Default Agile SonarSource Workflow V2 [ 107525 ]||Default Agile SonarSource Workflow V3 [ 131366 ]|