MCPcopy Create free account
hub / github.com/prometheus/procfs / parseStatm

Function parseStatm

proc_statm.go:81–92  ·  view source on GitHub ↗

parseStatm return /proc/[pid]/statm data to uint64 slice.

(data []byte)

Source from the content-addressed store, hash-verified

79
80// parseStatm return /proc/[pid]/statm data to uint64 slice.
81func parseStatm(data []byte) ([]uint64, error) {
82 var statmSlice []uint64
83 statmItems := strings.Fields(string(data))
84 for i := range statmItems {
85 statmItem, err := strconv.ParseUint(statmItems[i], 10, 64)
86 if err != nil {
87 return nil, err
88 }
89 statmSlice = append(statmSlice, statmItem)
90 }
91 return statmSlice, nil
92}
93
94// SizeBytes returns the process of total program size in bytes.
95func (s ProcStatm) SizeBytes() uint64 {

Callers 1

StatmMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…