Metrics
Every metric is reported separately under its id, at the scopes listed below. A value that cannot be computed is null, with the reason in unavailable; it is never 0.
When a calculation changes, the metric definition version changes; every analysis result records the version it was computed with (run.metric_definition_version).
| Metric | Name | Scopes | Unit |
|---|---|---|---|
size.loc | LOC | file, project | lines |
size.sloc | SLOC | function, file, project | lines |
size.comment_loc | Comment LOC | file, project | lines |
size.blank_loc | Blank LOC | file, project | lines |
size.comment_ratio | Comment Ratio | file, project | ratio |
size.statement_count | Statement Count | function, file, project | count |
size.token_count | Token Count | function, file, project | count |
size.function_count | Function Count | file, project | count |
size.function_length | Function Length | function | lines |
size.avg_function_length | Average Function Length | file, project | lines |
size.max_function_length | Maximum Function Length | file, project | lines |
complexity.cyclomatic | Cyclomatic Complexity | function, file, project | count |
complexity.branch_count | Branch Count | function, file, project | count |
complexity.conditional_count | Conditional Count | function, file, project | count |
complexity.loop_count | Loop Count | function, file, project | count |
complexity.return_count | Return Count | function, file, project | count |
complexity.jump_count | Jump Count | function, file, project | count |
complexity.path_count | Number of Paths | function | count |
complexity.cognitive | Cognitive Complexity | function, file, project | count |
nesting.max_depth | Maximum Nesting Depth | function, file, project | levels |
nesting.avg_depth | Average Nesting Depth | function, file, project | levels |
halstead.unique_operators | Unique Operators | function, file, project | count |
halstead.unique_operands | Unique Operands | function, file, project | count |
halstead.total_operators | Total Operators | function, file, project | count |
halstead.total_operands | Total Operands | function, file, project | count |
halstead.vocabulary | Vocabulary | function, file, project | count |
halstead.length | Program Length | function, file, project | count |
halstead.volume | Volume | function, file, project | bits |
halstead.difficulty | Difficulty | function, file, project | ratio |
halstead.effort | Effort | function, file, project | count |
halstead.time | Estimated Program Time | function, file, project | seconds |
halstead.bugs | Estimated Bugs | function, file, project | count |
function.parameter_count | Parameter Count | function | count |
function.avg_parameter_count | Average Parameter Count | file, project | count |
function.max_parameter_count | Maximum Parameter Count | file, project | count |
function.expression_count | Expression Count | function, file, project | count |
function.call_count | Call Count | function, file, project | count |
duplication.duplicate_block_count | Duplicate Block Count | file, project | count |
duplication.duplicate_token_count | Duplicate Token Count | file, project | count |
duplication.duplication_ratio | Duplication Ratio | file, project | ratio |
duplication.max_duplicate_length | Maximum Duplicate Length | file, project | tokens |
dependency.fan_out | Fan-out | function | count |
dependency.fan_in | Fan-in | function | count |
dependency.call_depth | Call Depth | function | calls |
dependency.dependency_count | Dependency Count | file, project | count |
documentation.doc_loc | Documentation LOC | function | lines |
documentation.documented_function_count | Documentation Count | file, project | count |
documentation.documentation_ratio | Documentation Ratio | file, project | ratio |
maintainability.index | Maintainability Index | function, file | index |
derived.cyclomatic_per_function | Cyclomatic Complexity per Function | file, project | ratio |
derived.tokens_per_loc | Tokens per LOC | file, project | ratio |
derived.statements_per_function | Statements per Function | file, project | ratio |
derived.duplicate_tokens_per_sloc | Duplicate Tokens per SLOC | file, project | ratio |