Closed reynir closed 1 year ago
Thanks, I thought maybe instead of let descr = ref []
we could use let descr = lazy (wrap vmmapi_statnames ctx)
, and apply Lazy.force
. This way, ti would be evaluated only once, and the Lazy module would take care that it is good.
This looks fine, I pushed a commit that guard the statistics gathering of bhyve debug counters optional (via a flag passed to albatross-stats). WDYT?
Nice, it looks good to me
In #115 an exception from
List.combine
is raised. Withgit grep
I found two sites that callList.combine
. One place it's called withtaps
andvm.config.bridges
. This should be fine since the former is constructed from the latter. The other place is inalbatross_stats_pure.ml
in order to associate a statistic / counter value with a string description. Previously, the statistics description strings was fetched once when opening the first VM. From what I could gather the number of VM statistic counters depends on the number of CPUs assigned, so my hypothesis is the number of counters for the first VM may have differed from a later VM.This patch makes
vmmanage_vmmapi_stats
return(string * int64) list
instead of aint64 list
where the string is the description fetched withvm_get_stat_desc
at eachvmmanage_vmmapi_stats
call. This may be less efficient.Ideally, we would somehow verify my hypothesis, and maybe benchmark the performance impact of this patch.