bonsai
-
bonsai
-
-
bonsai.bench
-
bonsai.example_chat_open_source_native
-
bonsai.example_chat_open_source_native_common
-
-
bonsai.extra
-
-
bonsai.focus_ring
-
bonsai.protocol
-
bonsai.tailwind_colors
-
bonsai.test
-
bonsai.test.dot
-
bonsai.web_test
-
bonsai.web_ui_common_components
-
bonsai.web_ui_drag_and_drop
-
bonsai.web_ui_element_size_hooks
-
bonsai.web_ui_file
-
bonsai.web_ui_file_from_web_file
-
bonsai.web_ui_form
-
-
bonsai.web_ui_freeform_multiselect
-
bonsai.web_ui_multi_select
-
-
bonsai.web_ui_query_box
-
bonsai.web_ui_reorderable_list
-
bonsai.web_ui_typeahead
Library
Module
Module type
Parameter
Class
Class type
val instrument_computation :
( 'model, 'dynamic_action, 'static_action, 'result ) Computation.t ->
start_timer:( string -> unit ) ->
stop_timer:( string -> unit ) ->
( 'model, 'dynamic_action, 'static_action, 'result ) Computation.t
Wraps each node in a Computation.t
with calls to start_timer
and stop_timer
. The string passed to both these is intended to be the names for performance entries sent to the browser. The strings contain the Node_path
to which the time corresponds. When these strings eventually get retrieved via a PerformanceObserver, the id in the string can be retrieved via Node_path.extract_from_entry_label
. (We do things this way because we want also want to include the node_type in this string as well, so that looking at measurements in Chrome's profiling tools is easier).
on_graph_update
is called whenever the graph info gets updated. For example (in fact, the only example), when a Lazy
gets forced, we must expand the graph to include what was inside the Lazy.
val instrument_packed :
'a Computation.packed ->
start_timer:( string -> unit ) ->
stop_timer:( string -> unit ) ->
'a Computation.packed
Same as instrument_computation
but operating on packed computations instead.