Safe Haskell | None |
---|---|
Language | Haskell2010 |
Measure CPU time for individual phases of the Agda pipeline.
Synopsis
- module Agda.Benchmarking
- class (Ord a, Functor m, MonadIO m) => MonadBench a m | m -> a
- getBenchmark :: MonadBench a m => m (Benchmark a)
- updateBenchmarkingStatus :: TCM ()
- billTo :: MonadBench a m => Account a -> m c -> m c
- billPureTo :: MonadBench a m => Account a -> c -> m c
- billToCPS :: MonadBench a m => Account a -> ((b -> m c) -> m c) -> (b -> m c) -> m c
- reset :: MonadBench a m => m ()
- print :: MonadTCM tcm => tcm ()
Documentation
module Agda.Benchmarking
class (Ord a, Functor m, MonadIO m) => MonadBench a m | m -> a Source #
Monad with access to benchmarking data.
Instances
MonadBench Phase IO Source # | |
MonadBench Phase TCM Source # | We store benchmark statistics in an IORef. This enables benchmarking pure computation, see Agda.Benchmarking. |
Defined in Agda.TypeChecking.Monad.Base | |
MonadBench Phase TerM Source # | |
Defined in Agda.Termination.Monad | |
MonadBench a m => MonadBench a (StateT r m) Source # | |
Defined in Agda.Utils.Benchmark | |
MonadBench a m => MonadBench a (ReaderT r m) Source # | |
Defined in Agda.Utils.Benchmark getBenchmark :: ReaderT r m (Benchmark a) Source # getsBenchmark :: (Benchmark a -> c) -> ReaderT r m c Source # putBenchmark :: Benchmark a -> ReaderT r m () Source # modifyBenchmark :: (Benchmark a -> Benchmark a) -> ReaderT r m () Source # finally :: ReaderT r m b -> ReaderT r m c -> ReaderT r m b Source # |
getBenchmark :: MonadBench a m => m (Benchmark a) Source #
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.