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

fix(metrics): correct maxrss metrics on macos #7487

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Apr 23, 2024

Problem

macOS max_rss is in bytes, while Linux is in kilobytes. https://stackoverflow.com/a/59915669

Summary of changes

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh skyzh marked this pull request as ready for review April 23, 2024 16:07
@skyzh skyzh requested review from a team and problame and removed request for a team April 23, 2024 16:07
Copy link

github-actions bot commented Apr 23, 2024

2766 tests run: 2645 passed, 0 failed, 121 skipped (full report)


Code coverage* (full report)

  • functions: 28.1% (6481 of 23045 functions)
  • lines: 47.0% (46049 of 97988 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f093831 at 2024-04-24T15:17:14.747Z :recycle:

Copy link
Contributor

@problame problame left a comment

Choose a reason for hiding this comment

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

@skyzh
Copy link
Member Author

skyzh commented Apr 23, 2024

oh, i mean it's bytes in macOS, and therefore we need to / 1024 on macOS to convert it to kilobytes.

@koivunej
Copy link
Contributor

https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getrusage.2.html

There seems to be a difference between ios (which you linked) and macosx (for which man pages are not online?): https://stackoverflow.com/a/59915669

Copy link
Contributor

@koivunej koivunej left a comment

Choose a reason for hiding this comment

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

It would be nice to have the macosx man pages online, but there are other sources.

@problame
Copy link
Contributor

There seems to be a difference between ios (which you linked) and macosx (for which man pages are not online?): https://stackoverflow.com/a/59915669

Indeed, confirmed on my mac.

Would be nice to include that remark in a comment / commit message

Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh
Copy link
Member Author

skyzh commented Apr 24, 2024

added in f093831

@skyzh skyzh enabled auto-merge (squash) April 24, 2024 14:43
@skyzh skyzh merged commit 447a063 into main Apr 24, 2024
48 of 49 checks passed
@skyzh skyzh deleted the skyzh/correct-maxrss-macos branch April 24, 2024 15:09
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.

None yet

3 participants