Rerun C++ SDK
Loading...
Searching...
No Matches
recording_stream.hpp
1#pragma once
2
3#include <chrono>
4#include <cstdint> // uint32_t etc.
5#include <filesystem>
6#include <limits>
7#include <optional>
8#include <string_view>
9#include <type_traits>
10#include <vector>
11
12#include "as_components.hpp"
13#include "component_column.hpp"
14#include "error.hpp"
15#include "log_sink.hpp"
16#include "spawn_options.hpp"
17#include "time_column.hpp"
18
19namespace rerun {
20 struct ComponentBatch;
21
22 enum class StoreKind {
23 Recording,
24 Blueprint,
25 };
26
27 /// What happens when a client connects to a gRPC server?
28 enum class PlaybackBehavior {
29 /// Start playing back all the old data first,
30 /// and only after start sending anything that happened since.
32
33 /// Prioritize the newest arriving messages,
34 /// replaying the history later, starting with the newest.
36 };
37
38 /// A `RecordingStream` handles everything related to logging data into Rerun.
39 ///
40 /// ## Multithreading and ordering
41 ///
42 /// A `RecordingStream` is thread-safe.
43 ///
44 /// Internally, all operations are linearized into a pipeline:
45 /// - All operations sent by a given thread will take effect in the same exact order as that
46 /// thread originally sent them in, from its point of view.
47 /// - There isn't any well defined global order across multiple threads.
48 ///
49 /// This means that e.g. flushing the pipeline (`flush_blocking`) guarantees that all
50 /// previous data sent by the calling thread has been recorded; no more, no less.
51 /// (e.g. it does not mean that all file caches are flushed)
52 ///
53 /// ## Shutdown
54 ///
55 /// The `RecordingStream` can only be shutdown by dropping all instances of it, at which point
56 /// it will automatically take care of flushing any pending data that might remain in the
57 /// pipeline.
58 ///
59 /// TODO(andreas): The only way of having two instances of a `RecordingStream` is currently to
60 /// set it as a the global.
61 ///
62 /// Shutting down cannot ever block.
63 ///
64 /// ## Logging
65 ///
66 /// Internally, the stream will automatically micro-batch multiple log calls to optimize
67 /// transport.
68 /// See [SDK Micro Batching](https://www.rerun.io/docs/reference/sdk/micro-batching) for
69 /// more information.
70 ///
71 /// The data will be timestamped automatically based on the `RecordingStream`'s
72 /// internal clock.
74 private:
75 // TODO(grtlr): Ideally we'd expose more of the `EntityPath` struct to the C++ world so
76 // that we don't have to hardcode this here.
77 static constexpr const char PROPERTIES_ENTITY_PATH[] = "__properties/";
78
79 public:
80 /// Creates a new recording stream to log to.
81 ///
82 /// \param app_id The user-chosen name of the application doing the logging.
83 /// \param recording_id The user-chosen name of the recording being logged to.
84 /// \param store_kind Whether to log to the recording store or the blueprint store.
86 std::string_view app_id, std::string_view recording_id = std::string_view(),
87 StoreKind store_kind = StoreKind::Recording
88 );
90
91 /// \private
93
94 // TODO(andreas): We could easily make the recording stream trivial to copy by bumping Rusts
95 // ref counter by adding a copy of the recording stream to the list of C recording streams.
96 // Doing it this way would likely yield the most consistent behavior when interacting with
97 // global streams (and especially when interacting with different languages in the same
98 // application).
99 /// \private
100 RecordingStream(const RecordingStream&) = delete;
101 /// \private
102 RecordingStream() = delete;
103
104 // -----------------------------------------------------------------------------------------
105 /// \name Properties
106 /// @{
107
108 /// Returns the store kind as passed during construction
109 StoreKind kind() const {
110 return _store_kind;
111 }
112
113 /// Returns whether the recording stream is enabled.
114 ///
115 /// All log functions early out if a recording stream is disabled.
116 /// Naturally, logging functions that take unserialized data will skip the serialization step as well.
117 bool is_enabled() const {
118 return _enabled;
119 }
120
121 /// @}
122
123 // -----------------------------------------------------------------------------------------
124 /// \name Controlling globally available instances of RecordingStream.
125 /// @{
126
127 /// Replaces the currently active recording for this stream's store kind in the global scope
128 /// with this one.
129 ///
130 /// Afterwards, destroying this recording stream will *not* change the global recording
131 /// stream, as it increases an internal ref-count.
132 void set_global() const;
133
134 /// Replaces the currently active recording for this stream's store kind in the thread-local
135 /// scope with this one
136 ///
137 /// Afterwards, destroying this recording stream will *not* change the thread local
138 /// recording stream, as it increases an internal ref-count.
139 void set_thread_local() const;
140
141 /// Retrieves the most appropriate globally available recording stream for the given kind.
142 ///
143 /// I.e. thread-local first, then global.
144 /// If neither was set, any operations on the returned stream will be no-ops.
145 static RecordingStream& current(StoreKind store_kind = StoreKind::Recording);
146
147 /// @}
148
149 // -----------------------------------------------------------------------------------------
150 /// \name Directing the recording stream.
151 /// \details Either of these needs to be called, otherwise the stream will buffer up indefinitely.
152 /// @{
153
154 /// Stream data to multiple sinks.
155 ///
156 /// See specific sink types for more information:
157 /// * `FileSink`
158 /// * `GrpcSink`
159 template <typename... Ts>
160 Error set_sinks(const Ts&... sinks) const {
161 LogSink out_sinks[] = {sinks...};
162 uint32_t num_sinks = sizeof...(Ts);
163 return try_set_sinks(out_sinks, num_sinks);
164 }
165
166 /// Connect to a remote Rerun Viewer on the given URL.
167 ///
168 /// Requires that you first start a Rerun Viewer by typing 'rerun' in a terminal.
169 ///
170 /// \param url The scheme must be one of `rerun://`, `rerun+http://`, or `rerun+https://`,
171 /// and the pathname must be `/proxy`. The default is `rerun+http://127.0.0.1:9876/proxy`.
172 ///
173 /// This function returns immediately.
174 Error connect_grpc(std::string_view url = "rerun+http://127.0.0.1:9876/proxy") const;
175
176 /// Swaps the underlying sink for a gRPC server sink pre-configured to listen on `rerun+http://{bind_ip}:{port}/proxy`.
177 ///
178 /// The gRPC server will buffer all log data in memory so that late connecting viewers will get all the data.
179 /// You can limit the amount of data buffered by the gRPC server with the `server_memory_limit` argument.
180 /// Once reached, the earliest logged data will be dropped. Static data is never dropped.
181 ///
182 /// If server & client are running on the same machine and all clients are expected to connect before
183 /// any data is sent, it is highly recommended that you set the memory limit to `0B`,
184 /// otherwise you're potentially doubling your memory usage!
185 ///
186 /// Returns the URI of the gRPC server so you can connect to it from a viewer.
187 ///
188 /// This function returns immediately.
190 std::string_view bind_ip = "0.0.0.0", uint16_t port = 9876,
191 std::string_view server_memory_limit = "25%",
193 ) const;
194
195 /// Spawns a new Rerun Viewer process from an executable available in PATH, then connects to it
196 /// over gRPC.
197 ///
198 /// If a Rerun Viewer is already listening on this port, the stream will be redirected to
199 /// that viewer instead of starting a new one.
200 ///
201 /// \param options See `rerun::SpawnOptions` for more information.
202 Error spawn(const SpawnOptions& options = {}) const;
203
204 /// @see RecordingStream::spawn
205 template <typename TRep, typename TPeriod>
207 const SpawnOptions& options = {},
208 std::chrono::duration<TRep, TPeriod> flush_timeout = std::chrono::seconds(2)
209 ) const {
210 using seconds_float = std::chrono::duration<float>; // Default ratio is 1:1 == seconds.
211 return spawn(options, std::chrono::duration_cast<seconds_float>(flush_timeout).count());
212 }
213
214 /// Stream all log-data to a given `.rrd` file.
215 ///
216 /// The Rerun Viewer is able to read continuously from the resulting rrd file while it is being written.
217 /// However, depending on your OS and configuration, changes may not be immediately visible due to file caching.
218 /// This is a common issue on Windows and (to a lesser extent) on MacOS.
219 ///
220 /// This function returns immediately.
221 Error save(std::string_view path) const;
222
223 /// Stream all log-data to standard output.
224 ///
225 /// Pipe the result into the Rerun Viewer to visualize it.
226 ///
227 /// If there isn't any listener at the other end of the pipe, the `RecordingStream` will
228 /// default back to `buffered` mode, in order not to break the user's terminal.
229 ///
230 /// This function returns immediately.
231 //
232 // NOTE: This should be called `stdout` like in other SDK, but turns out that `stdout` is a
233 // macro when compiling with msvc [1].
234 // [1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/stdin-stdout-stderr?view=msvc-170
236
237 /// Initiates a flush the batching pipeline and waits for it to propagate.
238 ///
239 /// \param timeout_sec The minimum time the SDK will wait during a flush before potentially
240 /// dropping data if progress is not being made. If you pass in FLT_MAX or infinity,
241 /// the function will block until it either succeeds or fails.
242 ///
243 /// Returns an error if we fail to flush all previously sent log messages.
244 ///
245 /// See `RecordingStream` docs for ordering semantics and multithreading guarantees.
246 Error flush_blocking(float timeout_sec = std::numeric_limits<float>::infinity()) const;
247
248 /// @}
249
250 // -----------------------------------------------------------------------------------------
251 /// \name Controlling log time (index).
252 /// \details
253 /// @{
254
255 /// Set the index value of the given timeline as a sequence number, for the current calling thread.
256 ///
257 /// Used for all subsequent logging performed from this same thread, until the next call
258 /// to one of the time setting methods.
259 ///
260 /// For example: `rec.set_time_sequence("frame_nr", frame_nr)`.
261 ///
262 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
263 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
264 void set_time_sequence(std::string_view timeline_name, int64_t sequence_nr) const;
265
266 /// Set the index value of the given timeline as a duration, for the current calling thread.
267 ///
268 /// Used for all subsequent logging performed from this same thread, until the next call
269 /// to one of the time setting methods.
270 ///
271 /// For example: `rec.set_time_duration("runtime", time_since_start)`.
272 ///
273 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
274 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
275 template <typename TRep, typename TPeriod>
277 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> duration
278 ) const {
279 auto nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
280 set_time_duration_nanos(timeline_name, nanos);
281 }
282
283 /// Set the index value of the given timeline as a duration in seconds, for the current calling thread.
284 ///
285 /// Used for all subsequent logging performed from this same thread, until the next call
286 /// to one of the time setting methods.
287 ///
288 /// For example: `rec.set_time_duration_secs("runtime", seconds_since_start)`.
289 ///
290 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
291 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
292 void set_time_duration_secs(std::string_view timeline_name, double secs) const {
293 set_time_duration_nanos(timeline_name, static_cast<int64_t>(1e9 * secs + 0.5));
294 }
295
296 /// Set the index value of the given timeline as a duration in nanoseconds, for the current calling thread.
297 ///
298 /// Used for all subsequent logging performed from this same thread, until the next call
299 /// to one of the time setting methods.
300 ///
301 /// For example: `rec.set_time_duration_nanos("runtime", nanos_since_start)`.
302 ///
303 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
304 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
305 void set_time_duration_nanos(std::string_view timeline_name, int64_t nanos) const;
306
307 /// Set the index value of the given timeline as a timestamp, for the current calling thread.
308 ///
309 /// Used for all subsequent logging performed from this same thread, until the next call
310 /// to one of the time setting methods.
311 ///
312 /// For example: `rec.set_time_timestamp("capture_time", now())`.
313 ///
314 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
315 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
316 template <typename TClock>
318 std::string_view timeline_name, std::chrono::time_point<TClock> timestamp
319 ) const {
321 timeline_name,
322 std::chrono::duration_cast<std::chrono::nanoseconds>(timestamp.time_since_epoch())
323 .count()
324 );
325 }
326
327 /// Set the index value of the given timeline as seconds since Unix Epoch (1970), for the current calling thread.
328 ///
329 /// Used for all subsequent logging performed from this same thread, until the next call
330 /// to one of the time setting methods.
331 ///
332 /// For example: `rec.set_time_timestamp_secs_since_epoch("capture_time", secs_since_epoch())`.
333 ///
334 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
335 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
336 void set_time_timestamp_secs_since_epoch(std::string_view timeline_name, double seconds)
337 const {
339 timeline_name,
340 static_cast<int64_t>(1e9 * seconds)
341 );
342 }
343
344 /// Set the index value of the given timeline as nanoseconds since Unix Epoch (1970), for the current calling thread.
345 ///
346 /// Used for all subsequent logging performed from this same thread, until the next call
347 /// to one of the time setting methods.
348 ///
349 /// For example: `rec.set_time_timestamp_nanos_since_epoch("capture_time", nanos_since_epoch())`.
350 ///
351 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
352 /// @see set_time_sequence, set_time_duration, set_time_duration_secs, set_time_duration_nanos, set_time_timestamp, set_time_timestamp_secs_since_epoch, set_time_timestamp_nanos_since_epoch
353 void set_time_timestamp_nanos_since_epoch(std::string_view timeline_name, int64_t nanos)
354 const;
355
356 /// Set the current time of the recording, for the current calling thread.
357 ///
358 /// Used for all subsequent logging performed from this same thread, until the next call
359 /// to one of the time setting methods.
360 ///
361 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
362 ///
363 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
364 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
365 template <typename TClock>
366 [[deprecated("Renamed to `set_time_timestamp`")]] void set_time(
367 std::string_view timeline_name, std::chrono::time_point<TClock> time
368 ) const {
369 set_time(timeline_name, time.time_since_epoch());
370 }
371
372 /// Set the current time of the recording, for the current calling thread.
373 ///
374 /// Used for all subsequent logging performed from this same thread, until the next call
375 /// to one of the time setting methods.
376 ///
377 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
378 ///
379 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
380 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
381 template <typename TRep, typename TPeriod>
382 [[deprecated("Renamed `set_time_duration`")]] void set_time(
383 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> time
384 ) const {
385 set_time_duration(timeline_name, time);
386 }
387
388 /// Set the current time of the recording, for the current calling thread.
389 ///
390 /// Used for all subsequent logging performed from this same thread, until the next call
391 /// to one of the time setting methods.
392 ///
393 /// For example: `rec.set_time_seconds("sim_time", sim_time_secs)`.
394 ///
395 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
396 /// @see set_time_sequence, set_time_nanos, reset_time, set_time, disable_timeline
397 [[deprecated("Use either `set_time_duration_secs` or `set_time_timestamp_secs_since_epoch`"
398 )]] void
399 set_time_seconds(std::string_view timeline_name, double seconds) const {
400 set_time_duration_secs(timeline_name, seconds);
401 }
402
403 /// Set the current time of the recording, for the current calling thread.
404 ///
405 /// Used for all subsequent logging performed from this same thread, until the next call
406 /// to one of the time setting methods.
407 ///
408 /// For example: `rec.set_time_nanos("sim_time", sim_time_nanos)`.
409 ///
410 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
411 /// @see set_time_sequence, set_time_seconds, reset_time, set_time, disable_timeline
412 [[deprecated(
413 "Use either `set_time_duration_nanos` or `set_time_timestamp_nanos_since_epoch`"
414 )]] void
415 set_time_nanos(std::string_view timeline_name, int64_t nanos) const {
416 set_time_duration_nanos(timeline_name, nanos);
417 }
418
419 /// Stops logging to the specified timeline for subsequent log calls.
420 ///
421 /// The timeline is still there, but will not be updated with any new data.
422 ///
423 /// No-op if the timeline doesn't exist.
424 ///
425 /// @see set_time_sequence, set_time_seconds, set_time, reset_time
426 void disable_timeline(std::string_view timeline_name) const;
427
428 /// Clears out the current time of the recording, for the current calling thread.
429 ///
430 /// Used for all subsequent logging performed from this same thread, until the next call
431 /// to one of the time setting methods.
432 ///
433 /// For example: `rec.reset_time()`.
434 /// @see set_time_sequence, set_time_seconds, set_time_nanos, disable_timeline
435 void reset_time() const;
436
437 /// @}
438
439 // -----------------------------------------------------------------------------------------
440 /// \name Sending & logging data.
441 /// @{
442
443 /// Logs one or more archetype and/or component batches.
444 ///
445 /// This is the main entry point for logging data to rerun. It can be used to log anything
446 /// that implements the `AsComponents<T>` trait.
447 ///
448 /// When logging data, you must always provide an [entity_path](https://www.rerun.io/docs/concepts/entity-path)
449 /// for identifying the data. Note that paths prefixed with "__" are considered reserved for use by the Rerun SDK
450 /// itself and should not be used for logging user data. This is where Rerun will log additional information
451 /// such as properties and warnings.
452 ///
453 /// The most common way to log is with one of the rerun archetypes, all of which implement the `AsComponents` trait.
454 ///
455 /// For example, to log two 3D points:
456 /// ```
457 /// rec.log("my/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}}));
458 /// ```
459 ///
460 /// The `log` function can flexibly accept an arbitrary number of additional objects which will
461 /// be merged into the first entity, for instance:
462 /// ```
463 /// // Log three points with arrows sticking out of them:
464 /// rec.log(
465 /// "my/points",
466 /// rerun::Points3D({{0.2f, 0.5f, 0.3f}, {0.9f, 1.2f, 0.1f}, {1.0f, 4.2f, 0.3f}})
467 /// .with_radii({0.1, 0.2, 0.3}),
468 /// rerun::Arrows3D::from_vectors({{0.3f, 2.1f, 0.2f}, {0.9f, -1.1, 2.3f}, {-0.4f, 0.5f, 2.9f}})
469 /// );
470 /// ```
471 ///
472 /// Any failures that may are handled with `Error::handle`.
473 ///
474 /// \param entity_path Path to the entity in the space hierarchy.
475 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
476 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
477 /// You can implement `AsComponents` for your own types as well
478 ///
479 /// @see try_log, log_static, try_log_with_static
480 template <typename... Ts>
481 void log(std::string_view entity_path, const Ts&... as_components) const {
482 if (!is_enabled()) {
483 return;
484 }
485 try_log_with_static(entity_path, false, as_components...).handle();
486 }
487
488 /// Logs one or more archetype and/or component batches as static data.
489 ///
490 /// Like `log` but logs the data as static:
491 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
492 /// any temporal data of the same type.
493 ///
494 /// Failures are handled with `Error::handle`.
495 ///
496 /// \param entity_path Path to the entity in the space hierarchy.
497 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
498 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
499 /// You can implement `AsComponents` for your own types as well
500 ///
501 /// @see log, try_log_static, try_log_with_static
502 template <typename... Ts>
503 void log_static(std::string_view entity_path, const Ts&... as_components) const {
504 if (!is_enabled()) {
505 return;
506 }
507 try_log_with_static(entity_path, true, as_components...).handle();
508 }
509
510 /// Logs one or more archetype and/or component batches.
511 ///
512 /// See `log` for more information.
513 /// Unlike `log` this method returns an error if an error occurs.
514 ///
515 /// \param entity_path Path to the entity in the space hierarchy.
516 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
517 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
518 /// You can implement `AsComponents` for your own types as well
519 ///
520 /// @see log, try_log_static, try_log_with_static
521 template <typename... Ts>
522 Error try_log(std::string_view entity_path, const Ts&... as_components) const {
523 if (!is_enabled()) {
524 return Error::ok();
525 }
526 return try_log_with_static(entity_path, false, as_components...);
527 }
528
529 /// Logs one or more archetype and/or component batches as static data, returning an error.
530 ///
531 /// See `log`/`log_static` for more information.
532 /// Unlike `log_static` this method returns if an error occurs.
533 ///
534 /// \param entity_path Path to the entity in the space hierarchy.
535 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
536 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
537 /// You can implement `AsComponents` for your own types as well
538 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
539 ///
540 /// @see log_static, try_log, try_log_with_static
541 template <typename... Ts>
542 Error try_log_static(std::string_view entity_path, const Ts&... as_components) const {
543 if (!is_enabled()) {
544 return Error::ok();
545 }
546 return try_log_with_static(entity_path, true, as_components...);
547 }
548
549 /// Logs one or more archetype and/or component batches optionally static, returning an error.
550 ///
551 /// See `log`/`log_static` for more information.
552 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
553 ///
554 /// \param entity_path Path to the entity in the space hierarchy.
555 /// \param static_ If true, the logged components will be static.
556 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
557 /// any temporal data of the same type.
558 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
559 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
560 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
561 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
562 /// You can implement `AsComponents` for your own types as well
563 ///
564 /// @see log, try_log, log_static, try_log_static
565 template <typename... Ts>
566 void log_with_static(std::string_view entity_path, bool static_, const Ts&... as_components)
567 const {
568 try_log_with_static(entity_path, static_, as_components...).handle();
569 }
570
571 /// Logs one or more archetype and/or component batches optionally static, returning an error.
572 ///
573 /// See `log`/`log_static` for more information.
574 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
575 ///
576 /// \param entity_path Path to the entity in the space hierarchy.
577 /// \param static_ If true, the logged components will be static.
578 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
579 /// any temporal data of the same type.
580 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
581 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
582 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
583 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
584 /// You can implement `AsComponents` for your own types as well
585 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
586 ///
587 /// @see log, try_log, log_static, try_log_static
588 template <typename... Ts>
590 std::string_view entity_path, bool static_, const Ts&... as_components
591 ) const {
592 if (!is_enabled()) {
593 return Error::ok();
594 }
595 std::vector<ComponentBatch> serialized_columns;
596 Error err;
597 (
598 [&] {
599 if (err.is_err()) {
600 return;
601 }
602
603 const Result<Collection<ComponentBatch>> serialization_result =
604 AsComponents<Ts>().as_batches(as_components);
605 if (serialization_result.is_err()) {
606 err = serialization_result.error;
607 return;
608 }
609
610 if (serialized_columns.empty()) {
611 // Fast path for the first batch (which is usually the only one!)
612 serialized_columns = std::move(serialization_result.value).to_vector();
613 } else {
614 serialized_columns.insert(
615 serialized_columns.end(),
616 std::make_move_iterator(serialization_result.value.begin()),
617 std::make_move_iterator(serialization_result.value.end())
618 );
619 }
620 }(),
621 ...
622 );
623 RR_RETURN_NOT_OK(err);
624
625 return try_log_serialized_batches(entity_path, static_, std::move(serialized_columns));
626 }
627
628 /// Logs several serialized batches batches, returning an error on failure.
629 ///
630 /// This is a more low-level API than `log`/`log_static\ and requires you to already serialize the data
631 /// ahead of time.
632 ///
633 /// \param entity_path Path to the entity in the space hierarchy.
634 /// \param static_ If true, the logged components will be static.
635 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
636 /// any temporal data of the same type.
637 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
638 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
639 /// \param batches The serialized batches to log.
640 ///
641 /// \see `log`, `try_log`, `log_static`, `try_log_static`, `try_log_with_static`
643 std::string_view entity_path, bool static_, std::vector<ComponentBatch> batches
644 ) const;
645
646 /// Bottom level API that logs raw data cells to the recording stream.
647 ///
648 /// In order to use this you need to pass serialized Arrow data cells.
649 ///
650 /// \param entity_path Path to the entity in the space hierarchy.
651 /// \param num_data_cells Number of data cells passed in.
652 /// \param data_cells The data cells to log.
653 /// \param inject_time
654 /// If set to `true`, the row's timestamp data will be overridden using the recording
655 /// streams internal clock.
656 ///
657 /// \see `try_log_serialized_batches`
659 std::string_view entity_path, size_t num_data_cells, const ComponentBatch* data_cells,
660 bool inject_time
661 ) const;
662
663 /// Logs the file at the given `path` using all `DataLoader`s available.
664 ///
665 /// A single `path` might be handled by more than one loader.
666 ///
667 /// This method blocks until either at least one `DataLoader` starts streaming data in
668 /// or all of them fail.
669 ///
670 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
671 ///
672 /// \param filepath Path to the file to be logged.
673 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
674 /// \param static_ If true, the logged components will be static.
675 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
676 /// any temporal data of the same type.
677 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
678 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
679 ///
680 /// \see `try_log_file_from_path`
682 const std::filesystem::path& filepath,
683 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
684 ) const {
685 try_log_file_from_path(filepath, entity_path_prefix, static_).handle();
686 }
687
688 /// Logs the file at the given `path` using all `DataLoader`s available.
689 ///
690 /// A single `path` might be handled by more than one loader.
691 ///
692 /// This method blocks until either at least one `DataLoader` starts streaming data in
693 /// or all of them fail.
694 ///
695 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
696 ///
697 /// \param filepath Path to the file to be logged.
698 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
699 /// \param static_ If true, the logged components will be static.
700 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
701 /// any temporal data of the same type.
702 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
703 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
704 ///
705 /// \see `log_file_from_path`
707 const std::filesystem::path& filepath,
708 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
709 ) const;
710
711 /// Logs the given `contents` using all `DataLoader`s available.
712 ///
713 /// A single `path` might be handled by more than one loader.
714 ///
715 /// This method blocks until either at least one `DataLoader` starts streaming data in
716 /// or all of them fail.
717 ///
718 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
719 ///
720 /// \param filepath Path to the file that the `contents` belong to.
721 /// \param contents Contents to be logged.
722 /// \param contents_size Size in bytes of the `contents`.
723 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
724 /// \param static_ If true, the logged components will be static.
725 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
726 /// any temporal data of the same type.
727 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
728 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
729 ///
730 /// \see `try_log_file_from_contents`
732 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
733 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
734 ) const {
736 filepath,
737 contents,
738 contents_size,
739 entity_path_prefix,
740 static_
741 )
742 .handle();
743 }
744
745 /// Logs the given `contents` using all `DataLoader`s available.
746 ///
747 /// A single `path` might be handled by more than one loader.
748 ///
749 /// This method blocks until either at least one `DataLoader` starts streaming data in
750 /// or all of them fail.
751 ///
752 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
753 ///
754 /// \param filepath Path to the file that the `contents` belong to.
755 /// \param contents Contents to be logged.
756 /// \param contents_size Size in bytes of the `contents`.
757 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
758 /// \param static_ If true, the logged components will be static.
759 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
760 /// any temporal data of the same type.
761 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
762 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
763 ///
764 /// \see `log_file_from_contents`
766 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
767 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
768 ) const;
769
770 /// Directly log a columns of data to Rerun.
771 ///
772 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
773 ///
774 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
775 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
776 /// The lengths of all of these columns must match, and all
777 /// data that shares the same index across the different columns will act as a single logical row,
778 /// equivalent to a single call to `RecordingStream::log`.
779 ///
780 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
781 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
782 ///
783 /// Any failures that may occur during serialization are handled with `Error::handle`.
784 ///
785 /// \param entity_path Path to the entity in the space hierarchy.
786 /// \param time_columns The time columns to send.
787 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
788 /// \see `try_send_columns`
789 template <typename... Ts>
791 std::string_view entity_path, Collection<TimeColumn> time_columns,
792 Ts... component_columns // NOLINT
793 ) const {
794 try_send_columns(entity_path, time_columns, component_columns...).handle();
795 }
796
797 /// Directly log a columns of data to Rerun.
798 ///
799 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
800 ///
801 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
802 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
803 /// The lengths of all of these columns must match, and all
804 /// data that shares the same index across the different columns will act as a single logical row,
805 /// equivalent to a single call to `RecordingStream::log`.
806 ///
807 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
808 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
809 ///
810 /// \param entity_path Path to the entity in the space hierarchy.
811 /// \param time_columns The time columns to send.
812 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
813 /// \see `send_columns`
814 template <typename... Ts>
816 std::string_view entity_path, Collection<TimeColumn> time_columns,
817 Ts... component_columns // NOLINT
818 ) const {
819 if constexpr (sizeof...(Ts) == 1) {
820 // Directly forward if this is only a single element,
821 // skipping collection of component column vector.
822 return try_send_columns(
823 entity_path,
824 std::move(time_columns),
825 Collection(std::forward<Ts...>(component_columns...))
826 );
827 }
828
829 std::vector<ComponentColumn> flat_column_list;
830 (
831 [&] {
832 static_assert(
833 std::is_same_v<std::remove_cv_t<Ts>, ComponentColumn> ||
834 std::is_constructible_v<Collection<ComponentColumn>, Ts>,
835 "Ts must be ComponentColumn or a collection thereof"
836 );
837
838 push_back_columns(flat_column_list, std::move(component_columns));
839 }(),
840 ...
841 );
842 return try_send_columns(
843 entity_path,
844 std::move(time_columns),
845 // Need to create collection explicitly, otherwise this becomes a recursive call.
846 Collection<ComponentColumn>(std::move(flat_column_list))
847 );
848 }
849
850 /// Directly log a columns of data to Rerun.
851 ///
852 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
853 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
854 /// The lengths of all of these columns must match, and all
855 /// data that shares the same index across the different columns will act as a single logical row,
856 /// equivalent to a single call to `RecordingStream::log`.
857 ///
858 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
859 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
860 ///
861 /// Any failures that may occur during serialization are handled with `Error::handle`.
862 ///
863 /// \param entity_path Path to the entity in the space hierarchy.
864 /// \param time_columns The time columns to send.
865 /// \param component_columns The columns of components to send.
866 /// \see `try_send_columns`
868 std::string_view entity_path, Collection<TimeColumn> time_columns,
869 Collection<ComponentColumn> component_columns
870 ) const {
871 try_send_columns(entity_path, time_columns, component_columns).handle();
872 }
873
874 /// Directly log a columns of data to Rerun.
875 ///
876 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
877 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
878 /// The lengths of all of these columns must match, and all
879 /// data that shares the same index across the different columns will act as a single logical row,
880 /// equivalent to a single call to `RecordingStream::log`.
881 ///
882 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
883 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
884 ///
885 /// \param entity_path Path to the entity in the space hierarchy.
886 /// \param time_columns The time columns to send.
887 /// \param component_columns The columns of components to send.
888 /// \see `send_columns`
890 std::string_view entity_path, Collection<TimeColumn> time_columns,
891 Collection<ComponentColumn> component_columns
892 ) const;
893
894 /// Set a property of a recording.
895 ///
896 /// Any failures that may occur during serialization are handled with `Error::handle`.
897 ///
898 /// \param name The name of the property.
899 /// \param values The values of the property.
900 /// \see `try_send_property`
901 template <typename... Ts>
902 void send_property(std::string_view name, const Ts&... values) const {
903 try_send_property(name, values...).handle();
904 }
905
906 /// Set a property of a recording.
907 ///
908 /// Any failures that may occur during serialization are handled with `Error::handle`.
909 ///
910 /// \param name The name of the property.
911 /// \param values The values of the property.
912 /// \see `set_property`
913 template <typename... Ts>
914 Error try_send_property(std::string_view name, const Ts&... values) const {
915 return try_log_static(
916 this->PROPERTIES_ENTITY_PATH + std::string(name),
917 values... // NOLINT
918 );
919 }
920
921 /// Set the name of a recording.
922 ///
923 /// Any failures that may occur during serialization are handled with `Error::handle`.
924 ///
925 /// \param name The name of the recording.
926 /// \see `try_send_recording_name`
927 void send_recording_name(std::string_view name) const {
929 }
930
931 /// Set the name of a recording.
932 ///
933 /// \param name The name of the recording.
934 /// \see `send_recording_name`
935 Error try_send_recording_name(std::string_view name) const;
936
937 /// Set the start time of a recording.
938 ///
939 /// Any failures that may occur during serialization are handled with `Error::handle`.
940 ///
941 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
942 /// \see `try_send_recording_start_time`
943 void send_recording_start_time_nanos(int64_t nanos) const {
945 }
946
947 /// Set the start time of a recording.
948 ///
949 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
950 /// \see `set_name`
952
953 /// @}
954
955 private:
956 Error try_set_sinks(const LogSink* sinks, uint32_t num_sinks) const;
957
958 // Utility function to implement `try_send_columns` variadic template.
959 static void push_back_columns(
960 std::vector<ComponentColumn>& component_columns, Collection<ComponentColumn> new_columns
961 ) {
962 for (const auto& new_column : new_columns) {
963 component_columns.emplace_back(std::move(new_column));
964 }
965 }
966
967 static void push_back_columns(
968 std::vector<ComponentColumn>& component_columns, ComponentColumn new_column
969 ) {
970 component_columns.emplace_back(std::move(new_column));
971 }
972
973 RecordingStream(uint32_t id, StoreKind store_kind);
974
975 uint32_t _id;
976 StoreKind _store_kind;
977 bool _enabled;
978 };
979} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
void handle() const
Handle this error based on the set log handler.
bool is_err() const
Returns true if the code is not Ok.
Definition error.hpp:139
static Error ok()
Creates a new error set to ok.
Definition error.hpp:124
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:73
Error try_log_with_static(std::string_view entity_path, bool static_, const Ts &... as_components) const
Logs one or more archetype and/or component batches optionally static, returning an error.
Definition recording_stream.hpp:589
Error try_send_property(std::string_view name, const Ts &... values) const
Set a property of a recording.
Definition recording_stream.hpp:914
Error try_send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Collection< ComponentColumn > component_columns) const
Directly log a columns of data to Rerun.
Result< std::string > serve_grpc(std::string_view bind_ip="0.0.0.0", uint16_t port=9876, std::string_view server_memory_limit="25%", PlaybackBehavior playback_behavior=PlaybackBehavior::OldestFirst) const
Swaps the underlying sink for a gRPC server sink pre-configured to listen on rerun+http://{bind_ip}:{...
void log_file_from_path(const std::filesystem::path &filepath, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the file at the given path using all DataLoaders available.
Definition recording_stream.hpp:681
bool is_enabled() const
Returns whether the recording stream is enabled.
Definition recording_stream.hpp:117
void set_time_duration_nanos(std::string_view timeline_name, int64_t nanos) const
Set the index value of the given timeline as a duration in nanoseconds, for the current calling threa...
void send_property(std::string_view name, const Ts &... values) const
Set a property of a recording.
Definition recording_stream.hpp:902
Error try_send_recording_start_time_nanos(int64_t nanos) const
Set the start time of a recording.
Error try_log(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches.
Definition recording_stream.hpp:522
void disable_timeline(std::string_view timeline_name) const
Stops logging to the specified timeline for subsequent log calls.
void reset_time() const
Clears out the current time of the recording, for the current calling thread.
Error to_stdout() const
Stream all log-data to standard output.
void send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Collection< ComponentColumn > component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:867
Error try_log_file_from_path(const std::filesystem::path &filepath, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the file at the given path using all DataLoaders available.
Error save(std::string_view path) const
Stream all log-data to a given .rrd file.
Error try_log_static(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches as static data, returning an error.
Definition recording_stream.hpp:542
StoreKind kind() const
Returns the store kind as passed during construction.
Definition recording_stream.hpp:109
Error flush_blocking(float timeout_sec=std::numeric_limits< float >::infinity()) const
Initiates a flush the batching pipeline and waits for it to propagate.
Error spawn(const SpawnOptions &options={}, std::chrono::duration< TRep, TPeriod > flush_timeout=std::chrono::seconds(2)) const
Definition recording_stream.hpp:206
Error try_log_data_row(std::string_view entity_path, size_t num_data_cells, const ComponentBatch *data_cells, bool inject_time) const
Bottom level API that logs raw data cells to the recording stream.
void log_file_from_contents(const std::filesystem::path &filepath, const std::byte *contents, size_t contents_size, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the given contents using all DataLoaders available.
Definition recording_stream.hpp:731
void set_time_timestamp_secs_since_epoch(std::string_view timeline_name, double seconds) const
Set the index value of the given timeline as seconds since Unix Epoch (1970), for the current calling...
Definition recording_stream.hpp:336
void set_time_duration_secs(std::string_view timeline_name, double secs) const
Set the index value of the given timeline as a duration in seconds, for the current calling thread.
Definition recording_stream.hpp:292
void set_time_duration(std::string_view timeline_name, std::chrono::duration< TRep, TPeriod > duration) const
Set the index value of the given timeline as a duration, for the current calling thread.
Definition recording_stream.hpp:276
Error set_sinks(const Ts &... sinks) const
Stream data to multiple sinks.
Definition recording_stream.hpp:160
void set_time_nanos(std::string_view timeline_name, int64_t nanos) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:415
void set_time(std::string_view timeline_name, std::chrono::duration< TRep, TPeriod > time) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:382
void send_recording_start_time_nanos(int64_t nanos) const
Set the start time of a recording.
Definition recording_stream.hpp:943
void log_with_static(std::string_view entity_path, bool static_, const Ts &... as_components) const
Logs one or more archetype and/or component batches optionally static, returning an error.
Definition recording_stream.hpp:566
static RecordingStream & current(StoreKind store_kind=StoreKind::Recording)
Retrieves the most appropriate globally available recording stream for the given kind.
RecordingStream(std::string_view app_id, std::string_view recording_id=std::string_view(), StoreKind store_kind=StoreKind::Recording)
Creates a new recording stream to log to.
void log(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches.
Definition recording_stream.hpp:481
void set_thread_local() const
Replaces the currently active recording for this stream's store kind in the thread-local scope with t...
Error try_send_recording_name(std::string_view name) const
Set the name of a recording.
Error try_log_serialized_batches(std::string_view entity_path, bool static_, std::vector< ComponentBatch > batches) const
Logs several serialized batches batches, returning an error on failure.
Error connect_grpc(std::string_view url="rerun+http://127.0.0.1:9876/proxy") const
Connect to a remote Rerun Viewer on the given URL.
void set_time(std::string_view timeline_name, std::chrono::time_point< TClock > time) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:366
Error spawn(const SpawnOptions &options={}) const
Spawns a new Rerun Viewer process from an executable available in PATH, then connects to it over gRPC...
void set_time_seconds(std::string_view timeline_name, double seconds) const
Set the current time of the recording, for the current calling thread.
Definition recording_stream.hpp:399
void set_time_timestamp_nanos_since_epoch(std::string_view timeline_name, int64_t nanos) const
Set the index value of the given timeline as nanoseconds since Unix Epoch (1970), for the current cal...
void send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Ts... component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:790
Error try_log_file_from_contents(const std::filesystem::path &filepath, const std::byte *contents, size_t contents_size, std::string_view entity_path_prefix=std::string_view(), bool static_=false) const
Logs the given contents using all DataLoaders available.
void send_recording_name(std::string_view name) const
Set the name of a recording.
Definition recording_stream.hpp:927
void set_global() const
Replaces the currently active recording for this stream's store kind in the global scope with this on...
void set_time_timestamp(std::string_view timeline_name, std::chrono::time_point< TClock > timestamp) const
Set the index value of the given timeline as a timestamp, for the current calling thread.
Definition recording_stream.hpp:317
void set_time_sequence(std::string_view timeline_name, int64_t sequence_nr) const
Set the index value of the given timeline as a sequence number, for the current calling thread.
Error try_send_columns(std::string_view entity_path, Collection< TimeColumn > time_columns, Ts... component_columns) const
Directly log a columns of data to Rerun.
Definition recording_stream.hpp:815
void log_static(std::string_view entity_path, const Ts &... as_components) const
Logs one or more archetype and/or component batches as static data.
Definition recording_stream.hpp:503
A class for representing either a usable value, or an error.
Definition result.hpp:14
bool is_err() const
Returns true if error is not set to rerun::ErrorCode::Ok, implying that no value is contained,...
Definition result.hpp:44
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
PlaybackBehavior
What happens when a client connects to a gRPC server?
Definition recording_stream.hpp:28
@ OldestFirst
Start playing back all the old data first, and only after start sending anything that happened since.
@ NewestFirst
Prioritize the newest arriving messages, replaying the history later, starting with the newest.
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
Arrow-encoded data of a column of components.
Definition component_column.hpp:20
A sink for log messages.
Definition log_sink.hpp:38
Options to control the behavior of spawn.
Definition spawn_options.hpp:17