wrecker-1.2.0.0: An HTTP Performance Benchmarker

Safe HaskellNone
LanguageHaskell2010

Wrecker.Runner

Synopsis

Documentation

data Environment Source #

The Environment holds state necessary to make and record HTTP calls.

Constructors

Environment 

Fields

newStandaloneRecorder :: IO (NextRef AllStats, Thread, Recorder) Source #

Typically wrecker will control benchmarking actions. However in some situations a benchmark might require more control.

To facilitate more complex scenarios wrecker provide newStandaloneRecorder which provides a Recorder and Thread that processes the events, and a reference to the current stats.

runAction :: Logger -> Int -> Int -> RunType -> (Environment -> IO ()) -> Environment -> IO () Source #

runWithNextVar Source #

Arguments

:: Options

The run options as passed from the CLI

-> (NextRef AllStats -> IO ())

The statistics consumer action. Use this for example to present a summary of the stast

-> (NextRef AllStats -> IO ())

The final consumer action. Maybe to present a final chart of the stats.

-> (Environment -> IO ())

The load test action

-> IO AllStats 

run :: Options -> [(String, Environment -> IO ())] -> IO (HashMap String AllStats) Source #

run is the a lower level entry point, compared to defaultMain. Unlike defaultMain no command line argument parsing is performed. Instead, Options are directly passed in. defaultOptions can be used as a default argument for run.

Like defaultMain, run creates a Recorder and passes it each benchmark.

runOne :: Options -> (Environment -> IO ()) -> IO AllStats Source #

Run a single benchmark