cryptol-3.1.0: Cryptol: The Language of Cryptography
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cryptol.Utils.Benchmark

Description

Simple benchmarking of IO functions.

Synopsis

Documentation

data BenchmarkStats Source #

Statistics returned by benchmark.

This is extremely crude compared to the full analysis that criterion can do, but is enough for now.

Instances

Instances details
Show BenchmarkStats Source # 
Instance details

Defined in Cryptol.Utils.Benchmark

benchmark :: Double -> (a -> IO b) -> a -> IO BenchmarkStats Source #

Benchmark the application of the given function to the given input and the execution of the resulting IO action to WHNF, spending at least the given amount of time in seconds to collect measurements.

secs :: Double -> String #

Convert a number of seconds to a string. The string will consist of four decimal places, followed by a short description of the time units.