NVIDIA / go-dcgm

Golang bindings for Nvidia Datacenter GPU Manager (DCGM)
Apache License 2.0
96 stars 27 forks source link

Adding new WatchPidFieldsEx method #9

Closed SQUIDwarrior closed 3 years ago

SQUIDwarrior commented 3 years ago

This modifies the private watchPidFields() method to pass through the timing/sample limit parameters to the underlying C function rather than simply use the defaults. I then added a new WatchPidFieldsEx() method to allow using this feature in code leveraging this library. The existing WatchPidFields() method maintains the original behavior.

I added this because I wanted the ability to get process-level stats at a higher frequency than the default 30s rate. This allows that to be adjusted by users of this library for different use-cases, while maintaining the default behavior.