Skip to main content

SSL Metrics - Git History (LOC/KLOC) Analysis

Project description

SSL Metrics git Commit LOC Extractor

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

DOI Release to PyPi, GitHub, and Zenodo

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

  1. Install Python 3.9.6 +
  2. (Recommended) Create a virtual environment with python3.9 -m venv env and activate it
  3. Run pip install ssl-metrics-git-commits-loc
  4. Generate a JSON data set with ssl-metrics-git-commits-loc-extract -d DIRECTORY -b BRANCH -o FILENAME.json
  5. 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
  • --x-window-min: The smallest x value that will be plotted
  • --x-window-max: The largest x value that will be plotted

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssl-metrics-git-commits-loc-0.7.3.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssl_metrics_git_commits_loc-0.7.3.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file ssl-metrics-git-commits-loc-0.7.3.2.tar.gz.

File metadata

  • Download URL: ssl-metrics-git-commits-loc-0.7.3.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for ssl-metrics-git-commits-loc-0.7.3.2.tar.gz
Algorithm Hash digest
SHA256 0451d0ad31aadf4362a2095c27b1ac319c83ba3bc77e4a4a626b843275e61a1e
MD5 f73a7709e28e8070d40bf6f8003f43f9
BLAKE2b-256 d3740e6381d7a61a6e57001d1218246f57dcdb329255b8a4a9259ab94309ea21

See more details on using hashes here.

File details

Details for the file ssl_metrics_git_commits_loc-0.7.3.2-py3-none-any.whl.

File metadata

  • Download URL: ssl_metrics_git_commits_loc-0.7.3.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for ssl_metrics_git_commits_loc-0.7.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7290e3e654f00fd7e616e41072c66c8572ae3c3f96fabfd75c03b427c5cb7e7
MD5 dc6ac41152e60e7b88ac844704199518
BLAKE2b-256 285ae258a5126b66e26e35cad38e686d89bd5b4186eaba438869cd4fa65511d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page