Published July 8, 2020 | Version v1.0.3
Software Open

SLNET-Metrics: Automatic collection of Simulink Model Metric

Creators

Description

SLNET-Metrics collects Simulink model metrics automatically, Please refer to the README.md file that describes how to use the tool. The tool maintains all the metadata in a sqlite file/database and expects the sqlite file is already present.

Reading metadata

The metadata "slnet_v1.sqlite" can be opened and browsed using DB Browser for SQLite (https://sqlitebrowser.org/). You can use SQL commands to query the sqlite database.

Structure of tables in metadata

There are five tables per source (i.e. GitHub and MATC (short for matlab central)) as follows :

<source>_Projects contains information of the projects collected from the respective repository. This table is populated by SLNET-Miner tool https://zenodo.org/record/3912057#.Xvpi4HVKiV4. You do not need have this table to collect model metrics as FOREIGN KEY constrains in sqlite3 is disabled by default (https://www.sqlite.org/foreignkeys.html#fk_enable)

<source>_Metric contains Simulink model level information (metrics) such as total number block , connections , Simulation modes, solver types and so on.

NOTE : total_desc_cnt = Child representing blocks (i.e. total number of subsystems and model referencing in the Simulink model) ncs_cnt = number of contained system (i.e.,total number of subsystems ) scc = strongly connected components sfun_name_count = is the name of the sfunctions and the times it has been used in the model separated by underscore mdlref_name_count = is the name of the model reference and the times it has been used in the model separated by underscore -1 value indicates that the value has not been calculated

SCHK_Block_count = block count obtained using Simulink Check API(https://www.mathworks.com/products/simulink-check.html) . The count doesnot include Library blocks

SLdiag_Block_count = block count obtained using [https://blogs.mathworks.com/simulink/2009/08/11/how-many-blocks-are-in-that-model/]. This count includes all the library blocks. All the contents of the Simulink library blocks such as Ramp are counted. blank value indicates there was no value (returned by the tool or Simulink API) of that particular model metric.

Ccorpus** = metrics collected by using C-corpus custom tool.

file_path the relative location of the Simulink models in the project. Ignore "workdirtmp" Hierarchy_depth : depth of Simulink models. 1 indicates flat models with no depth.

Some projects may have depth = 1 and subsystem more than 1 because we do not count library linked system contributing to depth and some subsystem might have zero blocks inside them.

<source>_hierar_info: contains information about block_count , connections count and child model(i.e. subsystem and model reference) per hierarchy level.</br>

<source>_Block_info: contains the block type along with its count per model </br>

<source>_subsystem_info: contains the name of the subsystem in the model along with number of block count inside that model .</br>

NOTE: ID in <source>_projects table corresponds to File_ID on all other tables </br> NOTE: The counts doesnot consider any content inside library linked blocks apart from SLdiag_block_count and CCorpus** field.

Files

50417/SLNET-Metrics-v1.0.3.zip

Files (65.0 kB)

Name Size Download all
md5:eebbd5eb7e4c050c2b991842983c0edd
65.0 kB Preview Download

Additional details

Related works