Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

代码度量

代码度量的描述和示例

您可以使用 Bug Finder 计算工程、文件和函数级别的代码度量。可以使用计算代码度量 (-code-metrics) 分析选项来计算代码度量。有关 Bug Finder 中支持的代码度量的列表,请参阅 代码度量

Code Prover 支持计算堆栈使用量度量。使用选项计算堆栈使用量 (-stack-usage) 来计算代码的堆栈使用。

注意

在以后的版本中,Code Prover 将不支持计算堆栈使用量度量之外的代码度量。请迁移到 Bug Finder 以计算代码度量。

Polyspace 结果

全部展开

最小堆栈使用量Total size of local variables in function taking nested scopes into account plus maximum stack usage from callees
最大堆栈使用量Total size of local variables in function plus maximum stack usage from callees
程序最大堆栈使用量Maximum stack usage in the analyzed program
程序最小堆栈使用量Maximum stack usage in the analyzed program taking nested scopes into account
局部变量大小的较高估计值Total size of all local variables in function
局部变量大小的较低估计值Total size of local variables in function taking nested scopes into account

主题