Halstead Metrics is one of Understand's built-in reports — run it on your own code from the GUI, or headlessly with und report.
Halstead Metrics
Languages: AnyTargets: Architectures, Classes, Files, Project
Display the Halstead metrics for functions
When run on a function, display the Halstead metrics for that function. When run on a file, architecture, or project, show a table with the Halstead metrics as columns and a row for each function.
Halstead Metrics - Understand Metric
- n1, Distinct Operators - HalsteadDistinctOperators
- n2, Distinct Operands - HalsteadDistinctOperands
- N1, Total Operators - HalsteadTotalOperators
- N2, Total Operands - HalsteadTotalOperands
- N, Length (N1 + N2) - HalsteadLength
- n, Vocabulary (n1 + n2) - HalsteadVocabulary
- V, Volume (N * log2(n)) - HalsteadVol
- D, Difficulty ((n1 / 2) * (N2 / n2)) - HalsteadDifficulty
- E, Effort (D * V) - HalsteadEffort