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 /// It is highly recommended that you set the memory limit to `0B` if both the server and client are running
183 /// on the same machine, otherwise you're potentially doubling your memory usage!
184 ///
185 /// Returns the URI of the gRPC server so you can connect to it from a viewer.
186 ///
187 /// This function returns immediately.
189 std::string_view bind_ip = "0.0.0.0", uint16_t port = 9876,
190 std::string_view server_memory_limit = "25%",
192 ) const;
193
194 /// Spawns a new Rerun Viewer process from an executable available in PATH, then connects to it
195 /// over gRPC.
196 ///
197 /// If a Rerun Viewer is already listening on this port, the stream will be redirected to
198 /// that viewer instead of starting a new one.
199 ///
200 /// \param options See `rerun::SpawnOptions` for more information.
201 Error spawn(const SpawnOptions& options = {}) const;
202
203 /// @see RecordingStream::spawn
204 template <typename TRep, typename TPeriod>
206 const SpawnOptions& options = {},
207 std::chrono::duration<TRep, TPeriod> flush_timeout = std::chrono::seconds(2)
208 ) const {
209 using seconds_float = std::chrono::duration<float>; // Default ratio is 1:1 == seconds.
210 return spawn(options, std::chrono::duration_cast<seconds_float>(flush_timeout).count());
211 }
212
213 /// Stream all log-data to a given `.rrd` file.
214 ///
215 /// The Rerun Viewer is able to read continuously from the resulting rrd file while it is being written.
216 /// However, depending on your OS and configuration, changes may not be immediately visible due to file caching.
217 /// This is a common issue on Windows and (to a lesser extent) on MacOS.
218 ///
219 /// This function returns immediately.
220 Error save(std::string_view path) const;
221
222 /// Stream all log-data to standard output.
223 ///
224 /// Pipe the result into the Rerun Viewer to visualize it.
225 ///
226 /// If there isn't any listener at the other end of the pipe, the `RecordingStream` will
227 /// default back to `buffered` mode, in order not to break the user's terminal.
228 ///
229 /// This function returns immediately.
230 //
231 // NOTE: This should be called `stdout` like in other SDK, but turns out that `stdout` is a
232 // macro when compiling with msvc [1].
233 // [1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/stdin-stdout-stderr?view=msvc-170
235
236 /// Initiates a flush the batching pipeline and waits for it to propagate.
237 ///
238 /// \param timeout_sec The minimum time the SDK will wait during a flush before potentially
239 /// dropping data if progress is not being made. If you pass in FLT_MAX or infinity,
240 /// the function will block until it either succeeds or fails.
241 ///
242 /// Returns an error if we fail to flush all previously sent log messages.
243 ///
244 /// See `RecordingStream` docs for ordering semantics and multithreading guarantees.
245 Error flush_blocking(float timeout_sec = std::numeric_limits<float>::infinity()) const;
246
247 /// @}
248
249 // -----------------------------------------------------------------------------------------
250 /// \name Controlling log time (index).
251 /// \details
252 /// @{
253
254 /// Set the index value of the given timeline as a sequence number, for the current calling thread.
255 ///
256 /// Used for all subsequent logging performed from this same thread, until the next call
257 /// to one of the time setting methods.
258 ///
259 /// For example: `rec.set_time_sequence("frame_nr", frame_nr)`.
260 ///
261 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
262 /// @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
263 void set_time_sequence(std::string_view timeline_name, int64_t sequence_nr) const;
264
265 /// Set the index value of the given timeline as a duration, for the current calling thread.
266 ///
267 /// Used for all subsequent logging performed from this same thread, until the next call
268 /// to one of the time setting methods.
269 ///
270 /// For example: `rec.set_time_duration("runtime", time_since_start)`.
271 ///
272 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
273 /// @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
274 template <typename TRep, typename TPeriod>
276 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> duration
277 ) const {
278 auto nanos = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
279 set_time_duration_nanos(timeline_name, nanos);
280 }
281
282 /// Set the index value of the given timeline as a duration in seconds, for the current calling thread.
283 ///
284 /// Used for all subsequent logging performed from this same thread, until the next call
285 /// to one of the time setting methods.
286 ///
287 /// For example: `rec.set_time_duration_secs("runtime", seconds_since_start)`.
288 ///
289 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
290 /// @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
291 void set_time_duration_secs(std::string_view timeline_name, double secs) const {
292 set_time_duration_nanos(timeline_name, static_cast<int64_t>(1e9 * secs + 0.5));
293 }
294
295 /// Set the index value of the given timeline as a duration in nanoseconds, for the current calling thread.
296 ///
297 /// Used for all subsequent logging performed from this same thread, until the next call
298 /// to one of the time setting methods.
299 ///
300 /// For example: `rec.set_time_duration_nanos("runtime", nanos_since_start)`.
301 ///
302 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
303 /// @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
304 void set_time_duration_nanos(std::string_view timeline_name, int64_t nanos) const;
305
306 /// Set the index value of the given timeline as a timestamp, for the current calling thread.
307 ///
308 /// Used for all subsequent logging performed from this same thread, until the next call
309 /// to one of the time setting methods.
310 ///
311 /// For example: `rec.set_time_timestamp("capture_time", now())`.
312 ///
313 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
314 /// @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
315 template <typename TClock>
317 std::string_view timeline_name, std::chrono::time_point<TClock> timestamp
318 ) const {
320 timeline_name,
321 std::chrono::duration_cast<std::chrono::nanoseconds>(timestamp.time_since_epoch())
322 .count()
323 );
324 }
325
326 /// Set the index value of the given timeline as seconds since Unix Epoch (1970), for the current calling thread.
327 ///
328 /// Used for all subsequent logging performed from this same thread, until the next call
329 /// to one of the time setting methods.
330 ///
331 /// For example: `rec.set_time_timestamp_secs_since_epoch("capture_time", secs_since_epoch())`.
332 ///
333 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
334 /// @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
335 void set_time_timestamp_secs_since_epoch(std::string_view timeline_name, double seconds)
336 const {
338 timeline_name,
339 static_cast<int64_t>(1e9 * seconds)
340 );
341 }
342
343 /// Set the index value of the given timeline as nanoseconds since Unix Epoch (1970), for the current calling thread.
344 ///
345 /// Used for all subsequent logging performed from this same thread, until the next call
346 /// to one of the time setting methods.
347 ///
348 /// For example: `rec.set_time_timestamp_nanos_since_epoch("capture_time", nanos_since_epoch())`.
349 ///
350 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
351 /// @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
352 void set_time_timestamp_nanos_since_epoch(std::string_view timeline_name, int64_t nanos)
353 const;
354
355 /// Set the current time of the recording, for the current calling thread.
356 ///
357 /// Used for all subsequent logging performed from this same thread, until the next call
358 /// to one of the time setting methods.
359 ///
360 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
361 ///
362 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
363 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
364 template <typename TClock>
365 [[deprecated("Renamed to `set_time_timestamp`")]] void set_time(
366 std::string_view timeline_name, std::chrono::time_point<TClock> time
367 ) const {
368 set_time(timeline_name, time.time_since_epoch());
369 }
370
371 /// Set the current time of the recording, for the current calling thread.
372 ///
373 /// Used for all subsequent logging performed from this same thread, until the next call
374 /// to one of the time setting methods.
375 ///
376 /// For example: `rec.set_time("sim_time", sim_time_secs)`.
377 ///
378 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
379 /// @see set_time_sequence, set_time_seconds, set_time_nanos, reset_time, disable_timeline
380 template <typename TRep, typename TPeriod>
381 [[deprecated("Renamed `set_time_duration`")]] void set_time(
382 std::string_view timeline_name, std::chrono::duration<TRep, TPeriod> time
383 ) const {
384 set_time_duration(timeline_name, time);
385 }
386
387 /// Set the current time of the recording, for the current calling thread.
388 ///
389 /// Used for all subsequent logging performed from this same thread, until the next call
390 /// to one of the time setting methods.
391 ///
392 /// For example: `rec.set_time_seconds("sim_time", sim_time_secs)`.
393 ///
394 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
395 /// @see set_time_sequence, set_time_nanos, reset_time, set_time, disable_timeline
396 [[deprecated("Use either `set_time_duration_secs` or `set_time_timestamp_secs_since_epoch`"
397 )]] void
398 set_time_seconds(std::string_view timeline_name, double seconds) const {
399 set_time_duration_secs(timeline_name, seconds);
400 }
401
402 /// Set the current time of the recording, for the current calling thread.
403 ///
404 /// Used for all subsequent logging performed from this same thread, until the next call
405 /// to one of the time setting methods.
406 ///
407 /// For example: `rec.set_time_nanos("sim_time", sim_time_nanos)`.
408 ///
409 /// You can remove a timeline from subsequent log calls again using `rec.disable_timeline`.
410 /// @see set_time_sequence, set_time_seconds, reset_time, set_time, disable_timeline
411 [[deprecated(
412 "Use either `set_time_duration_nanos` or `set_time_timestamp_nanos_since_epoch`"
413 )]] void
414 set_time_nanos(std::string_view timeline_name, int64_t nanos) const {
415 set_time_duration_nanos(timeline_name, nanos);
416 }
417
418 /// Stops logging to the specified timeline for subsequent log calls.
419 ///
420 /// The timeline is still there, but will not be updated with any new data.
421 ///
422 /// No-op if the timeline doesn't exist.
423 ///
424 /// @see set_time_sequence, set_time_seconds, set_time, reset_time
425 void disable_timeline(std::string_view timeline_name) const;
426
427 /// Clears out the current time of the recording, for the current calling thread.
428 ///
429 /// Used for all subsequent logging performed from this same thread, until the next call
430 /// to one of the time setting methods.
431 ///
432 /// For example: `rec.reset_time()`.
433 /// @see set_time_sequence, set_time_seconds, set_time_nanos, disable_timeline
434 void reset_time() const;
435
436 /// @}
437
438 // -----------------------------------------------------------------------------------------
439 /// \name Sending & logging data.
440 /// @{
441
442 /// Logs one or more archetype and/or component batches.
443 ///
444 /// This is the main entry point for logging data to rerun. It can be used to log anything
445 /// that implements the `AsComponents<T>` trait.
446 ///
447 /// When logging data, you must always provide an [entity_path](https://www.rerun.io/docs/concepts/entity-path)
448 /// for identifying the data. Note that paths prefixed with "__" are considered reserved for use by the Rerun SDK
449 /// itself and should not be used for logging user data. This is where Rerun will log additional information
450 /// such as properties and warnings.
451 ///
452 /// The most common way to log is with one of the rerun archetypes, all of which implement the `AsComponents` trait.
453 ///
454 /// For example, to log two 3D points:
455 /// ```
456 /// rec.log("my/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}}));
457 /// ```
458 ///
459 /// The `log` function can flexibly accept an arbitrary number of additional objects which will
460 /// be merged into the first entity, for instance:
461 /// ```
462 /// // Log three points with arrows sticking out of them:
463 /// rec.log(
464 /// "my/points",
465 /// rerun::Points3D({{0.2f, 0.5f, 0.3f}, {0.9f, 1.2f, 0.1f}, {1.0f, 4.2f, 0.3f}})
466 /// .with_radii({0.1, 0.2, 0.3}),
467 /// rerun::Arrows3D::from_vectors({{0.3f, 2.1f, 0.2f}, {0.9f, -1.1, 2.3f}, {-0.4f, 0.5f, 2.9f}})
468 /// );
469 /// ```
470 ///
471 /// Any failures that may are handled with `Error::handle`.
472 ///
473 /// \param entity_path Path to the entity in the space hierarchy.
474 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
475 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
476 /// You can implement `AsComponents` for your own types as well
477 ///
478 /// @see try_log, log_static, try_log_with_static
479 template <typename... Ts>
480 void log(std::string_view entity_path, const Ts&... as_components) const {
481 if (!is_enabled()) {
482 return;
483 }
484 try_log_with_static(entity_path, false, as_components...).handle();
485 }
486
487 /// Logs one or more archetype and/or component batches as static data.
488 ///
489 /// Like `log` but logs the data as static:
490 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
491 /// any temporal data of the same type.
492 ///
493 /// Failures are handled with `Error::handle`.
494 ///
495 /// \param entity_path Path to the entity in the space hierarchy.
496 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
497 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
498 /// You can implement `AsComponents` for your own types as well
499 ///
500 /// @see log, try_log_static, try_log_with_static
501 template <typename... Ts>
502 void log_static(std::string_view entity_path, const Ts&... as_components) const {
503 if (!is_enabled()) {
504 return;
505 }
506 try_log_with_static(entity_path, true, as_components...).handle();
507 }
508
509 /// Logs one or more archetype and/or component batches.
510 ///
511 /// See `log` for more information.
512 /// Unlike `log` this method returns an error if an error occurs.
513 ///
514 /// \param entity_path Path to the entity in the space hierarchy.
515 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
516 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
517 /// You can implement `AsComponents` for your own types as well
518 ///
519 /// @see log, try_log_static, try_log_with_static
520 template <typename... Ts>
521 Error try_log(std::string_view entity_path, const Ts&... as_components) const {
522 if (!is_enabled()) {
523 return Error::ok();
524 }
525 return try_log_with_static(entity_path, false, as_components...);
526 }
527
528 /// Logs one or more archetype and/or component batches as static data, returning an error.
529 ///
530 /// See `log`/`log_static` for more information.
531 /// Unlike `log_static` this method returns if an error occurs.
532 ///
533 /// \param entity_path Path to the entity in the space hierarchy.
534 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
535 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
536 /// You can implement `AsComponents` for your own types as well
537 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
538 ///
539 /// @see log_static, try_log, try_log_with_static
540 template <typename... Ts>
541 Error try_log_static(std::string_view entity_path, const Ts&... as_components) const {
542 if (!is_enabled()) {
543 return Error::ok();
544 }
545 return try_log_with_static(entity_path, true, as_components...);
546 }
547
548 /// Logs one or more archetype and/or component batches optionally static, returning an error.
549 ///
550 /// See `log`/`log_static` for more information.
551 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
552 ///
553 /// \param entity_path Path to the entity in the space hierarchy.
554 /// \param static_ If true, the logged components will be static.
555 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
556 /// any temporal data of the same type.
557 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
558 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
559 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
560 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
561 /// You can implement `AsComponents` for your own types as well
562 ///
563 /// @see log, try_log, log_static, try_log_static
564 template <typename... Ts>
565 void log_with_static(std::string_view entity_path, bool static_, const Ts&... as_components)
566 const {
567 try_log_with_static(entity_path, static_, as_components...).handle();
568 }
569
570 /// Logs one or more archetype and/or component batches optionally static, returning an error.
571 ///
572 /// See `log`/`log_static` for more information.
573 /// Returns an error if an error occurs during evaluation of `AsComponents` or logging.
574 ///
575 /// \param entity_path Path to the entity in the space hierarchy.
576 /// \param static_ If true, the logged components will be static.
577 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
578 /// any temporal data of the same type.
579 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
580 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
581 /// \param as_components Any type for which the `AsComponents<T>` trait is implemented.
582 /// This is the case for any archetype as well as individual or collection of `ComponentBatch`.
583 /// You can implement `AsComponents` for your own types as well
584 /// \returns An error if an error occurs during evaluation of `AsComponents` or logging.
585 ///
586 /// @see log, try_log, log_static, try_log_static
587 template <typename... Ts>
589 std::string_view entity_path, bool static_, const Ts&... as_components
590 ) const {
591 if (!is_enabled()) {
592 return Error::ok();
593 }
594 std::vector<ComponentBatch> serialized_columns;
595 Error err;
596 (
597 [&] {
598 if (err.is_err()) {
599 return;
600 }
601
602 const Result<Collection<ComponentBatch>> serialization_result =
603 AsComponents<Ts>().as_batches(as_components);
604 if (serialization_result.is_err()) {
605 err = serialization_result.error;
606 return;
607 }
608
609 if (serialized_columns.empty()) {
610 // Fast path for the first batch (which is usually the only one!)
611 serialized_columns = std::move(serialization_result.value).to_vector();
612 } else {
613 serialized_columns.insert(
614 serialized_columns.end(),
615 std::make_move_iterator(serialization_result.value.begin()),
616 std::make_move_iterator(serialization_result.value.end())
617 );
618 }
619 }(),
620 ...
621 );
622 RR_RETURN_NOT_OK(err);
623
624 return try_log_serialized_batches(entity_path, static_, std::move(serialized_columns));
625 }
626
627 /// Logs several serialized batches batches, returning an error on failure.
628 ///
629 /// This is a more low-level API than `log`/`log_static\ and requires you to already serialize the data
630 /// ahead of time.
631 ///
632 /// \param entity_path Path to the entity in the space hierarchy.
633 /// \param static_ If true, the logged components will be static.
634 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
635 /// any temporal data of the same type.
636 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
637 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
638 /// \param batches The serialized batches to log.
639 ///
640 /// \see `log`, `try_log`, `log_static`, `try_log_static`, `try_log_with_static`
642 std::string_view entity_path, bool static_, std::vector<ComponentBatch> batches
643 ) const;
644
645 /// Bottom level API that logs raw data cells to the recording stream.
646 ///
647 /// In order to use this you need to pass serialized Arrow data cells.
648 ///
649 /// \param entity_path Path to the entity in the space hierarchy.
650 /// \param num_data_cells Number of data cells passed in.
651 /// \param data_cells The data cells to log.
652 /// \param inject_time
653 /// If set to `true`, the row's timestamp data will be overridden using the recording
654 /// streams internal clock.
655 ///
656 /// \see `try_log_serialized_batches`
658 std::string_view entity_path, size_t num_data_cells, const ComponentBatch* data_cells,
659 bool inject_time
660 ) const;
661
662 /// Logs the file at the given `path` using all `DataLoader`s available.
663 ///
664 /// A single `path` might be handled by more than one loader.
665 ///
666 /// This method blocks until either at least one `DataLoader` starts streaming data in
667 /// or all of them fail.
668 ///
669 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
670 ///
671 /// \param filepath Path to the file to be logged.
672 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
673 /// \param static_ If true, the logged components will be static.
674 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
675 /// any temporal data of the same type.
676 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
677 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
678 ///
679 /// \see `try_log_file_from_path`
681 const std::filesystem::path& filepath,
682 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
683 ) const {
684 try_log_file_from_path(filepath, entity_path_prefix, static_).handle();
685 }
686
687 /// Logs the file at the given `path` using all `DataLoader`s available.
688 ///
689 /// A single `path` might be handled by more than one loader.
690 ///
691 /// This method blocks until either at least one `DataLoader` starts streaming data in
692 /// or all of them fail.
693 ///
694 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
695 ///
696 /// \param filepath Path to the file to be logged.
697 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
698 /// \param static_ If true, the logged components will be static.
699 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
700 /// any temporal data of the same type.
701 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
702 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
703 ///
704 /// \see `log_file_from_path`
706 const std::filesystem::path& filepath,
707 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
708 ) const;
709
710 /// Logs the given `contents` using all `DataLoader`s available.
711 ///
712 /// A single `path` might be handled by more than one loader.
713 ///
714 /// This method blocks until either at least one `DataLoader` starts streaming data in
715 /// or all of them fail.
716 ///
717 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
718 ///
719 /// \param filepath Path to the file that the `contents` belong to.
720 /// \param contents Contents to be logged.
721 /// \param contents_size Size in bytes of the `contents`.
722 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
723 /// \param static_ If true, the logged components will be static.
724 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
725 /// any temporal data of the same type.
726 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
727 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
728 ///
729 /// \see `try_log_file_from_contents`
731 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
732 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
733 ) const {
735 filepath,
736 contents,
737 contents_size,
738 entity_path_prefix,
739 static_
740 )
741 .handle();
742 }
743
744 /// Logs the given `contents` using all `DataLoader`s available.
745 ///
746 /// A single `path` might be handled by more than one loader.
747 ///
748 /// This method blocks until either at least one `DataLoader` starts streaming data in
749 /// or all of them fail.
750 ///
751 /// See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information.
752 ///
753 /// \param filepath Path to the file that the `contents` belong to.
754 /// \param contents Contents to be logged.
755 /// \param contents_size Size in bytes of the `contents`.
756 /// \param entity_path_prefix What should the logged entity paths be prefixed with?
757 /// \param static_ If true, the logged components will be static.
758 /// Static data has no time associated with it, exists on all timelines, and unconditionally shadows
759 /// any temporal data of the same type.
760 /// Otherwise, the data will be timestamped automatically with `log_time` and `log_tick`.
761 /// Additional timelines set by `set_time_sequence` or `set_time` will also be included.
762 ///
763 /// \see `log_file_from_contents`
765 const std::filesystem::path& filepath, const std::byte* contents, size_t contents_size,
766 std::string_view entity_path_prefix = std::string_view(), bool static_ = false
767 ) const;
768
769 /// Directly log a columns of data to Rerun.
770 ///
771 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
772 ///
773 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
774 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
775 /// The lengths of all of these columns must match, and all
776 /// data that shares the same index across the different columns will act as a single logical row,
777 /// equivalent to a single call to `RecordingStream::log`.
778 ///
779 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
780 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
781 ///
782 /// Any failures that may occur during serialization are handled with `Error::handle`.
783 ///
784 /// \param entity_path Path to the entity in the space hierarchy.
785 /// \param time_columns The time columns to send.
786 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
787 /// \see `try_send_columns`
788 template <typename... Ts>
790 std::string_view entity_path, Collection<TimeColumn> time_columns,
791 Ts... component_columns // NOLINT
792 ) const {
793 try_send_columns(entity_path, time_columns, component_columns...).handle();
794 }
795
796 /// Directly log a columns of data to Rerun.
797 ///
798 /// This variant takes in arbitrary amount of `ComponentColumn`s and `ComponentColumn` collections.
799 ///
800 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
801 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
802 /// The lengths of all of these columns must match, and all
803 /// data that shares the same index across the different columns will act as a single logical row,
804 /// equivalent to a single call to `RecordingStream::log`.
805 ///
806 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
807 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
808 ///
809 /// \param entity_path Path to the entity in the space hierarchy.
810 /// \param time_columns The time columns to send.
811 /// \param component_columns The columns of components to send. Both individual `ComponentColumn`s and `Collection<ComponentColumn>`s are accepted.
812 /// \see `send_columns`
813 template <typename... Ts>
815 std::string_view entity_path, Collection<TimeColumn> time_columns,
816 Ts... component_columns // NOLINT
817 ) const {
818 if constexpr (sizeof...(Ts) == 1) {
819 // Directly forward if this is only a single element,
820 // skipping collection of component column vector.
821 return try_send_columns(
822 entity_path,
823 std::move(time_columns),
824 Collection(std::forward<Ts...>(component_columns...))
825 );
826 }
827
828 std::vector<ComponentColumn> flat_column_list;
829 (
830 [&] {
831 static_assert(
832 std::is_same_v<std::remove_cv_t<Ts>, ComponentColumn> ||
833 std::is_constructible_v<Collection<ComponentColumn>, Ts>,
834 "Ts must be ComponentColumn or a collection thereof"
835 );
836
837 push_back_columns(flat_column_list, std::move(component_columns));
838 }(),
839 ...
840 );
841 return try_send_columns(
842 entity_path,
843 std::move(time_columns),
844 // Need to create collection explicitly, otherwise this becomes a recursive call.
845 Collection<ComponentColumn>(std::move(flat_column_list))
846 );
847 }
848
849 /// Directly log a columns of data to Rerun.
850 ///
851 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
852 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
853 /// The lengths of all of these columns must match, and all
854 /// data that shares the same index across the different columns will act as a single logical row,
855 /// equivalent to a single call to `RecordingStream::log`.
856 ///
857 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
858 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
859 ///
860 /// Any failures that may occur during serialization are handled with `Error::handle`.
861 ///
862 /// \param entity_path Path to the entity in the space hierarchy.
863 /// \param time_columns The time columns to send.
864 /// \param component_columns The columns of components to send.
865 /// \see `try_send_columns`
867 std::string_view entity_path, Collection<TimeColumn> time_columns,
868 Collection<ComponentColumn> component_columns
869 ) const {
870 try_send_columns(entity_path, time_columns, component_columns).handle();
871 }
872
873 /// Directly log a columns of data to Rerun.
874 ///
875 /// Unlike the regular `log` API, which is row-oriented, this API lets you submit the data
876 /// in a columnar form. Each `TimeColumn` and `ComponentColumn` represents a column of data that will be sent to Rerun.
877 /// The lengths of all of these columns must match, and all
878 /// data that shares the same index across the different columns will act as a single logical row,
879 /// equivalent to a single call to `RecordingStream::log`.
880 ///
881 /// Note that this API ignores any stateful time set on the log stream via the `RecordingStream::set_time_*` APIs.
882 /// Furthermore, this will _not_ inject the default timelines `log_tick` and `log_time` timeline columns.
883 ///
884 /// \param entity_path Path to the entity in the space hierarchy.
885 /// \param time_columns The time columns to send.
886 /// \param component_columns The columns of components to send.
887 /// \see `send_columns`
889 std::string_view entity_path, Collection<TimeColumn> time_columns,
890 Collection<ComponentColumn> component_columns
891 ) const;
892
893 /// Set a property of a recording.
894 ///
895 /// Any failures that may occur during serialization are handled with `Error::handle`.
896 ///
897 /// \param name The name of the property.
898 /// \param values The values of the property.
899 /// \see `try_send_property`
900 template <typename... Ts>
901 void send_property(std::string_view name, const Ts&... values) const {
902 try_send_property(name, values...).handle();
903 }
904
905 /// Set a property of a recording.
906 ///
907 /// Any failures that may occur during serialization are handled with `Error::handle`.
908 ///
909 /// \param name The name of the property.
910 /// \param values The values of the property.
911 /// \see `set_property`
912 template <typename... Ts>
913 Error try_send_property(std::string_view name, const Ts&... values) const {
914 return try_log_static(
915 this->PROPERTIES_ENTITY_PATH + std::string(name),
916 values... // NOLINT
917 );
918 }
919
920 /// Set the name of a recording.
921 ///
922 /// Any failures that may occur during serialization are handled with `Error::handle`.
923 ///
924 /// \param name The name of the recording.
925 /// \see `try_send_recording_name`
926 void send_recording_name(std::string_view name) const {
928 }
929
930 /// Set the name of a recording.
931 ///
932 /// \param name The name of the recording.
933 /// \see `send_recording_name`
934 Error try_send_recording_name(std::string_view name) const;
935
936 /// Set the start time of a recording.
937 ///
938 /// Any failures that may occur during serialization are handled with `Error::handle`.
939 ///
940 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
941 /// \see `try_send_recording_start_time`
942 void send_recording_start_time_nanos(int64_t nanos) const {
944 }
945
946 /// Set the start time of a recording.
947 ///
948 /// \param nanos The timestamp of the recording in nanoseconds since Unix epoch.
949 /// \see `set_name`
951
952 /// @}
953
954 private:
955 Error try_set_sinks(const LogSink* sinks, uint32_t num_sinks) const;
956
957 // Utility function to implement `try_send_columns` variadic template.
958 static void push_back_columns(
959 std::vector<ComponentColumn>& component_columns, Collection<ComponentColumn> new_columns
960 ) {
961 for (const auto& new_column : new_columns) {
962 component_columns.emplace_back(std::move(new_column));
963 }
964 }
965
966 static void push_back_columns(
967 std::vector<ComponentColumn>& component_columns, ComponentColumn new_column
968 ) {
969 component_columns.emplace_back(std::move(new_column));
970 }
971
972 RecordingStream(uint32_t id, StoreKind store_kind);
973
974 uint32_t _id;
975 StoreKind _store_kind;
976 bool _enabled;
977 };
978} // 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:588
Error try_send_property(std::string_view name, const Ts &... values) const
Set a property of a recording.
Definition recording_stream.hpp:913
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:680
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:901
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:521
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:866
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:541
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:205
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:730
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:335
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:291
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:275
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:414
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:381
void send_recording_start_time_nanos(int64_t nanos) const
Set the start time of a recording.
Definition recording_stream.hpp:942
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:565
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:480
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:365
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:398
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:789
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:926
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:316
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:814
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:502
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