Commit 60e7b76e authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Instance NFData CollectorData that we can force the states of stateful collectors.
This is necessary to avoid thunks accumulating in unobserved
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarPetr Pudlak <>
parent cdb0a458
......@@ -49,6 +49,7 @@ module Ganeti.DataCollectors.Types
, getCategoryName
) where
import Control.DeepSeq (NFData, rnf, force)
import Data.Char
import Data.Ratio
import qualified Data.Map as Map
......@@ -138,6 +139,9 @@ instance JSON DCVersion where
-- | Type for the value field of the `CollectorMap` below.
data CollectorData = CPULoadData (Seq.Seq (Integer, [Int]))
instance NFData CollectorData where
rnf (CPULoadData x) = rnf x
-- | Type for the map storing the data of the statefull DataCollectors.
type CollectorMap = Map.Map String CollectorData
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment