Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAD-2069 Cardano.BM.Stats.readProcessStats: minimal, aggregated proce…
…ss stats
- Loading branch information
Showing
7 changed files
with
131 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{-# LANGUAGE CPP #-} | ||
module Cardano.BM.Stats | ||
( ProcessStats(..) | ||
, Platform.readProcessStats | ||
) | ||
where | ||
|
||
import Cardano.BM.Stats.Types (ProcessStats(..)) | ||
|
||
#if defined(linux_HOST_OS) | ||
import qualified Cardano.BM.Counters.Linux as Platform | ||
#elif defined(mingw32_HOST_OS) | ||
import qualified Cardano.BM.Counters.Windows as Platform | ||
#elif defined(darwin_HOST_OS) | ||
import qualified Cardano.BM.Counters.Darwin as Platform | ||
#else | ||
import qualified Cardano.BM.Counters.Dummy as Platform | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Cardano.BM.Stats.Types | ||
(ProcessStats(..)) | ||
where | ||
|
||
data ProcessStats | ||
= ProcessStatsDarwin | ||
{ psCentiSecsCpu :: !Word | ||
, psRSS :: !Word | ||
} | ||
| ProcessStatsDummy | ||
{ | ||
} | ||
| ProcessStatsLinux | ||
{ psCentiSecsCpu :: !Word | ||
, psRSS :: !Word | ||
, psCentiSecsIOWait :: !Word | ||
, psThreads :: !Word | ||
} | ||
| ProcessStatsWindows | ||
{ psCentiSecsCpu :: !Word | ||
, psRSS :: !Word | ||
} | ||
deriving Show |