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

Function parseV2Stats

nfs/parse.go:119–145  ·  view source on GitHub ↗
(v []uint64)

Source from the content-addressed store, hash-verified

117}
118
119func parseV2Stats(v []uint64) (V2Stats, error) {
120 values := int(v[0])
121 if len(v[1:]) != values || values < 18 {
122 return V2Stats{}, fmt.Errorf("invalid V2Stats line %v", v)
123 }
124
125 return V2Stats{
126 Null: v[1],
127 GetAttr: v[2],
128 SetAttr: v[3],
129 Root: v[4],
130 Lookup: v[5],
131 ReadLink: v[6],
132 Read: v[7],
133 WrCache: v[8],
134 Write: v[9],
135 Create: v[10],
136 Remove: v[11],
137 Rename: v[12],
138 Link: v[13],
139 SymLink: v[14],
140 MkDir: v[15],
141 RmDir: v[16],
142 ReadDir: v[17],
143 FsStat: v[18],
144 }, nil
145}
146
147func parseV3Stats(v []uint64) (V3Stats, error) {
148 values := int(v[0])

Callers 2

ParseClientRPCStatsFunction · 0.85
ParseServerRPCStatsFunction · 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…