fearful-symmetry / gorapl

A user-friendly, low-level API for accessing Intel's RAPL feature set
Apache License 2.0
1 stars 0 forks source link

Package traversal algos #2

Open fearful-symmetry opened 5 years ago

fearful-symmetry commented 5 years ago

We might want to implement something like this:

http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration

so we can figure out how many physical processors are on a system.

fearful-symmetry commented 5 years ago

So far, the most readable example of this algo I've found is in the intel power_gadget source.

fearful-symmetry commented 5 years ago

I added a little algo to 56bd1c686253bc9445350b8bdba1e1be2d9de85e

For now, I'm kind of putting this on the backburner; I'm wondering if having a separate API for multi-cpu systems would be best, or a custom type that allows the user to specify multiple devices. Something like:

NewRAPLFromThreads([]int) (RAPLHandlerArray, error)
NewRAPLDetectPackages() (RAPLHandlerArray, error)