Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data RunResult
- = Success {
- resultTime :: !Double
- name :: !String
- | ErrorStatus { }
- | Error {
- resultTime :: !Double
- exception :: !SomeException
- name :: !String
- | RuntimeError
- | End
- = Success {
- data Event = Event {}
- data Recorder = Recorder {}
- newtype LogicError = LogicError String
- newtype HandledError = HandledError SomeException
- split :: Recorder -> Recorder
- newRecorder :: Bool -> Int -> IO Recorder
- stopRecorder :: Recorder -> IO ()
- addEvent :: Recorder -> RunResult -> IO ()
- readEvent :: Recorder -> IO (Maybe Event)
- record :: forall a. Recorder -> String -> IO a -> IO a
Documentation
Success | |
| |
ErrorStatus | |
Error | |
| |
RuntimeError | |
End |
An opaque type for recording actions for profiling.
To obtain a Recorder
use either run
, defaultMain
, runOne
or
newStandaloneRecorder
.
newtype HandledError Source #
stopRecorder :: Recorder -> IO () Source #
record :: forall a. Recorder -> String -> IO a -> IO a Source #
record
is a low level function for collecting timing information.
Wrap each action of interest in a call to record.
record recorder $ threadDelay 1000000
record
measures the elapsed time of the call, and catches
HttpException
in the case of failure. This means failures
must be thrown if they are to be properly recorded.