package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
bonsai-v0.15.0.tar.gz
sha256=24c4c3149280abd639034ce3acf60e475a772202099e965be8bd8902524573ef
doc/bonsai.bench/Bonsai_bench/Test/index.html
Module Bonsai_bench.Test
t
is equivalent to Core_bench_js.Test.t
. We don't expose the equality because these benchmarks should only be run using Bonsai_bench.bench
so that we can do necessary clean-up between benchmark runs.
val create :
?clock:Bonsai_test.Incr.Clock.t ->
name:string ->
component:'r Bonsai.Computation.t ->
get_inject:('r -> 'a -> unit Bonsai_test.Effect.t) ->
'a Interaction.t ->
t
create
produces a benchmark which performs interactions
on component
. The computation is shared between runs within the benchmark runner. Since they are run a non-deterministic amount of times, benchmarks created this way should either have an interaction which is idempotent on the state, or have similar performance when the interaction is repeated many times.
val create_with_resetter :
?clock:Bonsai_test.Incr.Clock.t ->
name:string ->
component:'r Bonsai.Computation.t ->
get_inject:('r -> 'a -> unit Bonsai_test.Effect.t) ->
'a Interaction.t ->
t
create_with_resetter
is equivalent to calling create
, with interactions equal to Interaction.many interactions; Interaction.reset_model; Interaction.stabilize
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>