Skip to content

Functions with high cyclic complexity #151

Description

@jphickey

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
The following functions have a high cyclic complexity and should be split into multiple subroutines

function complexity
HS_SendHkCmd 23
HS_AcquirePointers 15
HS_TblInit 14
HS_AppInit 14
HS_MonitorSingleApplication 13
HS_MonitorUtilization 13

Expected behavior
While the complexity scores are not off the charts, these functions are also 60-120 lines long, so splitting these large functions into smaller subroutines should both lower the complexity numbers as well as making the code more readable and maintainable.

Additional context
HS_MonitorSingleApplication and HS_MonitorSingleEvent were introduced in my previous PR #150. These were split from HS_MonitorApplications and HS_MonitorEvents, respectively. The previous complexity scores were 23 and 21. While this is reduced to more acceptable levels, there is more that could be done here.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions