- data Statistics
- type StatisticsState a = forall m. MonadState Statistics m => m a
- type StatisticsStateIO a = forall m. (MonadState Statistics m, MonadIO m) => m a
- emptyStats :: Statistics
- printOutAllMetrics :: StatisticsStateIO ()
- printOutAllMetrics' :: Statistics -> IO ()
- printOutInspectionMetrics :: StatisticsStateIO ()
- showFinalStats :: Statistics -> String
- initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> b
- addMetric :: Metric -> StatisticsState ()
- addInspectionMetric :: Metric -> StatisticsState ()
- setPrintOutInterval :: Int -> StatisticsState ()
- mergeMetrics :: (Metric -> Metric -> Metric) -> Statistics -> Statistics -> Statistics
- data Metric = IntMetric String Int
- queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]
- updateMetrics :: (Metric -> Metric) -> Statistics -> Statistics
- incrIntMetric :: String -> Int -> Metric -> Metric
- queryIntMetric :: String -> Metric -> Maybe Int
- addIntMetrics :: Metric -> Metric -> Metric
Documentation
data Statistics Source
type StatisticsState a = forall m. MonadState Statistics m => m aSource
type StatisticsStateIO a = forall m. (MonadState Statistics m, MonadIO m) => m aSource
initialStatisticsStateFor :: MonadState Statistics m => (m a -> Statistics -> b) -> m a -> bSource
addMetric :: Metric -> StatisticsState ()Source
Adds a metric at the end of the list (thus, metrics are printed out in the order in which they were added
addInspectionMetric :: Metric -> StatisticsState ()Source
Adds a metric that will be printed out at regular intervals
mergeMetrics :: (Metric -> Metric -> Metric) -> Statistics -> Statistics -> StatisticsSource
queryMetrics :: (Metric -> Maybe a) -> Statistics -> [a]Source
updateMetrics :: (Metric -> Metric) -> Statistics -> StatisticsSource
addIntMetrics :: Metric -> Metric -> MetricSource