Agda-2.6.1.3: A dependently typed functional programming language and proof assistant
Safe HaskellNone
LanguageHaskell2010

Agda.TypeChecking.Monad.Benchmark

Description

Measure CPU time for individual phases of the Agda pipeline.

Synopsis

Documentation

class (Ord a, Functor m, MonadIO m) => MonadBench a m | m -> a Source #

Monad with access to benchmarking data.

Minimal complete definition

getBenchmark, finally

Instances

Instances details
MonadBench Phase IO Source # 
Instance details

Defined in Agda.Benchmarking

MonadBench Phase TCM Source #

We store benchmark statistics in an IORef. This enables benchmarking pure computation, see Agda.Benchmarking.

Instance details

Defined in Agda.TypeChecking.Monad.Base

MonadBench Phase TerM Source # 
Instance details

Defined in Agda.Termination.Monad

MonadBench a m => MonadBench a (StateT r m) Source # 
Instance details

Defined in Agda.Utils.Benchmark

Methods

getBenchmark :: StateT r m (Benchmark a) Source #

getsBenchmark :: (Benchmark a -> c) -> StateT r m c Source #

putBenchmark :: Benchmark a -> StateT r m () Source #

modifyBenchmark :: (Benchmark a -> Benchmark a) -> StateT r m () Source #

finally :: StateT r m b -> StateT r m c -> StateT r m b Source #

MonadBench a m => MonadBench a (ReaderT r m) Source # 
Instance details

Defined in Agda.Utils.Benchmark

updateBenchmarkingStatus :: TCM () Source #

When verbosity is set or changes, we need to turn benchmarking on or off.

billTo :: MonadBench a m => Account a -> m c -> m c Source #

Bill a computation to a specific account. Works even if the computation is aborted by an exception.

billPureTo :: MonadBench a m => Account a -> c -> m c Source #

Bill a pure computation to a specific account.

billToCPS :: MonadBench a m => Account a -> ((b -> m c) -> m c) -> (b -> m c) -> m c Source #

Bill a CPS function to an account. Can't handle exceptions.

reset :: MonadBench a m => m () Source #

Resets the account and the timing information.

print :: MonadTCM tcm => tcm () Source #

Prints the accumulated benchmark results. Does nothing if profiling is not activated at level 2.