Skip to content

50417/SLNET_Metrics

Repository files navigation

SLNET-Metric

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

Recent News

Our paper SLNET has been accepted at IEEE International Working Conference on Mining Software Repositories (MSR 2022, CORE: A)

Requirements

  • 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

Optional Requirements

  • Parallel Computing Toolbox

Getting Started

Clone the project

$ git clone <gitlink>

Running from MATLAB

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).

To automatically find Simulink models and extract metrics from them.
> cd SLNET_Metrics
> model_metric_obj = model_metric();
> model_metric_obj.process_all_models_file();
Viewing Reports

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);
Dependencies

Currently the zipped projects must have a name that is a number. Example 132.zip

Development

Want to contribute? Great! This tool uses MATLAB/Simulink .

Todos

  • Write Test case
  • Also Check Issues Tab

Getting Help

If you run into problems please open a new issue or contact us.