Metric Name

Max

Min

解释

Ratio of repeated inheritances in the application

10.00

0.00

URI_Ratio,菱形继承绿。 ((ap_inhg_uri) * (100)) / (ap_inhg_edge)

Percentage of non-member functions

10.00

0.00

NMM_Ratio 全局函数比例, ((ap_func - ap_mdf) / (ap_func)) * (100)

Average coupling between objects

10.00

0.00

AVG_CBO平均耦合, (ap_cbo) / (ap_clas)

Average of the VG of the application's functions

5.00

1.00

AVG_VG平均圈数, (ap_vg) / (ap_func)

Ratio of recursive edges on the call graph

5.00

0.00

递归调用率,((ap_cg_cycle) * (100)) / (ap_cg_edge)

Method hiding factor (MOOD)

0.40

0.10

ap_mhf,方法隐藏率,私有成员函数占总成员函数的比例。

Attribute hiding factor (MOOD)

1.00

0.70

ap_ahf,属性隐藏率,私有成员变量占总成员变量的比例。

Method inheritance factor (MOOD)

0.80

0.60

ap_mif,方法继承因子。继承的成员变量占总成员变量的比例。类A有一个共有的成员函数,类B和类C继承与A,则方法继承因子为0.67

Attribute inheritance factor (MOOD)

0.60

0.30

ap_aif,属性继承因子。

Polymorphism factor (MOOD)

1.00

0.30

ap_pof,多态性因子。重新虚函数的比例。

Coupling factor (MOOD)

0.18

0.03

ap_cof,耦合因子。class A{};class B{};class C{};class D{C c;};耦合因子是0.0812分之一),增加一个空类E后,变为20分之一。

Number of Levels in the Inheritance Graph

4.00

1.00

ap_inhg_levl,继承树最高层次。

Hierarchical Complexity of the Inheritance Graph

2.00

1.00

ap_inhg_cpx,继承树纵向复杂性。class A{};class B{};class C: public A,B{};纵向复制度为1.44,计算过程为:(1*2+1*2)/3 class A{};class B:public A{};class C:public A{};

纵向复杂性为1.67,计算过程为:(1+2*2)/3

Number of Levels in the Call Graph

9.00

2.00

ap_cg_levl函数调用关系图层次。

Number of Repeated Inheritances

+oo

-oo

ap_inhg_uri,菱形继承。有六个类A,B,B2,B3,B4,CB,B2,B3,B4A的派生类,CB,B2,B3,B4的派生类。菱形继承数为6: B,B2)(BB3)(BB4)(B2B3)(B2B4)(B3B4)

Number of Edges in the Inheritance Graph

+oo

-oo

ap_inhg_edge,继承图的边数。ap_inhg_uri的例子,边数为8:ABAB2AB3AB4BCB2CB3CB4C

Number of application functions

+oo

-oo

ap_func, 成员函数和全局函数的数量。

Number of application defined methods

+oo

-oo

ap_mdf,成员函数(包括静态函数和非静态函数)数量

Coupling between objects

+oo

-oo

ap_cbo,耦合关系,一个类(包括指针)是另一个类的成员变量算,一个类是另一个类的成员函数的局部变量、参数、返回值不算。

Number of application classes

+oo

-oo

ap_clas,应用程序类的数量。

Sum of cyclomatic numbers of the application functions

+oo

-oo

ap_vg,一个函数初始为1,增加一个if elseif,加1;增加一个循环,增加1

Call Graph recursions

+oo

-oo

ap_cg_cycle,函数调用关系图中的递归调用数量。

Number of Edges in the Call Graph

+oo

-oo

ap_cg_edge,函数调用关系图边数。

 

 

posted on 2023-04-12 11:28  闻缺陷则喜何志丹  阅读(5)  评论(0编辑  收藏  举报  来源