Merge pull request #6 from christophe-duc/bugfix/fix_add_stats

fix a compile error
This commit is contained in:
Christophe 2026-01-07 20:32:01 -04:00 committed by GitHub
commit eabd38c75d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -412,9 +412,11 @@ func (r *LibpodRuntime) aggregatePodContainerStats(ctx context.Context, pod *lib
totalMemLimit += stats.MemLimit totalMemLimit += stats.MemLimit
totalPIDs += stats.PIDs totalPIDs += stats.PIDs
// Aggregate network stats // Aggregate network stats from all interfaces
totalNetIn += stats.NetInput for _, netStats := range stats.Network {
totalNetOut += stats.NetOutput totalNetIn += netStats.RxBytes
totalNetOut += netStats.TxBytes
}
// Aggregate block I/O stats // Aggregate block I/O stats
totalBlockIn += stats.BlockInput totalBlockIn += stats.BlockInput