Skip to content

Conversation

@mcserep
Copy link
Collaborator

@mcserep mcserep commented Jun 9, 2025

These metrics are required for efficient querying of metrics in the service layer, especially for paginated queries for large project.

@mcserep mcserep self-assigned this Jun 9, 2025
@mcserep mcserep added Plugin: C++ Issues related to the parsing and presentation of C++ projects. Target: Database Issues related to the database schema of the core or a plugin, or database handling in general. Plugin: Metrics Issues related to the code metrics plugin. labels Jun 9, 2025
@mcserep mcserep added this to Roadmap Jun 9, 2025
@github-project-automation github-project-automation bot moved this to In progress in Roadmap Jun 9, 2025
@mcserep mcserep added this to the Upcoming Release milestone Jun 9, 2025
@mcserep mcserep requested a review from Copilot June 9, 2025 15:36
Copy link
Contributor

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 enhances DB querying performance on C++ metrics tables by adding indexing directives to key fields.

  • Added DB indices for dependency and file metrics for faster querying.
  • Added an index for AST node metrics to optimize lookups.

Reviewed Changes

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

File Description
plugins/cpp_metrics/model/include/model/cpptypedependencymetrics.h Added DB indices for entityHash and dependencyHash
plugins/cpp_metrics/model/include/model/cppfilemetrics.h Added a DB index for file
plugins/cpp_metrics/model/include/model/cppastnodemetrics.h Added a DB index for astNodeId
Comments suppressed due to low confidence (1)

plugins/cpp_metrics/model/include/model/cpptypedependencymetrics.h:28

  • The index is being created on 'entityHash', yet this member is not visible in the structure diff. Please verify that 'entityHash' exists or update the index to target the correct member.
#pragma db index member(entityHash)

@mcserep mcserep merged commit fd50f92 into Ericsson:master Jun 9, 2025
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Roadmap Jun 9, 2025
@mcserep mcserep deleted the cpp-metrics-index branch June 9, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Plugin: C++ Issues related to the parsing and presentation of C++ projects. Plugin: Metrics Issues related to the code metrics plugin. Target: Database Issues related to the database schema of the core or a plugin, or database handling in general.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant