Skip to content

marvinsxtr/2021-ba-sextro

Repository files navigation

2021-ba-sextro

This repository contains the thesis "Rust: Usability for a Lifetime? - An Empirical Approach" as well as tools to collect usability metrics from Rust projects on GitHub and for analysis of the results.

Contents

General information

The environment variable DATA_PATH can be changed to an absolute path, where any data generated by the collector or the analyzer will be saved. By default, this is the data folder in this repository. Note that the tools were only tested on Linux.

Collector

This tool clones the repositories from the awesome-rust list, runs a set of tools on them and filters the results.

Setup

Install Rust

Install Rust using rustup by following this guide.

Install Clippy

rustup component add clippy

Install rust-code-analysis-cli

Uninstall any previous version of the CLI.

cargo uninstall rust-code-analysis-cli

Clone the forked rust-code-analysis tool.

git clone https://github.com/marvinsxtr/rust-code-analysis.git

Install the patched version.

cargo install --path rust-code-analysis/rust-code-analysis-cli

Build and run

For an example usage see the Example section.

Debug

cd collector
cargo build
./target/debug/collector -h

Release

cd collector
cargo build --release
./target/release/collector -h

Usage

Flags

-c, --clone_repos        
-d, --delete_tmp         
-f, --filter_metrics     
-m, --collect_metrics    

Options

-p, --input_path <input-path>     [default: ../data/in/awesome-rust.txt]
-n, --repo_count <repo-count>     [default: 1]
-s, --repo_skips <repo-skips>     [default: 0]

Documentation

cargo doc

Open target/doc/collector/index.html in a browser.

Logs

The logs can be found in the log directory under the DATA_PATH.

Analyzer

Tool to analyze the results of the collector. This includes data aggregation, running statistic tests and generating LaTeX.

Setup

Virtual environment

cd analyzer
python3 -m venv venv
source venv/bin/activate

Install dependencies

pip3 install -r requirements.txt

Run

cd ..
python3 -m analyzer -h

For an example usage see the Example section.

Scripts

python3 -m analyzer.scripts.<name>

Usage

Options

-n REPO_COUNT, --repo_count REPO_COUNT - Number of repositories to analyze
-s SKIP_REPOS, --skip_repos SKIP_REPOS - Number of repositories to skip
-a, --analyze_repos - Whether to analyze the repositories
-t, --statistic_tests - Whether to conduct the statistical tests
-e EXPERIMENT_NAMES, --experiment_names EXPERIMENT_NAMES - Which experiments to run

Data

Example

The folder example contains a small subset of the actual data set generated with the collector and the analyzer. In order to reproduce the example data, the following commands can be used:

cd collector
cargo build
./target/debug/collector -n 5 -c -m -f -d
cd ..
python3 -m analyzer -n 5 -a -t

Running this should not take much longer than 5 min.

Complete

The complete data set generated by the tools in this repository and used for the thesis is available on Nextcloud. The folder structure is the same as in the data folder of this repository.

Thesis

The thesis, which this repository repository is part of, is located in the thesis folder as 2021_ba_sextro.pdf and can also be generated manually:

cd thesis
make

Citation

@thesis{Sextro2021,
    author = {Marvin Sextro},
    title = {Rust: Usability for a Lifetime? - An Empirical Approach},
    year = {2021},
}

About

Rust: Usability for a Lifetime? - An Empirical Approach

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published