As this page mentioned before, we picked up some outstanding features to profile methods. Here are those features in detail.
type | desciprtion | notes | feature-name |
about statements | the number of declarations | count all the declarations in the method. Like"int a;" | num_declaration |
the number of initializations and definitions | count all the initializations and definitions in the method. Like "int x=1;" | num_initialization |
the number of assignments | count all the assignments in the method. Like"x=1;" | num_assignment |
the number of lines | count all the lines in the method | loc_executable |
the max length of the code block | count the max number of code block's lines in the method | max_loc_inblock |
the min length of the code block | count the min number of code block's lines in the method | min_loc_inblock |
about variables | the number of local variables | count all the local variables defined in the method | num_local_var |
the number of local variables never used | count the number of local variables which is never used in the method | num_unsed_var |
the number of local variables used once | count the number of local variables which is used only once in the method | num_local_var_once |
the number of local variables used more than once | count number of local variabls used more than once in the method. | num_local_var_overonce |
the total times of local variables | count the total times of local variabls used in the method. | sum_times_used_var |
the max time of local variables | count the max times of local variables used in the method. | max_times_used_var |
the number of fields | count the number of fileds used in the method. | num_filed |
the number of fields used once | | num_filed_once |
the number of fields used more than once | | num_field_overonce |
the max time of fields | count the max time of field used in the method. | max_times_used_filed |
the total times of fields | count the total tims of field used in the method. | sum_times_used_field |
the number of static variables | count the number of static variables in the method. | num_static_var |
the number of static variables used once | | num_static_var_once |
the number of static variables used more than once | | num_static_var_overonce |
the max time of static variables | count the max time of static variables in the method. | max_times_used_static_var |
the total times of static variables | | sum_times_used_static_var |
the number of parameters | | num_param |
the number of parameters used once | | num_param_used_once |
the number of parameters used more than once | | num_param_used_overonce |
the max time of parameters used | count the max time of parameters used in the method. | max_times_used_param |
the total times of parameters used | count the total times of parameters in the method. | sum_times_used_param |
the number of arrays | count the number of arrays in the method. | num_array |
the max time of array used | count the max time of array used in the method. | max_times_used_array |
the total times of arrays used | count the total times of arrays in the method. | sum_times_used_array |
about objects | the number of objects | count the total number of objects in the method. | num_object |
the number of object by constructor | count the number of objects generated by constructor. | num_object_constructor |
the number of object not by constructor | count the number of object generated not by constructor. | num_object_non_constructor |
about methods | the number of methods called | count the number of methods called in the method. | num_called_method |
the max time of method being called | count the max time of method being called in the method. | max_times_called_method |
the total times of methods being called | count the total times of methods being called in the method. | sum_times_called_method |
the number of static methods being called | count the number of static methods being called in the method. | num_called_static_method |
the max time of static method being called | count the max time of static method being called in the method. | max_times_called_static_method |
the total times of static methods being called | count total times of static methods being called in the method. | sum_times_called_static_method |
about operators and operands(called num_operator) | the number of operators | ( ) [ ] -> . ! ~ ++ -- + - * & / % << >> < <= > >= == != ^ | && || ?: = += -= /= %= ^= new instance of | sum_times_used_operator |
the max time of a operator used | count max time of a operator used in the method. | max_times_used_operator |
the type of operator used(called unique_operator) | num_operator |
the number of operands(called num_operand) | count number of all the variables which present datum. | sum_times_used_operand |
the max time of a operand used | count max time of a operand used in the method. | max_times_used_operand |
the type of operands(called unique_operand) | | num_operand |
about complexity | halstead vocabulary complexity µ | µ = unique_operator + unique_operand | halstead_vocabulary_complexity |
healstead length complexity N | N = num_operator + num_operand | healstead_length_complexity |
healstead level complexity L | L=(2*unique_operand)/(unique_operator*num_operand) | healstead_level_complexity |
healstead difficulty complexity D | D = 1 / L | healtead_difficulty_complexity |
healstead capacity complexity V | V = N * log2(unique_operator + unique_operand) | healstead_capacity_complexity |
healstead efficiency complexity E | E = V / L | healstead_efficientcy_complexity |
healstead time complexity T | T = E / 18 | healtead_time_complexity |
healstead faulty complexity B | B = E2/3 / 1000 | healtead_bug |
Mccabe complexity | Mccabe = edge - node + 2 | McCabe |
about code blocks | the number of if blocks | | num_if |
the number of if conditions which contain method | | num_if_with_method_call |
the number of else-if blocks | | num_elseif |
the max number of else-if block which is after a if statement | count how many else-if blocks which are after a if statement and return the maximum. | max_else_if_per_if |
the number of else block | | num_else |
the number of try block | | num_try |
the number of catch block | | num_catch |
the max number of catch block which is after a try block | count how many catch blocks which are after a try block and retrun the maximum. | max_catch_per_try |
the number of finally block | | num_finally |
the number of switch block | | num_swtich |
the number of case block | | num_case |
the number of case blocks which are in a switch block | | max_cases_per_swtich |
the number of for block | | num_for |
the number of while block | | num_while |
the number of do-while block | | num_do_while |
the number of for-each block | | num_for_each |
the number of loop block | while + do-while + for + for-each | num_loop |
the number of loop conditions which contain method calling | | num_loop_with_method_call |
the number of synchronized block | | num_synchronized |
about nested blocks | the deepest layer of nested blocks | find all the layers of nested blocks, and return the maximum. | max_depth_nested_block |
the deepest layer of nested if block | there is another if block in a if block. Find the deepest layers. | max_depth_nested_if |
the number of if blocks which contain loops. | | num_if_contained_loop |
the deepest layer of for block | there is another for block in a for block. Find the deepest layers. | max_depth_nested_for |
the deepest layer of while block | there is another while block in a while block. Find the deepest layers. | max_depth_nested_while |
the deepest layer of do-while block | there is another do-while block in a do-while block. Find the deepest layers. | max_depth_nested_do_while |
the deepest layer of for-each block | there is another for-each block in a for-each block. Find the deepest layers. | max_depth_nested_for_each |
the number of loops which contain if block. | | num_loop_contain_if |
about jumping statement | the number of break statements | | num_break |
the number of continue statements | | num_continue |
the number of return statements | | num_return |
about final and static | the number of final local variables | | num_final_local_var |
the number of final parameters | | num_final_param |
about assignments | the number of compand assignments | += -= *= /= &= &= |= ^= <<= >>= >>>= | num_compand_assignment |
the number of decrement/increment statements | ++ -- | num_increment_decrement |
the number of prefix decrement/increment statements | ++ -- | num_increment_decrement_prefix |
the number of post decrement/increment statements | ++ -- | num_increment_decrement_post |
about fundamental data | the number of literals | integer data, like 231. Float data, like 3.1415926. String data, like "hahahha". Character data, like 'a'. true/false. | num_literal |
the number of fundamental type | byte, short, int, long, float, double, char, boolean | num_primitive_var |
the number of assert statement | | num_assert |
about others | the number of class in the method | | num_used_class |
the number of anonymous classes in the method | | num_anonymous_class_definition |
the number of inner classes in the method | | num_inner_class_definition |
the attribute of method | public private protected default is prenstened by 0 1 2 3 respectively. | level_method_access |
the number of annotations in the method | | num_annotation |
the number of exceptions which are thrown by method | | num_throw_exception |
about distance | the min distance from definition to using | the distance from defining a variable to using a variable. Find the minimum. | min_line_var_use |
the max distance from definition to using | the distance from defining a variable to using a variable. Find the maxmum. | max_line_var_use |
the average distance from definition to using | the distance from defining a variable to using a variable. Find the average. | avg_line_var_use |