SSL Metrics - Git History (LOC/KLOC) Analysis
Project description
SSL Metrics git
Commit LOC Extractor
Using
git
, extract Lines of Code (LOC) data from a repository and graph various metrics from it
About
This is a proof of concept demonstrating that it is possible to use git
to extract various Lines of Code (LOC) data from a repository and graph various metrics from it.
This software extracts LOC, Delta LOC, and KLOC (LOC / 1000) for every commit within a singular branch of a local git
repository and stores it within a .json
file.
This file can then be piped into a bundled graphing utility to graph the following for LOC, Delta LOC, and KLOC:
- Actual data
- Trend line
- Velocity of trend line
- Acceleration of trend line
The graphs can be saved as a .png
, .pdf
, or any compatible format that matplotlib
supports.
How to Run
Installation
From pip
- Install
Python 3.9.6 +
- (Recommended) Create a virtual environment with
python3.9 -m venv env
and activate it - Run
pip install ssl-metrics-git-commits-loc
- Generate a JSON data set with
ssl-metrics-git-commits-loc-extract -d DIRECTORY -b BRANCH -o FILENAME.json
- Generate graphs with
ssl-metrics-git-commits-loc-graph -i FILENAME.json -l LOC_GRAPH_FILENAME.* -d DELTA_LOC_GRAPH_FILENAME.* -k K_LOC_GRAPH_FILENAME.* -m ESTIMATED_POLYNOMIAL_DEGREE -r REPOSITORY_NAME
Command Line Arguments
ssl-metrics-git-commits-loc-extract
-h
,--help
: Shows the help menu and exits-d
,--directory
: Directory where the.git
folder is located-b
,--branch
: Git branch to analyze-o
,--output
: Output analysis to JSON file
ssl-metrics-git-commits-loc-graph
-h
,--help
: Shows the help menu and exits-i
,--input
: The input data file that will be read to create the graphs-l
,--graph-loc-filename
: The filename to output the LOC graph to-d
,--graph-delta-loc-filename
: The filename to output the Delta LOC graph to-k
,--graph-k-loc-filename
: The filename to output the K LOC graph to-m
,--maximum-degree-polynomial
: Estimated maximum degree of polynomial-r
,--repository-name
: Name of the repository that is being analyzed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ssl-metrics-git-commits-loc-0.7.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396b4a93ba9c79d64f7239e2ac4ca7f671a94a2001c57df16d55b79936e66b63 |
|
MD5 | 8bf69417d85b7ef69ea33090a1f36e8a |
|
BLAKE2b-256 | dc5dac60034dca90016fa011b3c570527571b6fcdf792c8ef8bbe1598935ed32 |
Hashes for ssl_metrics_git_commits_loc-0.7.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fce03f7ff62440734c43b1420dd220bc30190444e5732008ac3c047581affedb |
|
MD5 | a34675d47dde4445eb11c1eed9070e13 |
|
BLAKE2b-256 | f358677e82ee1c27b9ca7a35867a6de10e89c85033a9b33f7fc88c6e1cdfda12 |