vendor: update google/cadvisor and opencontainers/runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
102
vendor/github.com/google/cadvisor/metrics/prometheus.go
generated
vendored
102
vendor/github.com/google/cadvisor/metrics/prometheus.go
generated
vendored
@@ -1545,11 +1545,11 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
},
|
||||
}...)
|
||||
}
|
||||
if c.includedMetrics.Has(container.PerfMetrics) {
|
||||
if includedMetrics.Has(container.PerfMetrics) {
|
||||
c.containerMetrics = append(c.containerMetrics, []containerMetric{
|
||||
{
|
||||
name: "container_perf_metric",
|
||||
help: "Perf event metric",
|
||||
name: "container_perf_events_total",
|
||||
help: "Perf event metric.",
|
||||
valueType: prometheus.CounterValue,
|
||||
extraLabels: []string{"cpu", "event"},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
@@ -1565,8 +1565,8 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_perf_metric_scaling_ratio",
|
||||
help: "Perf event metric scaling ratio",
|
||||
name: "container_perf_events_scaling_ratio",
|
||||
help: "Perf event metric scaling ratio.",
|
||||
valueType: prometheus.GaugeValue,
|
||||
extraLabels: []string{"cpu", "event"},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
@@ -1581,6 +1581,40 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
return values
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_perf_uncore_events_total",
|
||||
help: "Perf uncore event metric.",
|
||||
valueType: prometheus.CounterValue,
|
||||
extraLabels: []string{"socket", "event", "pmu"},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
values := make(metricValues, 0, len(s.PerfUncoreStats))
|
||||
for _, metric := range s.PerfUncoreStats {
|
||||
values = append(values, metricValue{
|
||||
value: float64(metric.Value),
|
||||
labels: []string{strconv.Itoa(metric.Socket), metric.Name, metric.PMU},
|
||||
timestamp: s.Timestamp,
|
||||
})
|
||||
}
|
||||
return values
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_perf_uncore_events_scaling_ratio",
|
||||
help: "Perf uncore event metric scaling ratio.",
|
||||
valueType: prometheus.GaugeValue,
|
||||
extraLabels: []string{"socket", "event", "pmu"},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
values := make(metricValues, 0, len(s.PerfUncoreStats))
|
||||
for _, metric := range s.PerfUncoreStats {
|
||||
values = append(values, metricValue{
|
||||
value: metric.ScalingRatio,
|
||||
labels: []string{strconv.Itoa(metric.Socket), metric.Name, metric.PMU},
|
||||
timestamp: s.Timestamp,
|
||||
})
|
||||
}
|
||||
return values
|
||||
},
|
||||
},
|
||||
}...)
|
||||
}
|
||||
if includedMetrics.Has(container.ReferencedMemoryMetrics) {
|
||||
@@ -1595,6 +1629,64 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
|
||||
},
|
||||
}...)
|
||||
}
|
||||
if includedMetrics.Has(container.ResctrlMetrics) {
|
||||
c.containerMetrics = append(c.containerMetrics, []containerMetric{
|
||||
{
|
||||
name: "container_memory_bandwidth_bytes",
|
||||
help: "Total memory bandwidth usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).",
|
||||
valueType: prometheus.GaugeValue,
|
||||
extraLabels: []string{prometheusNodeLabelName},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
numberOfNUMANodes := len(s.Resctrl.MemoryBandwidth)
|
||||
metrics := make(metricValues, numberOfNUMANodes)
|
||||
for numaNode, stats := range s.Resctrl.MemoryBandwidth {
|
||||
metrics[numaNode] = metricValue{
|
||||
value: float64(stats.TotalBytes),
|
||||
timestamp: s.Timestamp,
|
||||
labels: []string{strconv.Itoa(numaNode)},
|
||||
}
|
||||
}
|
||||
return metrics
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_memory_bandwidth_local_bytes",
|
||||
help: "Local memory bandwidth usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).",
|
||||
valueType: prometheus.GaugeValue,
|
||||
extraLabels: []string{prometheusNodeLabelName},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
numberOfNUMANodes := len(s.Resctrl.MemoryBandwidth)
|
||||
metrics := make(metricValues, numberOfNUMANodes)
|
||||
for numaNode, stats := range s.Resctrl.MemoryBandwidth {
|
||||
metrics[numaNode] = metricValue{
|
||||
value: float64(stats.LocalBytes),
|
||||
timestamp: s.Timestamp,
|
||||
labels: []string{strconv.Itoa(numaNode)},
|
||||
}
|
||||
}
|
||||
return metrics
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "container_llc_occupancy_bytes",
|
||||
help: "Last level cache usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).",
|
||||
valueType: prometheus.GaugeValue,
|
||||
extraLabels: []string{prometheusNodeLabelName},
|
||||
getValues: func(s *info.ContainerStats) metricValues {
|
||||
numberOfNUMANodes := len(s.Resctrl.Cache)
|
||||
metrics := make(metricValues, numberOfNUMANodes)
|
||||
for numaNode, stats := range s.Resctrl.Cache {
|
||||
metrics[numaNode] = metricValue{
|
||||
value: float64(stats.LLCOccupancy),
|
||||
timestamp: s.Timestamp,
|
||||
labels: []string{strconv.Itoa(numaNode)},
|
||||
}
|
||||
}
|
||||
return metrics
|
||||
},
|
||||
},
|
||||
}...)
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
|
36
vendor/github.com/google/cadvisor/metrics/prometheus_fake.go
generated
vendored
36
vendor/github.com/google/cadvisor/metrics/prometheus_fake.go
generated
vendored
@@ -648,7 +648,43 @@ func (p testSubcontainersInfoProvider) SubcontainersInfo(string, *info.Container
|
||||
Cpu: 1,
|
||||
},
|
||||
},
|
||||
PerfUncoreStats: []info.PerfUncoreStat{
|
||||
{
|
||||
ScalingRatio: 1.0,
|
||||
Value: 1231231512.0,
|
||||
Name: "cas_count_read",
|
||||
Socket: 0,
|
||||
PMU: "uncore_imc_0",
|
||||
},
|
||||
{
|
||||
ScalingRatio: 1.0,
|
||||
Value: 1111231331.0,
|
||||
Name: "cas_count_read",
|
||||
Socket: 1,
|
||||
PMU: "uncore_imc_0",
|
||||
},
|
||||
},
|
||||
ReferencedMemory: 1234,
|
||||
Resctrl: info.ResctrlStats{
|
||||
MemoryBandwidth: []info.MemoryBandwidthStats{
|
||||
{
|
||||
TotalBytes: 4512312,
|
||||
LocalBytes: 2390393,
|
||||
},
|
||||
{
|
||||
TotalBytes: 2173713,
|
||||
LocalBytes: 1231233,
|
||||
},
|
||||
},
|
||||
Cache: []info.CacheStats{
|
||||
{
|
||||
LLCOccupancy: 162626,
|
||||
},
|
||||
{
|
||||
LLCOccupancy: 213777,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user