git代码统计工具gitstat安装

时间:2022-10-15 09:57:08

分析结果:

     常规的统计:文件总数,行数,提交量,作者数。
活跃性:每天中每小时的、每周中每天的、每周中每小时的、每年中每月的、每年的提交量。
作者数:列举所有的作者(提交数,第一次提交日期,最近一次的提交日期),并按月和年来划分。
文件数:按日期划分,按扩展名名划分。
行数:按日期划分。

1.环境准备

Python (>= 2.6.0)     #linux默认已经安装
Git (>= 1.5.2.4)
Gnuplot (>= 4.0.0)

2.安装Git

yum install git

3.安装Gnuplot

yum install gnuplot

4.安装gitstat

git clone git://github.com/hoxu/gitstats.git
cd gitstats

git代码统计工具gitstat安装

./gitstats /opt/gitcode/electron-app /root/html

git代码统计工具gitstat安装

git代码统计工具gitstat安装

5.设置配置参数

Usage: gitstats [options] <gitpath..> <outputpath>

Options:

-c key=value Override configuration value

{'project_name': '', 'processes': 8, 'max_domains': 10, 'commit_begin': '', 'max_ext_length': 10, 'commit_end': 'HEAD', 'linear_linestats': 1, 'style': 'gitstats.css', 'max_authors': 20, 'authors_top': 5, 'start_date': ''}

默认时间是从当年的1月份开始到现在,如果只想统计10月份的,可以使用如下命令

./gitstats -c start_date=2018-10-01 /opt/gitcode/electron_app  /root/html