Skip to content

Commit

Permalink
Remove load5 and load15
Browse files Browse the repository at this point in the history
* not really useful
* take up lots of real estate

Fixes #1267
  • Loading branch information
davkal committed Apr 12, 2016
1 parent d6eff06 commit f0f89fd
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 60 deletions.
2 changes: 0 additions & 2 deletions probe/host/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const (
KernelVersion = "kernel_version"
Uptime = "uptime"
Load1 = "load1"
Load5 = "load5"
Load15 = "load15"
CPUUsage = "host_cpu_usage_percent"
MemoryUsage = "host_mem_usage_bytes"
)
Expand Down
2 changes: 0 additions & 2 deletions probe/host/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func TestReporter(t *testing.T) {
timestamp = time.Now()
metrics = report.Metrics{
host.Load1: report.MakeMetric().Add(timestamp, 1.0),
host.Load5: report.MakeMetric().Add(timestamp, 5.0),
host.Load15: report.MakeMetric().Add(timestamp, 15.0),
host.CPUUsage: report.MakeMetric().Add(timestamp, 30.0).WithMax(100.0),
host.MemoryUsage: report.MakeMetric().Add(timestamp, 60.0).WithMax(100.0),
}
Expand Down
10 changes: 0 additions & 10 deletions probe/host/system_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,8 @@ var GetLoad = func(now time.Time) report.Metrics {
if err != nil {
return nil
}
five, err := strconv.ParseFloat(matches[0][2], 64)
if err != nil {
return nil
}
fifteen, err := strconv.ParseFloat(matches[0][3], 64)
if err != nil {
return nil
}
return report.Metrics{
Load1: report.MakeMetric().Add(now, one),
Load5: report.MakeMetric().Add(now, five),
Load15: report.MakeMetric().Add(now, fifteen),
}
}

Expand Down
10 changes: 0 additions & 10 deletions probe/host/system_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,8 @@ var GetLoad = func(now time.Time) report.Metrics {
if err != nil {
return nil
}
five, err := strconv.ParseFloat(toks[1], 64)
if err != nil {
return nil
}
fifteen, err := strconv.ParseFloat(toks[2], 64)
if err != nil {
return nil
}
return report.Metrics{
Load1: report.MakeMetric().Add(now, one),
Load5: report.MakeMetric().Add(now, five),
Load15: report.MakeMetric().Add(now, fifteen),
}
}

Expand Down
2 changes: 0 additions & 2 deletions render/detailed/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ var labels = map[string]string{
host.CPUUsage: "CPU",
host.HostName: "Hostname",
host.KernelVersion: "Kernel version",
host.Load15: "Load (15m)",
host.Load1: "Load (1m)",
host.Load5: "Load (5m)",
host.LocalNetworks: "Local Networks",
host.MemoryUsage: "Memory",
host.OS: "OS",
Expand Down
2 changes: 0 additions & 2 deletions render/detailed/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ var (
{ID: host.CPUUsage, Format: percentFormat},
{ID: host.MemoryUsage, Format: filesizeFormat},
{ID: host.Load1, Format: defaultFormat, Group: "load"},
{ID: host.Load5, Format: defaultFormat, Group: "load"},
{ID: host.Load15, Format: defaultFormat, Group: "load"},
}
)

Expand Down
12 changes: 0 additions & 12 deletions render/detailed/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,6 @@ func TestNodeMetrics(t *testing.T) {
Value: 0.09,
Metric: &fixture.ClientHostLoad1Metric,
},
{
ID: host.Load5,
Group: "load",
Value: 0.10,
Metric: &fixture.ClientHostLoad5Metric,
},
{
ID: host.Load15,
Group: "load",
Value: 0.11,
Metric: &fixture.ClientHostLoad15Metric,
},
},
},
{
Expand Down
12 changes: 0 additions & 12 deletions render/detailed/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@ func TestMakeDetailedHostNode(t *testing.T) {
Value: 0.09,
Metric: &fixture.ClientHostLoad1Metric,
},
{
ID: host.Load5,
Group: "load",
Value: 0.10,
Metric: &fixture.ClientHostLoad5Metric,
},
{
ID: host.Load15,
Group: "load",
Value: 0.11,
Metric: &fixture.ClientHostLoad15Metric,
},
},
},
Controls: []detailed.ControlInstance{},
Expand Down
8 changes: 0 additions & 8 deletions test/fixture/report_fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,10 @@ var (
ClientHostCPUMetric = report.MakeMetric().Add(Now, 0.07).WithFirst(Now.Add(-7 * time.Second))
ClientHostMemoryMetric = report.MakeMetric().Add(Now, 0.08).WithFirst(Now.Add(-8 * time.Second))
ClientHostLoad1Metric = report.MakeMetric().Add(Now, 0.09).WithFirst(Now.Add(-9 * time.Second))
ClientHostLoad5Metric = report.MakeMetric().Add(Now, 0.10).WithFirst(Now.Add(-10 * time.Second))
ClientHostLoad15Metric = report.MakeMetric().Add(Now, 0.11).WithFirst(Now.Add(-11 * time.Second))

ServerHostCPUMetric = report.MakeMetric().Add(Now, 0.12).WithFirst(Now.Add(-12 * time.Second))
ServerHostMemoryMetric = report.MakeMetric().Add(Now, 0.13).WithFirst(Now.Add(-13 * time.Second))
ServerHostLoad1Metric = report.MakeMetric().Add(Now, 0.14).WithFirst(Now.Add(-14 * time.Second))
ServerHostLoad5Metric = report.MakeMetric().Add(Now, 0.15).WithFirst(Now.Add(-15 * time.Second))
ServerHostLoad15Metric = report.MakeMetric().Add(Now, 0.16).WithFirst(Now.Add(-16 * time.Second))

Report = report.Report{
ID: "test-report",
Expand Down Expand Up @@ -322,8 +318,6 @@ var (
host.CPUUsage: ClientHostCPUMetric,
host.MemoryUsage: ClientHostMemoryMetric,
host.Load1: ClientHostLoad1Metric,
host.Load5: ClientHostLoad5Metric,
host.Load15: ClientHostLoad15Metric,
}),
ServerHostNodeID: report.MakeNodeWith(map[string]string{
"host_name": ServerHostName,
Expand All @@ -335,8 +329,6 @@ var (
host.CPUUsage: ServerHostCPUMetric,
host.MemoryUsage: ServerHostMemoryMetric,
host.Load1: ServerHostLoad1Metric,
host.Load5: ServerHostLoad5Metric,
host.Load15: ServerHostLoad15Metric,
}),
},
},
Expand Down

0 comments on commit f0f89fd

Please sign in to comment.