You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a `ThreadLocalStorage` module under `Threadext`. Currently, it
uses `Ambient_local.Thread_local` as the underlying implementation.
Following the thread classification PRs,
#6154, this will enable
accessing the current thread group for each thread. The current data
structure contains the following:
1. ocaml_tid
2. thread_name
3. time_running
4. tepoch
5. tgroup
Field 1: `ocaml_tid` is equivalent to `Thread.self () |> Thread.id.`
Field 2: `thread_name` is to associet threads with human readable
string.
Fields 3-5:
- `time_runinng` - the amount of time the thread has been running in
the current OCaml runtime timeslice,
- `tepoch` - the current timeslice the thread has been scheduled for,
- `tgroup` - current thread classification.
Fields 3-5 are what is expected to be used for thread scheduling when
xapi is under load.
This can be extended in the future to contain information about tracing,
such as `traceparent` and `baggage`.
Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
0 commit comments