Skip to content

Commit a220c7f

Browse files
committed
make uptime minutes
1 parent 0f9859e commit a220c7f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

cli/clistat/stat.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func (s *Statter) HostMemory() (*Result, error) {
124124
// by checking /proc/1/stat.
125125
func (s *Statter) Uptime() (*Result, error) {
126126
r := &Result{
127-
Unit: "seconds",
127+
Unit: "minutes",
128128
Total: nil, // Is time a finite quantity? For this purpose, no.
129129
}
130130

@@ -137,19 +137,9 @@ func (s *Statter) Uptime() (*Result, error) {
137137
if err != nil {
138138
return nil, xerrors.Errorf("get pid 1 stat: %w", err)
139139
}
140-
r.Used = time.Since(procInfo.StartTime).Seconds()
140+
r.Used = time.Since(procInfo.StartTime).Minutes()
141141
return r, nil
142142
}
143-
r.Used = s.hi.Info().Uptime().Seconds()
143+
r.Used = s.hi.Info().Uptime().Minutes()
144144
return r, nil
145145
}
146-
147-
// ContainerCPU returns the CPU usage of the container.
148-
func (s *Statter) ContainerCPU() (*Result, error) {
149-
return nil, xerrors.Errorf("not implemented")
150-
}
151-
152-
// ContainerMemory returns the memory usage of the container.
153-
func (s *Statter) ContainerMemory() (*Result, error) {
154-
return nil, xerrors.Errorf("not implemented")
155-
}

0 commit comments

Comments
 (0)