File tree Expand file tree Collapse file tree
libdd-trace-utils/src/change_buffer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//! Change buffer.
22//!
33//! A change buffer is a contiguous shared memory area between libdatadog and an external runtime.
4- //! In order to amortize the cost of crossing the FFI when using native spans, the runtime write
5- //! events in the change buffer instead many times and only flush it by batch, where the call to
6- //! libdatadog happens. Libdatadog processes the change buffer and reconstruct the corresponding
7- //! spans.
4+ //! In order to amortize the cost of crossing the FFI when using native spans, the runtime writes
5+ //! events into the change buffer instead of calling libdatadog many times, and only flushes by
6+ //! batch — that flush is where the call to libdatadog happens. Libdatadog then processes the change
7+ //! buffer and reconstructs the corresponding spans.
88//!
99//! The change buffer is currently designed and used for dd-trace-js, but the idea could be extended
1010//! to other runtime where the FFI cost is high.
You can’t perform that action at this time.
0 commit comments