The measurement of software complexity is critical for assessing the maintainability and efficiency of modern applications. Traditional complexity models, such as the Cognitive Code Complexity metric, focus on structural elements like control flow and recursion but do not account for service interactions. In real-world systems, frequent and concurrent service calls to APIs, databases, and cloud services introduce significant cognitive and operational complexity. These factors are not adequately captured by existing models. To address this gap, this study proposes the Service Call Complexity Metric as an extension to the Cognitive Code Complexity metric. Service Call Complexity Metric quantifies complexity based on the frequency and concurrency of service interactions. A prototype tool using the Service Call Complexity Metric was developed and tested. Results showed that incorporating service calls provides a clearer and more comprehensive view of software complexity. Functions with high levels of service interaction exhibited notably elevated complexity scores, highlighting the practical importance of the proposed enhancement for modern software systems.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Extending Cognitive Code Complexity Measure to Include Service Call Impact

  • S. Varaprasath

摘要

The measurement of software complexity is critical for assessing the maintainability and efficiency of modern applications. Traditional complexity models, such as the Cognitive Code Complexity metric, focus on structural elements like control flow and recursion but do not account for service interactions. In real-world systems, frequent and concurrent service calls to APIs, databases, and cloud services introduce significant cognitive and operational complexity. These factors are not adequately captured by existing models. To address this gap, this study proposes the Service Call Complexity Metric as an extension to the Cognitive Code Complexity metric. Service Call Complexity Metric quantifies complexity based on the frequency and concurrency of service interactions. A prototype tool using the Service Call Complexity Metric was developed and tested. Results showed that incorporating service calls provides a clearer and more comprehensive view of software complexity. Functions with high levels of service interaction exhibited notably elevated complexity scores, highlighting the practical importance of the proposed enhancement for modern software systems.