Gerritstats 搭建與使用

Install

# 獲取項目
git clone https://github.com/holmari/gerritstats.git

# 構(gòu)建
./gradlew assemble

Use

獲取數(shù)據(jù)

從 gerrit 獲取統(tǒng)計數(shù)據(jù)(json)

gerrit_downloader [options]

option short brief
--server -s gerrit server ssh 地址, 默認(rèn)端口 29418
--project -p specify project list, default: []
--private-key -i specify ssh private-key
--output-dir -o specify the output directory of statistics data
--limit -l limit the number of commits
--before-date -b commits before the date
--after-date -a commits after the date

Caution:

  • 按項目統(tǒng)計請指定 --project 參數(shù);
  • 請確保通過 ssh 方式連接 gerrit server;
# 從 gerrit 服務(wù)端獲取 項目(java-deploy-demo) 數(shù)據(jù)(json) 通過 ssh 方式
./gerrit_downloader.sh --server 190.168.1.27 --project java-deploy-demo --limit 7500 --output-dir gerrit_out/

數(shù)據(jù)可視化

# 指定 統(tǒng)計數(shù)據(jù)(file/directory) 可視化
./gerrit_stats.sh -f gerrit_out/

Have a look

gerritstats_view.png

Problems

  • 構(gòu)建項目報錯 Execution failed for task ':GerritStats:npmSetup'

    依賴 nodejs -> 安裝 nodejs

  • ssh 連接錯誤

    確認(rèn)對應(yīng)用戶的密鑰對是否配置正確

  • 數(shù)據(jù)可視化報錯 ERROR in Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (72)

    當(dāng)前的 Sass 不支持(匹配) 當(dāng)前環(huán)境,卸載舊版本 node-sass 并安裝最新版本。

    # uninstall
    npm uninstall --save node-sass
    # install
    npm install --save-dev node-sass
    

參考文檔 Gerritstats

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容