mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Add the usage benchmark which queries memory usage from the container. This is meant to replace the size benchmark which has a ton of noise. Flakes are due to the complicated measurement technique of dropping caches -> parse /proc/meminfo -> start containers -> drops caches again -> parse /proc/meminfo -> take the diference. This was done because not all runtimes support docker/containerd stats. Buuuut...gVisor does, so we'll just take the stats figures to reduce noise for the memory usage benchmark. In addition, the returned types.StatsJSON object contains several useful stats like page faults and CPU usage, so adding these will be trivial and will not slow down benchmark performance. [types.StatsJSON linky link](https://github.com/moby/moby/blob/42c8b314993e5eb3cc2776da0bbe41d5eb4b707b/api/types/stats.go#LL153) PiperOrigin-RevId: 503342363