tonybaloney / wily

A Python application for tracking, reporting on timing and complexity in Python code
Apache License 2.0
1.21k stars 59 forks source link

Alternative Complexity Measures #136

Open BradKML opened 3 years ago

BradKML commented 3 years ago

Is your feature request related to a problem? Please describe. There are other Complexity metrics not included in this repo, that can be included.

Additional context

https://github.com/priv-kweihmann/multimetric

With https://github.com/mxmssh/IDAmetrics

mwchase commented 2 years ago

For what it's worth, multimetric or some other project should probably replace radon for the purpose of calculating Halstead metrics. Radon's Halstead calculations only count a subset of relevant operations, but overcount operands in all but the simplest code. (See https://github.com/rubik/radon/issues/160 and https://github.com/rubik/radon/issues/161)

For one file in a codebase I'm working on, I manually counted operands and operators, and while I didn't get the same results exactly out of multimetric, my hand-count and multimetric agree with each other more than they do with radon, which scored the file a zero on all Halstead metrics.

tahabermaki commented 1 year ago

hello @mwchase I want to implement multimetric library to have the code metrics for all languages ! But I don't know how to do it in jupyter notebook. Do you have in the documentation that can help me analyze a software code ?