language-puppet-1.3.8.1: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone
LanguageHaskell98

Puppet.Stats

Description

A quickly done module that exports utility functions used to collect various statistics. All statistics are stored in a MVar holding a HashMap.

This is not accurate in the presence of lazy evaluation. Nothing is forced.

Synopsis

Documentation

measure #

Arguments

:: MStats

Statistics container

-> Text

Action identifier

-> IO a

Computation

-> IO a 

Wraps a computation, and measures related execution statistics.

newStats :: IO MStats #

Create a new statistical container.

getStats :: MStats -> IO StatsTable #

Returns the actual statistical values.

type StatsTable = HashMap Text StatsPoint #

A table where keys are the names of the computations, and values are StatsPoints.

data StatsPoint #

Constructors

StatsPoint 

Fields

data MStats #