Skip to content

Conversation

@pvital
Copy link
Member

@pvital pvital commented Jul 17, 2025

This PR adds support to Windows OS. It does the following:

  • Upgrades the collection of runtime environment info, by changing the util get_runtime_env_info() function also to return the system/OS information about the current runtime environment.
  • Creates three new functions to return if the current runtime environment runs on a Windows system, and ppc64 or s390x architectures.
  • Adds Windows platform support for resource metrics by creating a new resource_usage.py module with platform-specific implementations.
  • Adds psutil dependency for Windows systems in pyproject.toml.
  • Refactor runtime.py to use the new cross-platform resource usage functions, and
  • Implements the ResourceUsage class that provides consistent interface across platforms.

The implementation gracefully handles platform differences, ensuring consistent metrics collection on both Unix and Windows environments.

pvital added 2 commits July 16, 2025 21:07
Upgrade the util get_runtime_env_info() function to also return the system/OS information about the current runtime environment.

Also, create three new functions to return if the current runtime environment runs on a Windows system, and ppc64 or s390x architectures.

Signed-off-by: Paulo Vital <[email protected]>
@pvital pvital requested a review from a team as a code owner July 17, 2025 12:31
@pvital pvital self-assigned this Jul 17, 2025
@github-actions
Copy link

@pvital the signed-off-by was not found in the following 1 commits:

  • 35b9ae9: test(collector): add tests for cross-platform resource metrics

📝 What should I do to fix it?

All proposed commits should include a sign-off in their messages, ideally at the end.

❔ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:

By making a contribution to this project, I certify that:

a. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

b. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

c. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

d. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <[email protected]>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

@pvital pvital added enhancement dependencies Pull requests that update a dependency file labels Jul 17, 2025
@pvital pvital added this to the H2-2025 milestone Jul 17, 2025
@pvital pvital force-pushed the win_support branch 2 times, most recently from c807503 to a936f21 Compare July 17, 2025 12:50
Copy link
Contributor

@GSVarsha GSVarsha left a comment

Choose a reason for hiding this comment

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

Just a small docstring suggestion. Looks perfect to me otherwise!

pvital and others added 2 commits July 18, 2025 10:35
This change adds cross-platform resource usage monitoring with Windows support:

- Create new resource_usage.py module with platform-specific implementations
- Add psutil dependency for Windows systems in pyproject.toml
- Refactor runtime.py to use the new cross-platform resource usage functions
- Implement ResourceUsage class that provides consistent interface across platforms

The implementation gracefully handles platform differences, ensuring consistent
metrics collection on both Unix and Windows environments.

Co-authored-by: Varsha GS <[email protected]>
Signed-off-by: Paulo Vital <[email protected]>
@pvital pvital merged commit ed4c1fb into main Jul 18, 2025
17 checks passed
@pvital pvital deleted the win_support branch July 18, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants