diff --git a/.ocamlformat b/.ocamlformat index 7818345..f33f722 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,4 +1,4 @@ -version = 0.26.2 +version = 0.27.0 profile=conventional margin=80 if-then-else=k-r diff --git a/src/fuchsia/write/trace_fuchsia_write.ml b/src/fuchsia/write/trace_fuchsia_write.ml index 1968c9b..7cf9bf7 100644 --- a/src/fuchsia/write/trace_fuchsia_write.ml +++ b/src/fuchsia/write/trace_fuchsia_write.ml @@ -1,6 +1,6 @@ (** Write fuchsia events into buffers. -Reference: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format *) + Reference: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format *) module Util = Util module Buf = Buf @@ -37,7 +37,8 @@ end open struct (** maximum length as specified in the - {{: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format} spec} *) + {{:https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format} spec} + *) let max_str_len = 32000 (** Length of string, in words *) @@ -68,8 +69,8 @@ module Str_ref = struct (1 lsl 15) lor size end -(** [truncate_string s] truncates [s] to the maximum length allowed for - strings. If [s] is already short enough, no allocation is done. *) +(** [truncate_string s] truncates [s] to the maximum length allowed for strings. + If [s] is already short enough, no allocation is done. *) let[@inline] truncate_string s : string = if String.length s <= max_str_len then s diff --git a/src/tef/trace_tef.ml b/src/tef/trace_tef.ml index 41938a8..a24f5a1 100644 --- a/src/tef/trace_tef.ml +++ b/src/tef/trace_tef.ml @@ -48,8 +48,8 @@ module Writer = struct must_close: bool; (** Do we have to close the underlying channel [oc]? *) pid: int; } - (** A writer to a [out_channel]. It writes JSON entries in an array - and closes the array at the end. *) + (** A writer to a [out_channel]. It writes JSON entries in an array and closes + the array at the end. *) let create ~(mode : [ `Single | `Jsonl ]) ~out () : t = let jsonl = mode = `Jsonl in @@ -237,9 +237,8 @@ let print_non_closed_spans_warning spans = !names; flush stderr -(** Background thread, takes events from the queue, puts them - in context using local state, and writes fully resolved - TEF events to [out]. *) +(** Background thread, takes events from the queue, puts them in context using + local state, and writes fully resolved TEF events to [out]. *) let bg_thread ~mode ~out (events : Event.t B_queue.t) : unit = block_signals (); @@ -308,8 +307,8 @@ let bg_thread ~mode ~out (events : Event.t B_queue.t) : unit = if Span_tbl.length spans > 0 then print_non_closed_spans_warning spans; () -(** Thread that simply regularly "ticks", sending events to - the background thread so it has a chance to write to the file *) +(** Thread that simply regularly "ticks", sending events to the background + thread so it has a chance to write to the file *) let tick_thread events : unit = block_signals (); try