* Use vendored go-swagger (#8087) * Use vendored go-swagger * vendor go-swagger * revert un wanteed change * remove un-needed GO111MODULE * Update Makefile Co-Authored-By: techknowlogick <matti@mdranta.net> * re-generate swagger file
This commit is contained in:
parent
2f71571305
commit
c4d8d53a6d
918 changed files with 168225 additions and 9462 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 p.Stat() 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