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

feat(internal/collector): MULTI-1736 implement sysinfo collection on Windows #10

Open
wants to merge 17 commits into
base: collector-sysinfo-wip
Choose a base branch
from

Conversation

Sploder12
Copy link
Collaborator

@Sploder12 Sploder12 commented Jan 28, 2025

This PR implements system hardware information collection on Windows. The information collected includes Product, CPU, GPU, Memory, Block, and Screen as described by the spec with some exceptions. The exceptions are:

  • Screens do not include physical size, refresh rate, color count, or HDR information.
  • GPU driver does not include version
  • CPU does not include threads per core. (although, it can be derived)

MULTI-1741

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 93.58289% with 12 lines in your changes missing coverage. Please review.

Project coverage is 79.74%. Comparing base (4c3b88e) to head (0833cce).

Files with missing lines Patch % Lines
...nal/collector/sysinfo/hardware/hardware_windows.go 93.58% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##           collector-sysinfo-wip      #10      +/-   ##
=========================================================
+ Coverage                  75.56%   79.74%   +4.18%     
=========================================================
  Files                         21       21              
  Lines                        937     1111     +174     
=========================================================
+ Hits                         708      886     +178     
+ Misses                       189      182       -7     
- Partials                      40       43       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sploder12 Sploder12 changed the title feat(internal/collector): MULTI-1736 implement sysinfo collection on Linux feat(internal/collector): MULTI-1736 implement sysinfo collection on Windows Jan 28, 2025
@Sploder12 Sploder12 force-pushed the collector-hardware-windows branch 3 times, most recently from 2ac9406 to 379cd35 Compare January 30, 2025 17:13
@Sploder12 Sploder12 marked this pull request as ready for review January 30, 2025 18:06
@Sploder12 Sploder12 force-pushed the collector-hardware-windows branch 5 times, most recently from 7501897 to fc1f191 Compare February 4, 2025 16:54
also modifies product collection a bit
Win32_PhysicalMemory would give us more information, but we currently only care about total physical memory.
A lot of info is missing. The physical size could be retrieved, but that command may be deprecated and associating that size to a particular monitor may not be stable.
The partition ones are important since we don't want out of bounds writes.
It would be bad if we allowed unreasonable amounts of partitions
@Sploder12 Sploder12 force-pushed the collector-hardware-windows branch from fc1f191 to c6cda73 Compare February 4, 2025 18:31
@Sploder12 Sploder12 force-pushed the collector-hardware-windows branch from c6cda73 to 0833cce Compare February 4, 2025 19:01
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.

2 participants