From e90b3ec76bc262f261db0ce083b0f12e3523942f Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 30 Apr 2021 18:17:31 -0400 Subject: [PATCH] perf(tef): inlining attrs --- src/util/Profile.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/Profile.ml b/src/util/Profile.ml index b0c25a3a..29b6c619 100644 --- a/src/util/Profile.ml +++ b/src/util/Profile.ml @@ -34,7 +34,7 @@ let out_ : backend option ref = ref None let[@inline] enabled () = match !out_ with Some _ -> true | None -> false -let begin_with_ (module B:BACKEND) name : probe = +let[@inline never] begin_with_ (module B:BACKEND) name : probe = Probe {name; start=B.get_ts ()} let[@inline] begin_ name : probe = @@ -50,11 +50,11 @@ let[@inline] instant name = B.emit_instant_event ~name ~ts:now () (* slow path *) -let exit_full_ (module B : BACKEND) name start = +let[@inline never] exit_full_ (module B : BACKEND) name start = let now = B.get_ts() in B.emit_duration_event ~name ~start ~end_:now () -let exit_with_ b pb = +let[@inline] exit_with_ b pb = match pb with | No_probe -> () | Probe {name; start} -> exit_full_ b name start