update procfs to v0.0.2 (#1376)
Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
parent
0759c0ac01
commit
2bc133cd48
33 changed files with 167 additions and 172 deletions
9
vendor/github.com/prometheus/procfs/proc_stat.go
generated
vendored
9
vendor/github.com/prometheus/procfs/proc_stat.go
generated
vendored
|
|
@ -105,7 +105,14 @@ type ProcStat struct {
|
|||
}
|
||||
|
||||
// NewStat returns the current status information of the process.
|
||||
//
|
||||
// Deprecated: use NewStat() instead
|
||||
func (p Proc) NewStat() (ProcStat, error) {
|
||||
return p.Stat()
|
||||
}
|
||||
|
||||
// Stat returns the current status information of the process.
|
||||
func (p Proc) Stat() (ProcStat, error) {
|
||||
f, err := os.Open(p.path("stat"))
|
||||
if err != nil {
|
||||
return ProcStat{}, err
|
||||
|
|
@ -178,7 +185,7 @@ func (s ProcStat) ResidentMemory() int {
|
|||
// StartTime returns the unix timestamp of the process in seconds.
|
||||
func (s ProcStat) StartTime() (float64, error) {
|
||||
fs := FS{proc: s.proc}
|
||||
stat, err := fs.NewStat()
|
||||
stat, err := fs.Stat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue