Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google/cadvisor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9b0e9502429ba3ab82bdc1adbc6aa15baa17a8fe
Choose a base ref
..
head repository: google/cadvisor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 013c9e97c100b03aafbeae2006be7789b62e6d4a
Choose a head ref
Showing with 9 additions and 0 deletions.
  1. +2 −0 info/v1/machine_test.go
  2. +1 −0 machine/machine.go
  3. +6 −0 metrics/testdata/prometheus_machine_metrics
2 changes: 2 additions & 0 deletions info/v1/machine_test.go
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ func getFakeMachineInfo() MachineInfo {
NumCores: 1,
NumPhysicalCores: 2,
NumSockets: 3,
NumBooks: 1,
NumDrawers: 1,
CpuFrequency: 4,
MemoryCapacity: 5,
SwapCapacity: 6,
1 change: 1 addition & 0 deletions machine/machine.go
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import (
"os"
"path"
"regexp"
"runtime"

"strconv"
"strings"
6 changes: 6 additions & 0 deletions metrics/testdata/prometheus_machine_metrics
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# HELP machine_cpu_books Number of CPU books.
# TYPE machine_cpu_books gauge
machine_cpu_books{boot_id="boot-id-test",machine_id="machine-id-test",system_uuid="system-uuid-test"} 0 1395066363000
# HELP machine_cpu_cache_capacity_bytes Cache size in bytes assigned to NUMA node and CPU core.
# TYPE machine_cpu_cache_capacity_bytes gauge
machine_cpu_cache_capacity_bytes{boot_id="boot-id-test",core_id="",level="3",machine_id="machine-id-test",node_id="1",system_uuid="system-uuid-test",type="Unified"} 8.388608e+06 1395066363000
@@ -28,6 +31,9 @@ machine_cpu_cache_capacity_bytes{boot_id="boot-id-test",core_id="7",level="2",ma
# HELP machine_cpu_cores Number of logical CPU cores.
# TYPE machine_cpu_cores gauge
machine_cpu_cores{boot_id="boot-id-test",machine_id="machine-id-test",system_uuid="system-uuid-test"} 4 1395066363000
# HELP machine_cpu_drawers Number of CPU drawers.
# TYPE machine_cpu_drawers gauge
machine_cpu_drawers{boot_id="boot-id-test",machine_id="machine-id-test",system_uuid="system-uuid-test"} 0 1395066363000
# HELP machine_cpu_physical_cores Number of physical CPU cores.
# TYPE machine_cpu_physical_cores gauge
machine_cpu_physical_cores{boot_id="boot-id-test",machine_id="machine-id-test",system_uuid="system-uuid-test"} 1 1395066363000