| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Wrecker.Recorder
- data RunResult
- = Success {
- resultTime :: !Double
- name :: !String
- | ErrorStatus { }
- | Error {
- resultTime :: !Double
- exception :: !SomeException
- name :: !String
- | End
- = Success {
- data Event = Event {}
- data Recorder = Recorder {}
- split :: Recorder -> Recorder
- newRecorder :: 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
Constructors
| Success | |
Fields
| |
| ErrorStatus | |
| Error | |
Fields
| |
| End | |
An opaque type for recording actions for profiling.
To obtain a Recorder use either run, defaultMain, runOne or
newStandaloneRecorder.
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.