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.
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.
This tool clones the repositories from the awesome-rust
list, runs a set of tools on them and filters the results.
Install Rust using rustup
by following this guide.
rustup component add clippy
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
For an example usage see the Example section.
cd collector
cargo build
./target/debug/collector -h
cd collector
cargo build --release
./target/release/collector -h
-c, --clone_repos
-d, --delete_tmp
-f, --filter_metrics
-m, --collect_metrics
-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]
cargo doc
Open target/doc/collector/index.html
in a browser.
The logs can be found in the log
directory under the DATA_PATH
.
Tool to analyze the results of the collector. This includes data aggregation, running statistic tests and generating LaTeX.
cd analyzer
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
cd ..
python3 -m analyzer -h
For an example usage see the Example section.
python3 -m analyzer.scripts.<name>
-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
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.
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.
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
@thesis{Sextro2021,
author = {Marvin Sextro},
title = {Rust: Usability for a Lifetime? - An Empirical Approach},
year = {2021},
}