package landmarks
A simple profiling library
Install
Dune Dependency
Authors
Maintainers
Sources
v1.4.tar.gz
md5=2ed3e4fd7ee14c195035dedfb730829f
sha512=5d3ea9ed9519745f153d6cc7700b4e97747bbd285961f4fa964d62e3fc36e9bc63c7f5789df252e9faa05d4bf8ddcec4bdc9898b2381b607d716e1354d156c42
doc/src/landmarks.threads/landmark_threads.ml.html
Source file landmark_threads.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
include Landmark let current_id = ref Thread.(id (self ())) let check () = !current_id = Thread.(id (self ())) let error operation = failwith (Printf.sprintf "%s: this operation can only be called by the thread that started the profiling" operation) let increment ?times counter = if check () then increment ?times counter let sample sampler value = if check () then sample sampler value let enter lm = if check () then enter lm let exit lm = if check () then exit lm let wrap lm f x = if check () then wrap lm f x else f x let unsafe_wrap lm f x = if check () then wrap lm f x else f x let export ?label () = if check () then export ?label () else error "export" let reset () = if check () then reset () else error "reset" let export_and_reset ?label () = if check () then export_and_reset ?label () else error "export_and_reset" let start_profiling ?profiling_options () = current_id := Thread.(id (self ())); start_profiling ?profiling_options () let stop_profiling () = stop_profiling ()
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>