Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rapl Energy
Small library for getting the CPU energy consumption from RAPL and friends.
This project is very much still a work in progress, and is mainly intended for internal use. However I share it here should it be useful to anyone.
RAPL permissions
Reading RAPL requires elevated permissions.
I suggest adding a new rapl
group.
And then adding the necessary entries to /etc/sysfs.conf
.
(Requires sysfsutils
to be installed.)
MSR permissions
Reading model-specific registers (MSR) requires elevated permissions.
You might need to run modprobe as well.
One can then print the accumulated energy value as follows.
(Where -a
prints all CPUs, and -u
prints the value as an unsigned decimal.)
It seems that the executable must be run with sudo though. I still need to figure out if perhaps this can be done instead with a group.
MSR group
It might be useful to create a group for MSR. Sadly this does not resolve the above issue however.