mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
0.2.5 initial commit
Makefile incomplete
This commit is contained in:
22
agent/test/Live/Metrics.hs
Normal file
22
agent/test/Live/Metrics.hs
Normal file
@@ -0,0 +1,22 @@
|
||||
module Live.Metrics where
|
||||
|
||||
import Lib.External.Metrics.Df
|
||||
import Lib.External.Metrics.Iotop
|
||||
import Lib.External.Metrics.ProcDev
|
||||
import Lib.External.Metrics.Top
|
||||
import Startlude
|
||||
|
||||
parseIotopOutput :: IO IotopMetrics
|
||||
parseIotopOutput = parseIotop <$> readFile "./test/Live/iotop.sample"
|
||||
|
||||
parseTopOutput :: IO TopMetrics
|
||||
parseTopOutput = parseTop <$> readFile "./test/Live/top.sample"
|
||||
|
||||
parseDfOutput :: IO DfMetrics
|
||||
parseDfOutput = parseDf <$> readFile "./test/Live/df.sample"
|
||||
|
||||
parseProcDevOutput :: IO (UTCTime, ProcDevMomentStats)
|
||||
parseProcDevOutput = do
|
||||
res <- readFile "./test/Live/procDev.sample"
|
||||
now <- getCurrentTime
|
||||
pure $ parseProcDev now res
|
||||
Reference in New Issue
Block a user