Reporting time series of stats

This commit is contained in:
Diptanu Choudhury
2016-05-09 07:57:26 -07:00
parent eda53e3bcb
commit f390261cd0
6 changed files with 69 additions and 24 deletions

View File

@@ -8,6 +8,7 @@ import (
"strconv"
"strings"
"syscall"
"time"
"github.com/hashicorp/go-multierror"
"github.com/opencontainers/runc/libcontainer/cgroups"
@@ -157,7 +158,7 @@ func (e *UniversalExecutor) Stats() (*cstructs.TaskResourceUsage, error) {
ThrottledPeriods: stats.CpuStats.ThrottlingData.ThrottledPeriods,
ThrottledTime: stats.CpuStats.ThrottlingData.ThrottledTime,
}
return &cstructs.TaskResourceUsage{MemoryStats: ms, CpuStats: cs}, nil
return &cstructs.TaskResourceUsage{MemoryStats: ms, CpuStats: cs, Timestamp: time.Now()}, nil
}
// runAs takes a user id as a string and looks up the user, and sets the command