Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Add partition stats for folder mounted volumes in Windows to monitor filesystems #1870

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

bjsignalfx
Copy link
Contributor

@bjsignalfx bjsignalfx commented Aug 16, 2021

Made changes to collect partitions stats for partitions in volumes mounted to drives and folders in Windows.

  • Tested in Windows Server 2016
  • Compared against gopsutil v3.10.20

@rmfitzpatrick
Copy link
Contributor

Would you be able to add unit and/or windows marked integration tests?

@bjsignalfx
Copy link
Contributor Author

bjsignalfx commented Aug 24, 2021

@rmfitzpatrick writing the integration test seems to be more involved than I thought. So, I asked @jchengsfx for access to his EC2 windows instance (ec2-35-163-38-92.us-west-2.compute.amazonaws.com) where I created a 100 MiB VHD and mounted it to C:\mnt\testHD. I'm running the partitions monitor there and you can see the data here.

You can search for the other filesystems metrics using filesystems-bremer.

@rmfitzpatrick
Copy link
Contributor

@bjsignalfx, it's pretty standard to hardcode a historic view or return value while writing unit tests to ensure that they result in the expected structures/values for things that are nontrivial to mock or that require cumbersome integration test environments. Having a "works for me" example at PR time doesn't help detect regressions or provide helpful scaffolding for bug fixes and enhancements in the future.

@bjsignalfx bjsignalfx requested a review from a team as a code owner August 25, 2021 15:19
@bjsignalfx
Copy link
Contributor Author

@rmfitzpatrick I added tests to compare the functionality against gopsutils. Crucially there is no test for getting partition stats of folder mounts which is what this fix is for.

@bjsignalfx bjsignalfx force-pushed the win-partitions branch 2 times, most recently from 60890ba to 0f477c3 Compare September 1, 2021 19:15
@bjsignalfx bjsignalfx merged commit 7339941 into main Sep 3, 2021
@atoulme atoulme deleted the win-partitions branch November 10, 2022 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants