Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Indexer ¶
Find the index of items in the list with index higher than length or less than length
func SizeToHumanReadable ¶
func StatsCalculator ¶
These are formulas to calculate stats cpu_delta = cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage system_cpu_delta = cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage number_of_cpu_cores = lenght(cpu_stats.cpu_usage.percpu_usage) or cpu_stats.online_cpus CPU usage % = (cpu_delta / system_cpu_delta) * number_of_cpu_cores * 100.0
used_memory = memory_stats.usage - memory_stats.stats.cache available_memory = memory_stats.limit Memory usage % = (used_memory / available_memory) * 100.0
CPU usage are based on the host, not VM, so in Windows devices, you may see different cpu usages in the Bot and Docker desktop and docker cli, but, that's calculable. both are correct anyway.
Types ¶
This section is empty.