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

Support ZGC Cycles MXBean #2795

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

shakuzen
Copy link
Member

Since Java 17, the GarbageCollectorMXBean for ZGC has been split into ZGC Pauses and ZGC Cycles, which allows us to properly measure the pause time and the concurrent collection time. Before we only had access to the overall time.

Resolves gh-2372

Since Java 17, the GarbageCollectorMXBean for ZGC has been split into `ZGC Pauses` and `ZGC Cycles`, which allows us to properly measure the pause time and the concurrent collection time. Before we only had access to the overall time.

Resolves micrometer-metricsgh-2372
@@ -61,6 +73,49 @@ void metersAreBound() {
assertThat(registry.find("jvm.gc.memory.promoted").counter()).isNotNull();
}

@Test
@Disabled("Garbage collection can happen before JvmGcMetrics are registered, making our metrics not match overall counts/timings")
Copy link
Member Author

Choose a reason for hiding this comment

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

While the test worked consistently for me on IntelliJ with ZGC and Shenandoah, it failed on the command line because of GC happening before JvmGcMetrics is registered, so the information in the GarbageCollectorMXBeans and our metrics do not add up. This is the issue described in #2561.

@jonatan-ivanov jonatan-ivanov merged commit e722ce3 into micrometer-metrics:1.6.x Sep 27, 2021
@jonatan-ivanov jonatan-ivanov linked an issue Sep 27, 2021 that may be closed by this pull request
@shakuzen shakuzen deleted the zgc-cycles branch September 28, 2021 01:04
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.

zgc pause time includes concurrent time
2 participants