mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Add Client Device Stats structs in api package
This commit is contained in:
@@ -29,7 +29,7 @@ func TestHostStats_CPU(t *testing.T) {
|
||||
logger := testlog.HCLogger(t)
|
||||
cwd, err := os.Getwd()
|
||||
assert.Nil(err)
|
||||
hs := NewHostStatsCollector(logger, cwd)
|
||||
hs := NewHostStatsCollector(logger, cwd, nil)
|
||||
|
||||
// Collect twice so we can calculate percents we need to generate some work
|
||||
// so that the cpu values change
|
||||
|
||||
@@ -204,6 +204,10 @@ func (h *HostStatsCollector) collectDiskStats() ([]*DiskStats, error) {
|
||||
}
|
||||
|
||||
func (h *HostStatsCollector) collectDeviceGroupStats() []*DeviceGroupStats {
|
||||
if h.deviceStatsCollector == nil {
|
||||
return []*DeviceGroupStats{}
|
||||
}
|
||||
|
||||
return h.deviceStatsCollector()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user