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

Convert gc duration metrics to seconds #12244

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Sep 13, 2024

#12084 changed the unit to seconds but forgot to convert the value from millis to seconds

@trask trask merged commit 521109e into open-telemetry:main Sep 13, 2024
56 checks passed
@egahlin
Copy link

egahlin commented Sep 14, 2024

> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))

This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.

@laurit laurit deleted the gc-metrics-seconds branch September 15, 2024 10:34
@laurit
Copy link
Contributor Author

laurit commented Sep 15, 2024

> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))

This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.

@egahlin Thanks for reporting this. I have created #12256 to address this.

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.

3 participants