mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 06:34:40 +03:00
update latest prometheus client dependency and its dependencies
This commit is contained in:
12
vendor/github.com/prometheus/procfs/proc_stat.go
generated
vendored
12
vendor/github.com/prometheus/procfs/proc_stat.go
generated
vendored
@ -18,7 +18,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/prometheus/procfs/internal/fs"
|
||||
"github.com/prometheus/procfs/internal/util"
|
||||
)
|
||||
|
||||
@ -102,6 +101,8 @@ type ProcStat struct {
|
||||
RSS int
|
||||
// Soft limit in bytes on the rss of the process.
|
||||
RSSLimit uint64
|
||||
// CPU number last executed on.
|
||||
Processor uint
|
||||
// Real-time scheduling priority, a number in the range 1 to 99 for processes
|
||||
// scheduled under a real-time policy, or 0, for non-real-time processes.
|
||||
RTPriority uint
|
||||
@ -110,7 +111,7 @@ type ProcStat struct {
|
||||
// Aggregated block I/O delays, measured in clock ticks (centiseconds).
|
||||
DelayAcctBlkIOTicks uint64
|
||||
|
||||
proc fs.FS
|
||||
proc FS
|
||||
}
|
||||
|
||||
// NewStat returns the current status information of the process.
|
||||
@ -137,7 +138,7 @@ func (p Proc) Stat() (ProcStat, error) {
|
||||
)
|
||||
|
||||
if l < 0 || r < 0 {
|
||||
return ProcStat{}, fmt.Errorf("unexpected format, couldn't extract comm %q", data)
|
||||
return ProcStat{}, fmt.Errorf("%w: unexpected format, couldn't extract comm %q", ErrFileParse, data)
|
||||
}
|
||||
|
||||
s.Comm = string(data[l+1 : r])
|
||||
@ -184,7 +185,7 @@ func (p Proc) Stat() (ProcStat, error) {
|
||||
&ignoreUint64,
|
||||
&ignoreUint64,
|
||||
&ignoreInt64,
|
||||
&ignoreInt64,
|
||||
&s.Processor,
|
||||
&s.RTPriority,
|
||||
&s.Policy,
|
||||
&s.DelayAcctBlkIOTicks,
|
||||
@ -208,8 +209,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.Stat()
|
||||
stat, err := s.proc.Stat()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user