NVIDIA / go-dcgm

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

Add new WatchPidFieldsEx method #8

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.

glowkey commented 3 years ago

While the PR looks good the repository requires that all commits be signed. Can you resubmit this with a signed commit?

SQUIDwarrior commented 3 years ago

While the PR looks good the repository requires that all commits be signed. Can you resubmit this with a signed commit?

Sure, I'll create a new PR with a signed commit.