Skip to content

Conversation

barnabasdomozi
Copy link
Collaborator

Refactored type-level McCabe metric to use parallel calculation.

Closes #751

@mcserep mcserep requested a review from Copilot August 26, 2025 04:45
@mcserep mcserep self-requested a review August 26, 2025 04:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the type-level McCabe metric calculation to use parallel processing instead of sequential processing. The change aims to improve performance by distributing the calculation across multiple threads.

  • Refactored typeMcCabe() method to use parallelCalcMetric for parallel execution
  • Replaced sequential loop with parallel task processing using lambda function
  • Added configuration constant for partition multiplier to control granularity

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cppmetricsparser.cpp Refactored typeMcCabe() method to use parallel processing with task-based approach
cppmetricsparser.h Added typeMcCabePartitionMultiplier constant for parallel processing configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mcserep mcserep added Kind: Refactor 🔃 Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin. labels Aug 26, 2025
@mcserep mcserep added this to the Upcoming Release milestone Aug 26, 2025
@mcserep mcserep merged commit 79e4425 into Ericsson:master Aug 26, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind: Refactor 🔃 Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make type level McCabe calculation parallel
2 participants