https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=bae660869de0612bee2a740083fb494c27e3f80c added a "cpu_cycles" statistic to the libvirt api. It documents it thusly, in various places. <td>the number of cpu cycles one instruction needs</td> This is incorrect, and probably came from a misunderstanding of the VIR_PERF_PARAM_CPU_CYCLES blurb: Macro for typed parameter name that represents cpu_cycles perf event which can be used to measure how many cpu cycles one instruction needs. It corresponds to the "perf.cpu_cycles" field in the *Stats APIs. The cpu_cycles counts cpu cycles (total/elapsed). Only when divided by VIR_PERF_PARAM_INSTRUCTIONS does one get an *average* cycles-per-instruction (which would be represented by a FLOAT rather than LONG LONG anyway). Please consider fixing the documentation.
Yeah when looking at things, I'm sure I thought that looks strange, but I didn't alter the original author's text assuming it was right... The series which I altered was here: http://www.redhat.com/archives/libvir-list/2016-July/msg00607.html In any case, there's a patch upstream to alter the text for cpu_cycles (as part of a series of minor alterations): http://www.redhat.com/archives/libvir-list/2016-October/msg00319.html thanks!
Patches pushed - changes will be in libvirt 2.4.0 commit 12629888fccf063580a0541a9e77aac0086b6e72 Author: John Ferlan <jferlan> Date: Fri Oct 7 07:55:51 2016 -0400 docs: Alter descriptions of perf cpu_cycles ... $ git describe 12629888fccf063580a0541a9e77aac0086b6e72 v2.3.0-38-g1262988 See: https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=12629888fccf063580a0541a9e77aac0086b6e72