BLOGTIMES
2015/10/19

Visual Studio の Maintainability Index

  softwareengineering  visualstudio 
このエントリーをはてなブックマークに追加

MS の Visual Studio にはメンテナンスしやすさを表す Maintainability Index という 0~100までの値をとるメトリクスががあり、20以上でであれば良好、10台であればほどほど、9以下だとメンテナビリティが低いことを表すということになっています。

Code Metrics Values

Maintainability Index – Calculates an index value between 0 and 100 that represents the relative ease of maintaining the code. A high value means better maintainability. Color coded ratings can be used to quickly identify trouble spots in your code. A green rating is between 20 and 100 and indicates that the code has good maintainability. A yellow rating is between 10 and 19 and indicates that the code is moderately maintainable. A red rating is a rating between 0 and 9 and indicates low maintainability.

最近までこの算出方法を知らなかったのですが、下記のようなちょっと面白い式になっているようです。

Maintainability Index = 171 - 5.2 * ln(Halstead Volume) - 0.23 * (Cyclomatic Complexity) - 16.2 * ln(Lines of Code)*1

この式は CMU SEI の Maintainability Index Technique for Measuring Program Maintainability*2 からもたらされたもので、履歴を見ると 97年ごろからある伝統的なものみたいですね。まだこれは読んだことがなかったので、今度読んでみようと思います。


トラックバックについて
Trackback URL:
お気軽にどうぞ。トラックバック前にポリシーをお読みください。[policy]
このエントリへのTrackbackにはこのURLが必要です→https://blog.cles.jp/item/7979
Trackbacks
このエントリにトラックバックはありません
Comments
愛のあるツッコミをお気軽にどうぞ。[policy]
古いエントリについてはコメント制御しているため、即時に反映されないことがあります。
コメントはありません
Comments Form

コメントは承認後の表示となります。
OpenIDでログインすると、即時に公開されます。

OpenID を使ってログインすることができます。

Identity URL: Yahoo! JAPAN IDでログイン