Skip to content

Conversation

@intjftw
Copy link
Collaborator

@intjftw intjftw commented Mar 8, 2024

As we discussed, endpoints for module-level C++ metric types are also required. I added a new endpoint to query all available module-level metric types and all stored metrics for one module. There are no module-level metrics implemented for now, so testing is difficult.
@mcserep please help me out on what else we might need, and how should I modify the endpoint if needed.

@intjftw intjftw added Kind: Enhancement 🌟 Status: WIP 👷 Issue or PR under development - feel free to review, though! Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin. labels Mar 8, 2024
@intjftw intjftw requested a review from mcserep March 8, 2024 22:30
@intjftw intjftw self-assigned this Mar 8, 2024
@mcserep
Copy link
Collaborator

mcserep commented Mar 8, 2024

@intjftw In my view (and as discussed on the previous meetings), there are 3 type of metrics, but 2 of them are really similar, so they can be merged.

  • AST node related metrics (e.g. function or class related metrics);
  • File related metrics;
  • Module (directory) related metrics.

File and module related metrics are basically the same, as CodeCompass identifies both of them with a file ID. I see no reason for differentiate between them, and this would only introduce code redundancy.
Thus, endpoints for querying ASTnode and File level metrics should be sufficient. (The latter including support for module metrics.)

On the other hand, we discussed the additional need for a higher abstraction level endpoint which does not receive an ASTNodeID or a FileID as an input parameter, but a file / directory path instead. Then, all file and AST node related metrics under that path should be returned. So e.g. if the path is module path, I would like to get:

  • all metrics for that module;
  • all metrics for the files inside that module;
  • all metrics for functions, classes, etc. inside those files.

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

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

Generally looks okay, with some refactoring required.

Will start functional testing now.

@mcserep mcserep removed the Status: WIP 👷 Issue or PR under development - feel free to review, though! label Mar 26, 2024
Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

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

During functional testing, I discovered some further issues.

@intjftw intjftw requested a review from mcserep April 8, 2024 19:41
Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

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

Apart from the mentioned issues, looks good, ready to merge after fix 🚀

@intjftw intjftw merged commit c7a637a into Ericsson:master Apr 28, 2024
@mcserep mcserep added this to the Upcoming Release milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Enhancement 🌟 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.

2 participants