Skip to content

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).

MetricNameScopesUnit
size.locLOCfile, projectlines
size.slocSLOCfunction, file, projectlines
size.comment_locComment LOCfile, projectlines
size.blank_locBlank LOCfile, projectlines
size.comment_ratioComment Ratiofile, projectratio
size.statement_countStatement Countfunction, file, projectcount
size.token_countToken Countfunction, file, projectcount
size.function_countFunction Countfile, projectcount
size.function_lengthFunction Lengthfunctionlines
size.avg_function_lengthAverage Function Lengthfile, projectlines
size.max_function_lengthMaximum Function Lengthfile, projectlines
complexity.cyclomaticCyclomatic Complexityfunction, file, projectcount
complexity.branch_countBranch Countfunction, file, projectcount
complexity.conditional_countConditional Countfunction, file, projectcount
complexity.loop_countLoop Countfunction, file, projectcount
complexity.return_countReturn Countfunction, file, projectcount
complexity.jump_countJump Countfunction, file, projectcount
complexity.path_countNumber of Pathsfunctioncount
complexity.cognitiveCognitive Complexityfunction, file, projectcount
nesting.max_depthMaximum Nesting Depthfunction, file, projectlevels
nesting.avg_depthAverage Nesting Depthfunction, file, projectlevels
halstead.unique_operatorsUnique Operatorsfunction, file, projectcount
halstead.unique_operandsUnique Operandsfunction, file, projectcount
halstead.total_operatorsTotal Operatorsfunction, file, projectcount
halstead.total_operandsTotal Operandsfunction, file, projectcount
halstead.vocabularyVocabularyfunction, file, projectcount
halstead.lengthProgram Lengthfunction, file, projectcount
halstead.volumeVolumefunction, file, projectbits
halstead.difficultyDifficultyfunction, file, projectratio
halstead.effortEffortfunction, file, projectcount
halstead.timeEstimated Program Timefunction, file, projectseconds
halstead.bugsEstimated Bugsfunction, file, projectcount
function.parameter_countParameter Countfunctioncount
function.avg_parameter_countAverage Parameter Countfile, projectcount
function.max_parameter_countMaximum Parameter Countfile, projectcount
function.expression_countExpression Countfunction, file, projectcount
function.call_countCall Countfunction, file, projectcount
duplication.duplicate_block_countDuplicate Block Countfile, projectcount
duplication.duplicate_token_countDuplicate Token Countfile, projectcount
duplication.duplication_ratioDuplication Ratiofile, projectratio
duplication.max_duplicate_lengthMaximum Duplicate Lengthfile, projecttokens
dependency.fan_outFan-outfunctioncount
dependency.fan_inFan-infunctioncount
dependency.call_depthCall Depthfunctioncalls
dependency.dependency_countDependency Countfile, projectcount
documentation.doc_locDocumentation LOCfunctionlines
documentation.documented_function_countDocumentation Countfile, projectcount
documentation.documentation_ratioDocumentation Ratiofile, projectratio
maintainability.indexMaintainability Indexfunction, fileindex
derived.cyclomatic_per_functionCyclomatic Complexity per Functionfile, projectratio
derived.tokens_per_locTokens per LOCfile, projectratio
derived.statements_per_functionStatements per Functionfile, projectratio
derived.duplicate_tokens_per_slocDuplicate Tokens per SLOCfile, projectratio