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

Function parseV4Ops

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

Source from the content-addressed store, hash-verified

267}
268
269func parseV4Ops(v []uint64) (V4Ops, error) {
270 values := int(v[0])
271 if len(v[1:]) != values || values < 39 {
272 return V4Ops{}, fmt.Errorf("invalid V4Ops line %v", v)
273 }
274
275 // nfs v2.5.x 39field and >=v2.6.x 40 field;
276 v40 := uint64(0)
277 if values > 39 {
278 v40 = v[40]
279 }
280
281 stats := V4Ops{
282 Op0Unused: v[1],
283 Op1Unused: v[2],
284 Op2Future: v[3],
285 Access: v[4],
286 Close: v[5],
287 Commit: v[6],
288 Create: v[7],
289 DelegPurge: v[8],
290 DelegReturn: v[9],
291 GetAttr: v[10],
292 GetFH: v[11],
293 Link: v[12],
294 Lock: v[13],
295 Lockt: v[14],
296 Locku: v[15],
297 Lookup: v[16],
298 LookupRoot: v[17],
299 Nverify: v[18],
300 Open: v[19],
301 OpenAttr: v[20],
302 OpenConfirm: v[21],
303 OpenDgrd: v[22],
304 PutFH: v[23],
305 PutPubFH: v[24],
306 PutRootFH: v[25],
307 Read: v[26],
308 ReadDir: v[27],
309 ReadLink: v[28],
310 Remove: v[29],
311 Rename: v[30],
312 Renew: v[31],
313 RestoreFH: v[32],
314 SaveFH: v[33],
315 SecInfo: v[34],
316 SetAttr: v[35],
317 SetClientID: v[36],
318 SetClientIDConfirm: v[37],
319 Verify: v[38],
320 Write: v[39],
321 RelLockOwner: v40,
322 }
323
324 return stats, nil
325}

Callers 1

ParseServerRPCStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected