- Glossary
- Project Description
- Importance
- Features
- Installation
- Usage
- How it works
- Important Note
- RUP filled template
- Authors
Weighted Micro Function Points (WMFP) - a modern software sizing algorithm
Evaluation of WMFP metrics in human-minutes for given Golang code. Implemented in Go.
Project developed for the course Software Systems Analysis and Design (SSAD) at Innopolis University in F21 semester.
Software metrics help to estimate the size, price, or time consumption of software. There are no known open source solutions for counting the WMFP metrics, especially for Go. Thus, having a free alternative to proprietary software can be in demand.
- Count WMFP metric for a given golang source file
- Ability to choose multiple files explicitly to count total metrics for them
- Possibility to pick a folder and have all matching files summarized in metrics score
- Recursive mode of scanning a folder
$ go install github.com/bragov4ik/go-kys/cmd/gokys@latest
Default path to config file is config.xml
$ cd $HOME/go/bin
$ ./gokys -c <PATH_TO_CONFIG> a.go # calculates for file
$ ./gokys -c <PATH_TO_CONFIG> . # calculates for project
$ ./gokys -c <PATH_TO_CONFIG> a.go b.go c.go # calculates for multiple files
The algorithm calculates multiple metrics and combines them in order to get a result. The metrics are described below.
The Cyclomatic Complexity indicates the complexity of a program's flow.
This program calculates the complexities of each function by counting independent paths. It starts with the initial value
of 1 and each time program encounters one of the if, for, case, ||, &&
statements it increases the value by
corresponding to the statement's weight specified in the configuration file.
Calculation of Halstead Complexity can be found here. The formula for Volume is used, as it seems more appropriate for the WMFP.
Measures the amount of effort spent on writing program comments. It calculates the number of words written in comments and multiplies by a weight specified in the configuration file.
Measures the amount of effort spent on the program structure such as separating code into classes, functions, and interfaces. It starts with the initial value of 0 and each time program encounters structure declaration, function declaration, or interface declaration it increases the value by the declaration's weight specified in the configuration file.
Measures the complexity of arithmetic calculations across the program. It starts with initial value of 0 and each time
program encounters one of the + - * / % += -= *= /= %= ++ --
operators it increases value by operator's weight
specified in configuration file.
Measures the amount of effort spent on embedding hard-coded data. It starts with the initial value of 0 and each time program encounters basic or composite literal it increases value by literal's weight specified in the configuration file
The program sums up all the above metrics to calculate total effort in human-minutes.
To contribute to the project fork the repository and make a PR.
Since there is no comprehensive description of the work of WMFP in open sources, some metrics were not implemented and some were implemented using our vision and understanding of these metrics.
- Kirill Ivanov
- Anatoliy Baskakov
- Iskander Bakhtiyarov
- Ivan Rybin