Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Support commit metrics #1638

Merged
merged 13 commits into from
Oct 20, 2023
Merged

Conversation

schnappi17
Copy link
Contributor

Purpose

Linked issue: close #1468

@schnappi17
Copy link
Contributor Author

Remove total- metrics, which is more suitable to query system files table.

@schnappi17 schnappi17 force-pushed the commit-metrics branch 5 times, most recently from 232a167 to 5b822ad Compare September 23, 2023 06:16
@schnappi17 schnappi17 force-pushed the commit-metrics branch 3 times, most recently from 45ea034 to b334ea2 Compare October 10, 2023 12:43
Comment on lines 63 to 71
try {
assertThat(Metrics.getInstance().getMetricGroups().size()).isEqualTo(1);
} catch (AssertionError e) {
error =
ExceptionUtils.firstOrSuppressed(
e,
new AssertionError(
"Please close the created TableCommit objects in case of metrics resource leak."));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
try {
assertThat(Metrics.getInstance().getMetricGroups().size()).isEqualTo(1);
} catch (AssertionError e) {
error =
ExceptionUtils.firstOrSuppressed(
e,
new AssertionError(
"Please close the created TableCommit objects in case of metrics resource leak."));
}
assertThat(Metrics.getInstance().getMetricGroups().size()).isEqualTo(1).withFailMessage(xxx);

Please close the created TableCommit objects -> Please close the created metric groups. In the future we're going to add more metrics aside from commit metrics.

You might want to add a helper method to print out all metric group objects, so developers can see what kinds of metric groups are not closed.

@tsreaper tsreaper merged commit dbec0c3 into apache:master Oct 20, 2023
8 checks passed
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.

[Feature] Support CommitMetrics
2 participants