change-metrics / monocle

Monocle helps teams and individual to better organize daily duties and to detect anomalies in the way changes are produced and reviewed.
https://changemetrics.io
GNU Affero General Public License v3.0
377 stars 58 forks source link

How exactly is complexity score calculated? #974

Closed ttruong-dexcom closed 2 years ago

ttruong-dexcom commented 2 years ago

Maybe I miss the definition somewhere. If not it should be in the README.

TristanCacqueray commented 2 years ago

The complexity is computed in the web interface using this formula: https://github.com/change-metrics/monocle/blob/5eb18c3d67757d4fad1d03423390552337531b0f/web/src/components/Change.res#L10-L13

This could probably be improved though, for example by ignoring comments or auto generated files. We are open to suggestion to improve the score.

morucci commented 2 years ago

Perhaps we can merge that #975 to remove the ambiguity then close this issue.

If the complexity computation is not satisfying (which I think it is not) then we should open another issue to discuss solution to improve it. For instance as being computed by the UI it makes it impossible to use in the query.