From 457f04671dc7a0e5413822d0d657afbca22d0429 Mon Sep 17 00:00:00 2001 From: shirou Date: Sun, 13 Jan 2019 17:27:42 +0900 Subject: [PATCH] [process] move PageFaultsStat to process.go --- process/process.go | 7 +++++++ process/process_linux.go | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/process/process.go b/process/process.go index 807c85d..a9d10e0 100644 --- a/process/process.go +++ b/process/process.go @@ -77,6 +77,13 @@ type NumCtxSwitchesStat struct { Involuntary int64 `json:"involuntary"` } +type PageFaultsStat struct { + MinorFaults uint64 `json:"minorFaults"` + MajorFaults uint64 `json:"majorFaults"` + ChildMinorFaults uint64 `json:"childMinorFaults"` + ChildMajorFaults uint64 `json:"childMajorFaults"` +} + // Resource limit constants are from /usr/include/x86_64-linux-gnu/bits/resource.h // from libc6-dev package in Ubuntu 16.10 const ( diff --git a/process/process_linux.go b/process/process_linux.go index a3a7403..00fdd33 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -59,13 +59,6 @@ type MemoryMapsStat struct { Swap uint64 `json:"swap"` } -type PageFaultsStat struct { - MinorFaults uint64 `json:"minorFaults"` - MajorFaults uint64 `json:"majorFaults"` - ChildMinorFaults uint64 `json:"childMinorFaults"` - ChildMajorFaults uint64 `json:"childMajorFaults"` -} - // String returns JSON value of the process. func (m MemoryMapsStat) String() string { s, _ := json.Marshal(m)