The original method had a cyclomatic complexity of 43.
原始的方法的圈复杂度是 43。
What is cyclomatic complexity and why is it important?
什么叫圈复杂度(cyclomatic complexity) ?为什么它很重要?
Cyclomatic complexity - Measures the structural complexity of the code.
测量程序码在结构上的复杂程度。
Cyclomatic complexity is a way to measure how tangled the paths are in the state space.
秩数复杂度是度量状态空间中路径有多紊乱的方式。
Cyclomatic complexity is a measure of the structural complexity of the type or method.
圈复杂度用于衡量类型或方法在结构上的复杂度。
Cyclomatic complexity isn't the only complexity measurement for spotting high risk code, however.
不过,圈复杂性并不是确定高风险代码的惟一复杂性度量。
Cyclomatic complexity is purely a measure of the relative complexity of one method versus another.
圈复杂度是衡量一个方法相对于另一个方法的相对复杂度的指标。
Each of the former if blocks took 3 lines of code (and contributed 1 cyclomatic complexity point).
之前每个if块占用3行代码(并贡献了1 个点的圈复杂度)。
Cyclomatic complexity, pioneered during those studies I previously mentioned, precisely measures path complexity.
圈复杂度是在我前面提到的那些研究期间开创的,它可以精确地测量路径复杂度。
More technical definitions come from such measures as cyclomatic complexity developed by McCabe 4 and others.
更学术的定义来自McCabe4和其他人开发出的度量秩数复杂度的方法。
What's interesting here is that we were able to spot this defect using cyclomatic complexity rather than code coverage.
在这里,有趣的是我们可以使用圈复杂度而不是使用代码覆盖率来找出这个缺陷。
The cyclomatic complexity formula, first developed by Thomas McCabe, is based on the number of branches in a function.
圈复杂性公式(cyclomatic complexity formula),被Thomas McCabe首先提出,它是基于一个函数的分支数量来确定复杂度的。
I've explained in previous articles in this series that cyclomatic complexity tends to be one of the harbingers of sticky code.
我在本系列前面的文章中已经解释了圈复杂性,它是令人讨厌的代码的一种先兆。
The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity.
可维护性索引的计算依据为:代码行数、程序量和圈复杂度。
Some of the common questions relating to cyclomatic complexity are "How does my code compare to others?" and "What is a good number for a particular class?"
与圈复杂度相关的常见问题包括 “我的代码与别人的代码相比怎么样?”和 “对于一个类,多大的数值是合适的?”
If you diagram the method shown in Listing 11 into a flow chart, you can easily count the number of edges and nodes and calculate the cyclomatic complexity, as shown in Figure 1.
如果把清单11所示的方法画成流程图(见图 1),就很容易算出边数和节点数并计算出圈复杂度。
By inspecting the cyclomatic complexity measures, I have found it useful to reason about complexity via the following question: How hard is it to determine how a system got into a certain state?
通过检查秩数复杂度方法,我已经发现了通过以下问题推出复杂性是有用的:确定系统进入某种状态有多难?
By inspecting the cyclomatic complexity measures, I have found it useful to reason about complexity via the following question: How hard is it to determine how a system got into a certain state?
通过检查秩数复杂度方法,我已经发现了通过以下问题推出复杂性是有用的:确定系统进入某种状态有多难?
应用推荐