in image/resources/knfsd-metrics-agent/internal/mounts/stats.go [183:213]
func diffEvents(new, old procfs.NFSEventsStats) procfs.NFSEventsStats {
return procfs.NFSEventsStats{
InodeRevalidate: sub(new.InodeRevalidate, old.InodeRevalidate),
DnodeRevalidate: sub(new.DnodeRevalidate, old.DnodeRevalidate),
DataInvalidate: sub(new.DataInvalidate, old.DataInvalidate),
AttributeInvalidate: sub(new.AttributeInvalidate, old.AttributeInvalidate),
VFSOpen: sub(new.VFSOpen, old.VFSOpen),
VFSLookup: sub(new.VFSLookup, old.VFSLookup),
VFSAccess: sub(new.VFSAccess, old.VFSAccess),
VFSUpdatePage: sub(new.VFSUpdatePage, old.VFSUpdatePage),
VFSReadPage: sub(new.VFSReadPage, old.VFSReadPage),
VFSReadPages: sub(new.VFSReadPages, old.VFSReadPages),
VFSWritePage: sub(new.VFSWritePage, old.VFSWritePage),
VFSWritePages: sub(new.VFSWritePages, old.VFSWritePages),
VFSGetdents: sub(new.VFSGetdents, old.VFSGetdents),
VFSSetattr: sub(new.VFSSetattr, old.VFSSetattr),
VFSFlush: sub(new.VFSFlush, old.VFSFlush),
VFSFsync: sub(new.VFSFsync, old.VFSFsync),
VFSLock: sub(new.VFSLock, old.VFSLock),
VFSFileRelease: sub(new.VFSFileRelease, old.VFSFileRelease),
CongestionWait: sub(new.CongestionWait, old.CongestionWait),
Truncation: sub(new.Truncation, old.Truncation),
WriteExtension: sub(new.WriteExtension, old.WriteExtension),
SillyRename: sub(new.SillyRename, old.SillyRename),
ShortRead: sub(new.ShortRead, old.ShortRead),
ShortWrite: sub(new.ShortWrite, old.ShortWrite),
JukeboxDelay: sub(new.JukeboxDelay, old.JukeboxDelay),
PNFSRead: sub(new.PNFSRead, old.PNFSRead),
PNFSWrite: sub(new.PNFSWrite, old.PNFSWrite),
}
}