criterion-measurement 0.2.3.0 → 0.2.4.0
raw patch · 4 files changed
+25/−4 lines, 4 filesdep ~aesonPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson
API changes (from Hackage documentation)
- Criterion.Measurement.Types: [Environment] :: NFData env => IO env -> (env -> IO a) -> (env -> Benchmark) -> Benchmark
+ Criterion.Measurement.Types: [Environment] :: forall env a. NFData env => IO env -> (env -> IO a) -> (env -> Benchmark) -> Benchmark
- Criterion.Measurement.Types.Internal: data () => SPEC
+ Criterion.Measurement.Types.Internal: data SPEC
Files
- cbits/cycles.c +12/−0
- cbits/time-posix.c +4/−0
- changelog.md +4/−0
- criterion-measurement.cabal +5/−4
cbits/cycles.c view
@@ -68,6 +68,18 @@ return result; } +#elif wasm32_HOST_ARCH++#include <time.h>++StgWord64 criterion_rdtsc(void)+{+ struct timespec ts;+ StgWord64 result_stg = 0;+ clock_gettime(CLOCK_REALTIME, &ts);+ result_stg = ts.tv_sec * 1000000000LL + ts.tv_nsec;+ return result_stg;+} #else #error Unsupported OS/architecture/compiler!
cbits/time-posix.c view
@@ -18,7 +18,11 @@ { struct timespec ts; +#ifndef __wasi__ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);+#else+ clock_gettime(CLOCK_REALTIME, &ts);+#endif return ts.tv_sec + ts.tv_nsec * 1e-9; }
changelog.md view
@@ -1,3 +1,7 @@+0.2.4.0++* Support building with `wasm32-wasi`.+ 0.2.3.0 * Drop support for pre-8.0 versions of GHC.
criterion-measurement.cabal view
@@ -1,5 +1,5 @@ name: criterion-measurement-version: 0.2.3.0+version: 0.2.4.0 synopsis: Criterion measurement functionality and associated types description: Measurement-related functionality extracted from Criterion, with minimal dependencies. The rationale for this is to enable alternative analysis front-ends. homepage: https://github.com/haskell/criterion@@ -22,9 +22,10 @@ GHC==9.0.2, GHC==9.2.8, GHC==9.4.8,- GHC==9.6.6,- GHC==9.8.2,- GHC==9.10.1+ GHC==9.6.7,+ GHC==9.8.4,+ GHC==9.10.3,+ GHC==9.12.2 flag fast description: compile without optimizations