updated cadvisor version

This commit is contained in:
bindata-mockuser
2016-08-02 16:01:00 -07:00
parent fa5f3b816e
commit e00a35ccad
18 changed files with 211 additions and 161 deletions

View File

@@ -217,8 +217,11 @@ type FsInfo struct {
// Labels associated with this filesystem.
Labels []string `json:"labels"`
// Number of available Inodes.
InodesFree uint64 `json:"inodes_free"`
// Number of Inodes.
Inodes *uint64 `json:"inodes,omitempty"`
// Number of available Inodes (if known)
InodesFree *uint64 `json:"inodes_free,omitempty"`
}
type RequestOptions struct {

View File

@@ -24,18 +24,18 @@ import (
func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats {
var result []MachineFsStats
for _, stat := range fsStats {
for i := range fsStats {
stat := fsStats[i]
readDuration := time.Millisecond * time.Duration(stat.ReadTime)
writeDuration := time.Millisecond * time.Duration(stat.WriteTime)
ioDuration := time.Millisecond * time.Duration(stat.IoTime)
weightedDuration := time.Millisecond * time.Duration(stat.WeightedIoTime)
result = append(result, MachineFsStats{
Device: stat.Device,
Type: stat.Type,
Capacity: &stat.Limit,
Usage: &stat.Usage,
Available: &stat.Available,
InodesFree: &stat.InodesFree,
machineFsStat := MachineFsStats{
Device: stat.Device,
Type: stat.Type,
Capacity: &stat.Limit,
Usage: &stat.Usage,
Available: &stat.Available,
DiskStats: DiskStats{
ReadsCompleted: &stat.ReadsCompleted,
ReadsMerged: &stat.ReadsMerged,
@@ -49,7 +49,11 @@ func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats {
IoDuration: &ioDuration,
WeightedIoDuration: &weightedDuration,
},
})
}
if stat.HasInodes {
machineFsStat.InodesFree = &stat.InodesFree
}
result = append(result, machineFsStat)
}
return result
}
@@ -57,7 +61,8 @@ func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats {
func MachineStatsFromV1(cont *v1.ContainerInfo) []MachineStats {
var stats []MachineStats
var last *v1.ContainerStats
for _, val := range cont.Stats {
for i := range cont.Stats {
val := cont.Stats[i]
stat := MachineStats{
Timestamp: val.Timestamp,
}