Programmer utility codes recommend a statistical artifact GitStats

Read the full 7 minutes, very useful tool.

1 Introduction

For Git project development, there are some visual tools, such as gitk, giggle like to see the history of the development of the project. But for large projects, these simple visual tools far short of a complete understanding of the project development history, some of the quantitative statistics (eg amount of daily submission, the number of lines, etc.) to better reflect the development process of the project and activity. Today, we recommend this tool: GitStats , it can generate some statistics are as follows, and can be graphically display contrast.

2. Learn more Gitstats

Further speaking, Gitstats it is a git repository analysis software that can check the warehouse and generate statistics on historical data. It can help you see the git repository submission status, according to the different dimensions of analysis and calculation, and automatically generate data charts.

Official website: http://gitstats.sourceforge.net/

The statistical information generated current GitStats commonly classified as follows:

  • General statistics: total number of files, the number of lines, submit the amount of numbers.
  • Activity: , in the day of a week, a month of each year, submit an annual amount per hour of every day of every week of every hour.
  • Number of authors: list all authors (submission number, the first filing date, the filing date of the most recent), and divided by month and year.
  • Number of files : by date divided, divided by extension name.
  • Number of lines: a date-based.

3. Command line installation

Installation is very simple, if it is ubuntu, apt-get directly to, the following describes installation under several different operating systems.

Ubuntu:

apt-get install gitstats

CentOS:

yum install gitstats

Mac:

brew install --HEAD homebrew/head-only/gitstats

If a Mac, you will have to put on a gnuPlot, when used under Windows GitStats need to have Python, Git, Gnuplot.

  • Python: GitStats itself is a python script, we need to use the windows python command to run GitStats.
  • Git: The need to explain also know that is a must.
  • Gnuplot : gnuplot an interactive drawing tool command line.

4. Installation and use of the source

Open gitbash git or other client, enter the following:

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

After the download is complete, enter gitstats directory, gitstats copy files to gitstats.py

$ cp gitstats gitstats.py

Then the command execution statistics

$ python gitstats.py ../xxx_pro/ ./test

../xxx_pro/ for the project directory.
./test the result files.

Upon completion, the test directory, double-click the index.html file to view the statistics.

5. Specific operation

In order to facilitate the reader can intuitively feel, through the following specific practical operation, take you to a taste of the action gitstats to Requests project as an example.

1, cloned Download Requests to the local source.

git clone https://github.com/psf/requests.git

2, gitstats into the directory, and the copy is gitstats.py gitstats file, reference to the above described fourth section.

cp gitstats gitstats.py

3, see gitstats directory structure:

➜  gitstats git:(master) ✗ tree -L 1
.
├── Makefile
├── arrow-down.gif
├── arrow-none.gif
├── arrow-up.gif
├── doc
├── gitstats
├── gitstats.css
├── gitstats.py
├── sortable.js
└── test

2 directories, 8 files

4, execution statistics command:

python gitstats.py ../requests ./test

5, after execution statistics, the test result generated in the local directory, the file structure shown below catalog generation.
image

Open index.html report, as shown below. First, global statistics reports, including on gitstats:

  • Time and time it takes to generate reports generate: If it takes 11 seconds
  • Report covering the period: as February 14, 2011 to November 23, 2019
  • Age: The repo age, such as "3206 days, 1400 days which is active day."
  • The number of files and codes: such as: 101 documents, 20 005 thousand lines of code.
  • Number of authors: as 645, each of 9.2 times the average number of commits.

image

In addition, it also includes:

1. The time dimension of efficiency analysis: ,, in every hour of every week, every year in the month of submission per day per hour of every day of every week of every year.
image
image

2. The dimensions of the submitter activity statistics: list all authors (submission number, the first filing date, the filing date of the most recent), and divided by month and year.
image

3. Number of files: a date-based, by extension name division.
image

4. According to statistics submitted by the number of rows or submit tag.

image

If you are a team leader, concerned about the team development efficiency and passion; if you are open-source software developer, maintainer of a repo; Or, you care for an open source software development or progress of the current team, then you can try a try gitstats.

Click to view the original , I hope this article can help you! For more articles please visit us dry.

This article first appeared in public number: [Test] technology development, we welcome the attention I!

Guess you like

Origin www.cnblogs.com/jinjiangongzuoshi/p/11955958.html