Skip to content

Conversation

@danovaro
Copy link
Member

@danovaro danovaro commented Jan 23, 2026

Description

add the ability to create groups of metrics
(requested in mars-server to list all the files in which a big layout is subdivided)

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-247

@danovaro danovaro requested review from Ozaq and simondsmart January 23, 2026 08:18
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 88.85449% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.24%. Comparing base (eda7547) to head (759921c).

Files with missing lines Patch % Lines
src/eckit/runtime/Metrics.cc 77.50% 36 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #247      +/-   ##
===========================================
+ Coverage    65.86%   66.24%   +0.38%     
===========================================
  Files         1129     1131       +2     
  Lines        57671    57960     +289     
  Branches      4365     4395      +30     
===========================================
+ Hits         37985    38397     +412     
+ Misses       19686    19563     -123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Ozaq Ozaq left a comment

Choose a reason for hiding this comment

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

Some minor change request. Please provide some documentation.

Comment on lines 159 to 165
{
eckit::MetricsGroup grp("group");
Metrics::set("int", 1);
eckit::MetricsGroupItem gi;
Metrics::set("int", 2);
}
expect(",\"group\":[{\"int\":1},{\"int\":2}]}", metrics);
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this; Does this mean a group contains an implicit GroupItem?

Comment on lines 90 to 102
class MetricsGroup {
public:

MetricsGroup(const std::string& prefix);
~MetricsGroup();
};

class MetricsGroupItem {
public:

MetricsGroupItem();
~MetricsGroupItem();
};
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a bit of documentation to this? Its not immediately clear how this is supposed to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants