This commit is contained in:
Simon Cruanes 2023-12-21 08:28:07 -05:00
parent b830c3d1be
commit 031b7bfc38
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 5 additions and 2 deletions

View file

@ -35,7 +35,7 @@ let pp out self =
let make ?(debug = !debug_) ?(url = get_url ()) ?(headers = get_headers ())
?(batch_timeout_ms = 2_000) ?(bg_threads = 4) ?(ticker_thread = true)
?(ticker_interval_ms = 500) ?(self_trace = false) () : t =
let bg_threads = max 2 (min bg_threads 32) in
let bg_threads = max 1 (min bg_threads 32) in
{
debug;
url;

View file

@ -15,13 +15,16 @@ type t = private {
only checked when a new event occurs or when a tick
is emitted. Default 2_000. *)
bg_threads: int;
(** Are there background threads, and how many? Default [4] *)
(** Are there background threads, and how many? Default [4].
This will be adjusted to be at least [1] and at most [32]. *)
ticker_thread: bool;
(** If true, start a thread that regularly checks if signals should
be sent to the collector. Default [true] *)
ticker_interval_ms: int;
(** Interval for ticker thread, in milliseconds. This is
only useful if [ticker_thread] is [true].
This will be clamped between [2 ms] and some longer
interval (maximum [60s] currently).
Default 500.
@since NEXT_RELEASE *)
self_trace: bool;