SoftengPoliTo / SoftwareMetrics

2 stars 0 forks source link

SoftwareMetrics

Goal

SoftwareMetrics compares different programming languages in order to determine which one is better than another according to a specific set of metrics.

Applying a series of tool on an algorithm written in different programming languages, we obtain a set of metrics necessary to make the comparisons between languages.

Usage

git clone --recurse-submodules -j8 https://github.com/SoftengPoliTo/SoftwareMetrics
make install
./analyzer.py -p <path_to_the_code_to_analyze>

To update submodules:

git submodule update --recursive --remote
make clean
make install

Used tools

Tokei

Used for: SLOC, LLOC, CLOC, BLANK

* Building: Ok
* Local installation: Ok

Can analyze either a single file or an entire directory

Rust Code Analysis

Used for: SLOC, PLOC, LLOC, CLOC, BLANK, NOM, CC, COGNITIVE, HALSTEAD, MI

* Building: Ok
* Local installation: Ok

Can analyze either a single file or an entire directory

Comparisons among different programming languages

To run the series of comparisons among the metrics produced by rust-code-analysis on some codes written in different programming languages, it is necessary to install json-diff:

  1. Install npm as described here
  2. Install json-diff following these instructions

At this point, the results of the comparisons can be obtained in this way:

./compare.py

Considered Metrics

Implemented metrics

Metrics to be implemented

Class metrics (not to be implemented)

Alternative metric names