10-29-2007 05:51 PM - edited 10-29-2007 05:51 PM
Message Edited by DanielGreen on 10-29-2007 05:53 PM
10-29-2007 06:00 PM
Yup, complexity should be < 10, but sometimes hard to avoid. Those are good metrics.
Here's another one. Max complexity metric is ***** 389 ***** which I think might be a record. Can anyone beat this?
Parameter Value
========= =====
Project Directory ------
Project Name ------
Checkpoint Name Baseline
File Name ------
Lines 2,303
Statements 1,323
Percent Branch Statements 37.8
Percent Lines with Comments 22.5
Functions 7
Average Statements per Function 292.9
Line Number of Most Complex Function 639
Name of Most Complex Function OPR_PerformOperCheck()
Complexity of Most Complex Function 389
Line Number of Deepest Block 1295
Maximum Block Depth 9+
Average Block Depth 4.36
Average Complexity 81.57
--------------------------------------------------------------------------------------------
Names of 7 Functions Complexity, Statements, Max Depth, Calls
adjacent() 101, 71, 5, 9
adjacentAboveBelow() 7, 13, 3, 0
adjacentLeftRight() 7, 13, 3, 0
OPR_DeleteOperPtrs() 7, 19, 2, 6
OPR_DeleteOperReqs() 3, 6, 3, 1
OPR_PerformOperCheck() 389, 1021, 11, 401
OPR_ReadOperConfigFile() 57, 148, 6, 16
--------------------------------------------------------------------------------------------
Block Depth Statements
0 32
1 144
2 138
3 151
4 259
5 229
6 119
7 87
8 88
9+ 76
--------------------------------------------------------------------------------------------
10-29-2007 06:11 PM
Here's one of mine. Bad complexity metric. But avg block depth 1.56 is good. Maybe complexity / block depth trades off.
Parameter Value
========= =====
Project Directory --------
Project Name --------
Checkpoint Name Baseline
Created On 29 October 2007, 4:04:30 PM
Files 9
Lines 5,001
Statements 2,299
Percent Branch Statements 28.6
Percent Lines with Comments 22.7
Functions 69
Average Statements per Function 47.9
Line Number of Most Complex Function {undefined}
Name of Most Complex Function Sigma_Systems_C5Open()
Complexity of Most Complex Function 56
Line Number of Deepest Block {undefined}
Maximum Block Depth 5
Average Block Depth 1.56
Average Complexity 22.44
--------------------------------------------------------------------------------------------
Names of 9 Functions Complexity, Statements, Max Depth, Calls
BlackbodyOpen() 22, 117, 4, 62
ChamberOpen() 16, 48, 4, 14
GetRegSerialConfig() 11, 35, 2, 20
HP34970Open() 16, 52, 3, 20
MeasureUUTPower() 4, 16, 2, 11
MicristarOpen() 18, 69, 4, 26
PowerOutletOpen() 33, 151, 3, 74
Sigma_Systems_C5Open() 56, 208, 4, 76
Watlow_988Open() 26, 101, 4, 36
--------------------------------------------------------------------------------------------
Block Depth Statements
0 314
1 817
2 815
3 285
4 58
5 10
6 0
7 0
8 0
9+ 0
--------------------------------------------------------------------------------------------
10-29-2007 09:15 PM
10-29-2007 09:34 PM
10-29-2007 10:14 PM
10-30-2007 10:08 AM
10-30-2007 10:40 AM
10-30-2007 10:43 AM
10-30-2007 11:19 AM