SLNET-Metric is a tool to extract metric of Simulink models. It collects metric and stores it in a sqlite3 database. This tool is an extension of metric collect tool described in this paper. We added support for storing the metric in a database along with bug fixes and metrics from official Simulink API.
It analyzes the models of the projects in a zip file. It works with projects collected from SLNet-Miner
Our paper SLNET has been accepted at IEEE International Working Conference on Mining Software Repositories (MSR 2022, CORE: A)
- Windows/Linux (tested on Ubuntu 18.04 and Windows 10)
- MATLAB with Simulink R2018b/R2019b (Additional Toolboxes based used by Simulink models)
- Simulink Test
- Simulink Check
- Parallel Computing Toolbox
Clone the project
$ git clone <gitlink>
model_metric_cfg.m contains all the configuration options that lets you configure the directory of the zipped projects (which has models to be analyzed) and database (where you store the all the model metric).
> cd SLNET_Metrics
> model_metric_obj = model_metric();
> model_metric_obj.process_all_models_file();
After the metrics are collected from the models, you can view cumulative statistics
>
> model_metric_obj = model_metric();
> model_metric_obj.total_analyze_metric(<TABLE NAME>,false);
Example
> model_metric_obj.total_analyze_metric('GitHub_Models',false);
Currently the zipped projects must have a name that is a number. Example 132.zip
Want to contribute? Great! This tool uses MATLAB/Simulink .
- Write Test case
- Also Check Issues Tab
If you run into problems please open a new issue or contact us.