我使用聲吶與螞蟻,導入Cobertura和單元測試結果和運行代碼質量分析與設置「Sonar + FindBugs」。我以前可以用Sonar分析我的(大型)項目。我不知道,也許我已經做了一些改變,但現在分析還沒有完成。聲納已成功導入的Cobertura報告,然後嘗試執行的裝飾,但它只是掛起(幾個小時):聲吶分析掛在執行裝飾器
p.PhasesTimeProfiler - 執行裝飾...
我都已經Windows7上和RHEL 6噸的機器測試了這個。我已經增加了ANT java堆到2048M。在較小的設置下,我通常會在某個時候得到一個超過了-xception的java堆。該進程當前正在運行,並且該進程正在使用2266M的內存。
任何想法? :)
聲納掛起前的最後幾行是低於(調試模式):
[sonar:sonar] 10:25:24.348 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.350 DEBUG emDashBoardDecorator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.505 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.505 DEBUG emDashBoardDecorator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.986 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.986 DEBUG emDashBoardDecorator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.994 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:24.995 DEBUG emDashBoardDecorator - Checking for resource type: CLA
[sonar:sonar] 10:25:25.206 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:25.206 DEBUG emDashBoardDecorator - Checking for resource type: CLA
[sonar:sonar] 10:25:25.214 DEBUG raphMetricAggregator - Checking for resource type: CLA
[sonar:sonar] 10:25:25.214 DEBUG emDashBoardDecorator - Checking for resource type: CLA
隨着SQL設置聲納Ant目標冗長,它掛在最終的SQL語句是這樣的:
[sonar:sonar] 10:00:31.855 DEBUG org.hibernate.SQL - select snapshot0_.id as
id7_, snapshot0_.build_date as build2_7_, snapshot0_.created_at as created3_7_,
snapshot0_.depth as depth7_, snapshot0_.islast as islast7_, snapshot0_.parent_sn
apshot_id as parent6_7_, snapshot0_.path as path7_, snapshot0_.period1_date as p
eriod8_7_, snapshot0_.period1_mode as period9_7_, snapshot0_.period1_param as pe
riod10_7_, snapshot0_.period2_date as period11_7_, snapshot0_.period2_mode as pe
riod12_7_, snapshot0_.period2_param as period13_7_, snapshot0_.period3_date as p
eriod14_7_, snapshot0_.period3_mode as period15_7_, snapshot0_.period3_param as
period16_7_, snapshot0_.period4_date as period17_7_, snapshot0_.period4_mode as
period18_7_, snapshot0_.period4_param as period19_7_, snapshot0_.period5_date as
period20_7_, snapshot0_.period5_mode as period21_7_, snapshot0_.period5_param a
s period22_7_, snapshot0_.purge_status as purge23_7_, snapshot0_.qualifier as qu
alifier7_, snapshot0_.project_id as project25_7_, snapshot0_.root_snapshot_id as
root26_7_, snapshot0_.root_project_id as root27_7_, snapshot0_.scope as scope7_
, snapshot0_.status as status7_, snapshot0_.version as version7_ from snapshots
snapshot0_ where snapshot0_.islast=? and snapshot0_.project_id=(select resourcem
o1_.id from projects resourcemo1_ where resourcemo1_.kee=?)
[sonar:sonar] 10:00:31.899 DEBUG org.hibernate.SQL - select snapshotso0_.id a
s id13_, snapshotso0_.data as data13_, snapshotso0_.snapshot_id as snapshot3_13_
from snapshot_sources snapshotso0_ where snapshotso0_.snapshot_id=?
在第二輪我也有這樣的:
[sonar:sonar] 11:16:40.149 DEBUG b.b.JdbcDriverHolder - To prevent a memory leak
, the JDBC Driver [com.mysql.jdbc.Driver] has been forcibly deregistered
當我還沒有增加Java堆大小ND通過詹金斯執行聲納Ant目標,我得到以下:如果我增加Ant來使用2048M,但隨後的裝飾掛起,如同第一誤差輸出不發生
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2746)
at java.util.ArrayList.ensureCapacity(ArrayList.java:187)
at java.util.ArrayList.add(ArrayList.java:378)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.mapViolations(ViolationTrackingDecorator.java:131)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.decorate(ViolationTrackingDecorator.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:63)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:63)
上面的Java堆空間的問題。
你使用了哪些數據庫? –
我正在使用MySQL – user1340582
您的版本是否與MySQL服務器在同一臺機器上運行?當Sonar在網絡上運行時,尤其是廣域網,我們注意到顯着的性能下降.... –