From 5acbbab0c9a71e40809d8cc31e7fe3171c627218 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 19 Dec 2024 13:47:25 +0100 Subject: [PATCH 01/11] Find and annihilate slow component iterators (#8540) * `HybridResultsChunkIter::component` is now `HybridResultsChunkIter::component_slow`, in order to scare people off. * I have removed *a lot* of those, and will remove a few more in follow up PRs, but I need to add more iteration tools first. --- crates/store/re_chunk/src/iter.rs | 4 +++ .../re_types/src/components/colormap_ext.rs | 31 +++++++++++++++++++ .../re_types/src/components/fill_mode_ext.rs | 21 +++++++++++++ crates/store/re_types/src/components/mod.rs | 2 ++ crates/viewer/re_view/src/results_ext.rs | 6 +++- .../re_view_graph/src/visualizers/edges.rs | 3 +- .../re_view_graph/src/visualizers/nodes.rs | 9 +++--- .../src/visualizers/geo_line_strings.rs | 23 +++++++------- .../re_view_map/src/visualizers/geo_points.rs | 18 +++++------ .../src/visualizers/arrows2d.rs | 3 +- .../src/visualizers/arrows3d.rs | 2 +- .../src/visualizers/boxes2d.rs | 2 +- .../src/visualizers/boxes3d.rs | 8 +++-- .../src/visualizers/capsules3d.rs | 2 +- .../src/visualizers/depth_images.rs | 4 +-- .../src/visualizers/ellipsoids.rs | 5 +-- .../src/visualizers/lines2d.rs | 2 +- .../src/visualizers/lines3d.rs | 2 +- .../re_view_spatial/src/visualizers/meshes.rs | 6 ++-- .../src/visualizers/points2d.rs | 2 +- .../src/visualizers/points3d.rs | 2 +- .../re_view_tensor/src/visualizer_system.rs | 9 ++++-- .../re_view_text_log/src/visualizer_system.rs | 4 +-- 23 files changed, 121 insertions(+), 49 deletions(-) create mode 100644 crates/store/re_types/src/components/colormap_ext.rs create mode 100644 crates/store/re_types/src/components/fill_mode_ext.rs diff --git a/crates/store/re_chunk/src/iter.rs b/crates/store/re_chunk/src/iter.rs index 1534d9ac0a28..fd212996822c 100644 --- a/crates/store/re_chunk/src/iter.rs +++ b/crates/store/re_chunk/src/iter.rs @@ -686,6 +686,10 @@ impl Chunk { /// Use this when working with complex arrow datatypes and performance matters (e.g. ranging /// through enum types across many timestamps). /// + /// TODO(#5305): Note that, while this is much faster than deserializing each row individually, + /// this still uses the old codegen'd deserialization path, which does some very unidiomatic Arrow + /// things, and is therefore very slow at the moment. Avoid this on performance critical paths. + /// /// See also: /// * [`Self::iter_primitive`] /// * [`Self::iter_primitive_array`] diff --git a/crates/store/re_types/src/components/colormap_ext.rs b/crates/store/re_types/src/components/colormap_ext.rs new file mode 100644 index 000000000000..4ac1db7ecda1 --- /dev/null +++ b/crates/store/re_types/src/components/colormap_ext.rs @@ -0,0 +1,31 @@ +use super::Colormap; + +impl Colormap { + /// Instantiate a new [`Colormap`] from a u8 value. + /// + /// Returns `None` if the value doesn't match any of the enum's arms. + pub fn from_u8(value: u8) -> Option { + // NOTE: This code will be optimized out, it's only here to make sure this method fails to + // compile if the enum is modified. + match Self::default() { + Self::Grayscale + | Self::Inferno + | Self::Magma + | Self::Plasma + | Self::Turbo + | Self::Viridis + | Self::CyanToYellow => {} + } + + match value { + v if v == Self::Grayscale as u8 => Some(Self::Grayscale), + v if v == Self::Inferno as u8 => Some(Self::Inferno), + v if v == Self::Magma as u8 => Some(Self::Magma), + v if v == Self::Plasma as u8 => Some(Self::Plasma), + v if v == Self::Turbo as u8 => Some(Self::Turbo), + v if v == Self::Viridis as u8 => Some(Self::Viridis), + v if v == Self::CyanToYellow as u8 => Some(Self::CyanToYellow), + _ => None, + } + } +} diff --git a/crates/store/re_types/src/components/fill_mode_ext.rs b/crates/store/re_types/src/components/fill_mode_ext.rs new file mode 100644 index 000000000000..9096be0cb444 --- /dev/null +++ b/crates/store/re_types/src/components/fill_mode_ext.rs @@ -0,0 +1,21 @@ +use super::FillMode; + +impl FillMode { + /// Instantiate a new [`FillMode`] from a u8 value. + /// + /// Returns `None` if the value doesn't match any of the enum's arms. + pub fn from_u8(value: u8) -> Option { + // NOTE: This code will be optimized out, it's only here to make sure this method fails to + // compile if the enum is modified. + match Self::default() { + Self::MajorWireframe | Self::DenseWireframe | Self::Solid => {} + } + + match value { + v if v == Self::MajorWireframe as u8 => Some(Self::MajorWireframe), + v if v == Self::DenseWireframe as u8 => Some(Self::DenseWireframe), + v if v == Self::Solid as u8 => Some(Self::Solid), + _ => None, + } + } +} diff --git a/crates/store/re_types/src/components/mod.rs b/crates/store/re_types/src/components/mod.rs index 7273851612a7..8e327e644274 100644 --- a/crates/store/re_types/src/components/mod.rs +++ b/crates/store/re_types/src/components/mod.rs @@ -12,6 +12,7 @@ mod class_id_ext; mod color; mod color_ext; mod colormap; +mod colormap_ext; mod depth_meter; mod depth_meter_ext; mod disconnected_space; @@ -20,6 +21,7 @@ mod draw_order; mod draw_order_ext; mod entity_path; mod fill_mode; +mod fill_mode_ext; mod fill_ratio; mod fill_ratio_ext; mod gamma_correction; diff --git a/crates/viewer/re_view/src/results_ext.rs b/crates/viewer/re_view/src/results_ext.rs index e69e764482f0..ed5a05b659d5 100644 --- a/crates/viewer/re_view/src/results_ext.rs +++ b/crates/viewer/re_view/src/results_ext.rs @@ -421,8 +421,12 @@ pub struct HybridResultsChunkIter<'a> { impl<'a> HybridResultsChunkIter<'a> { /// Iterate as indexed deserialized batches. /// + /// TODO(#5305): Note that this uses the old codegen'd deserialization path, which does some + /// very unidiomatic Arrow things, and is therefore very slow at the moment. Avoid this on + /// performance critical paths. + /// /// See [`Chunk::iter_component`] for more information. - pub fn component( + pub fn component_slow( &'a self, ) -> impl Iterator)> + 'a { self.chunks.iter().flat_map(move |chunk| { diff --git a/crates/viewer/re_view_graph/src/visualizers/edges.rs b/crates/viewer/re_view_graph/src/visualizers/edges.rs index 4f980e559df1..fac36b789bf5 100644 --- a/crates/viewer/re_view_graph/src/visualizers/edges.rs +++ b/crates/viewer/re_view_graph/src/visualizers/edges.rs @@ -62,7 +62,8 @@ impl VisualizerSystem for EdgesVisualizer { let all_indexed_edges = results.iter_as(query.timeline, components::GraphEdge::name()); let graph_type = results.get_mono_with_fallback::(); - for (_index, edges) in all_indexed_edges.component::() { + // TODO(cmc): Provide a `iter_struct`. + for (_index, edges) in all_indexed_edges.component_slow::() { let edges = edges .iter() .enumerate() diff --git a/crates/viewer/re_view_graph/src/visualizers/nodes.rs b/crates/viewer/re_view_graph/src/visualizers/nodes.rs index d65e45f15c6f..5c13da73385b 100644 --- a/crates/viewer/re_view_graph/src/visualizers/nodes.rs +++ b/crates/viewer/re_view_graph/src/visualizers/nodes.rs @@ -88,8 +88,9 @@ impl VisualizerSystem for NodeVisualizer { .map_or(true, bool::from); let data = range_zip_1x4( - all_indexed_nodes.component::(), - all_colors.component::(), + // TODO(cmc): Provide a `iter_struct`. + all_indexed_nodes.component_slow::(), + all_colors.primitive::(), all_positions.primitive_array::<2, f32>(), all_labels.string(), all_radii.primitive::(), @@ -100,7 +101,7 @@ impl VisualizerSystem for NodeVisualizer { nodes.iter(), (0..).map(Instance::from), colors.unwrap_or_default().iter().map(Option::Some), - Option::<&Color>::default, + Option::<&u32>::default, positions .unwrap_or_default() .iter() @@ -113,7 +114,7 @@ impl VisualizerSystem for NodeVisualizer { Option::::default, ) .map(|(node, instance, color, position, label, radius)| { - let color = color.map(|&c| egui::Color32::from(c)); + let color = color.map(|&c| egui::Color32::from(Color::new(c))); let label = match (label, show_label) { (Some(label), true) => Label::Text { text: label.clone(), diff --git a/crates/viewer/re_view_map/src/visualizers/geo_line_strings.rs b/crates/viewer/re_view_map/src/visualizers/geo_line_strings.rs index 2b2e145d13e2..74550c4f368a 100644 --- a/crates/viewer/re_view_map/src/visualizers/geo_line_strings.rs +++ b/crates/viewer/re_view_map/src/visualizers/geo_line_strings.rs @@ -66,20 +66,20 @@ impl VisualizerSystem for GeoLineStringsVisualizer { // iterate over each chunk and find all relevant component slices for (_index, lines, colors, radii) in re_query::range_zip_1x2( - all_lines.component::(), - all_colors.component::(), - all_radii.component::(), + all_lines.primitive_array_list::<2, f64>(), + all_colors.primitive::(), + all_radii.primitive::(), ) { // required component let lines = lines.as_slice(); // optional components - let colors = colors.as_ref().map(|c| c.as_slice()).unwrap_or(&[]); - let radii = radii.as_ref().map(|r| r.as_slice()).unwrap_or(&[]); + let colors = colors.unwrap_or(&[]); + let radii = radii.unwrap_or(&[]); // optional components values to be used for instance clamping semantics - let last_color = colors.last().copied().unwrap_or(fallback_color); - let last_radii = radii.last().copied().unwrap_or(fallback_radius); + let last_color = colors.last().copied().unwrap_or(fallback_color.0 .0); + let last_radii = radii.last().copied().unwrap_or(fallback_radius.0 .0); // iterate over all instances for (instance_index, (line, color, radius)) in itertools::izip!( @@ -90,13 +90,12 @@ impl VisualizerSystem for GeoLineStringsVisualizer { .enumerate() { batch_data.lines.push( - line.0 - .iter() - .map(|pos| walkers::Position::from_lat_lon(pos.x(), pos.y())) + line.iter() + .map(|pos| walkers::Position::from_lat_lon(pos[0], pos[1])) .collect(), ); - batch_data.radii.push(*radius); - batch_data.colors.push(color.0.into()); + batch_data.radii.push(Radius((*radius).into())); + batch_data.colors.push(Color::new(*color).into()); batch_data .instance_id .push(re_renderer::PickingLayerInstanceId(instance_index as _)); diff --git a/crates/viewer/re_view_map/src/visualizers/geo_points.rs b/crates/viewer/re_view_map/src/visualizers/geo_points.rs index 29f9426e8d05..f904049f8893 100644 --- a/crates/viewer/re_view_map/src/visualizers/geo_points.rs +++ b/crates/viewer/re_view_map/src/visualizers/geo_points.rs @@ -69,13 +69,12 @@ impl VisualizerSystem for GeoPointsVisualizer { // iterate over each chunk and find all relevant component slices for (_index, positions, colors, radii, class_ids) in re_query::range_zip_1x3( - all_positions.component::(), + all_positions.primitive_array::<2, f64>(), all_colors.primitive::(), - all_radii.component::(), + all_radii.primitive::(), all_class_ids.primitive::(), ) { // required component - let positions = positions.as_slice(); let num_instances = positions.len(); // Resolve annotation info (if needed). @@ -94,10 +93,10 @@ impl VisualizerSystem for GeoPointsVisualizer { &annotation_infos, colors.map_or(&[], |colors| bytemuck::cast_slice(colors)), ); - let radii = radii.as_ref().map(|r| r.as_slice()).unwrap_or(&[]); + let radii = radii.unwrap_or(&[]); // optional components values to be used for instance clamping semantics - let last_radii = radii.last().copied().unwrap_or(fallback_radius); + let last_radii = radii.last().copied().unwrap_or(fallback_radius.0 .0); // iterate over all instances for (instance_index, (position, color, radius)) in itertools::izip!( @@ -107,11 +106,10 @@ impl VisualizerSystem for GeoPointsVisualizer { ) .enumerate() { - batch_data.positions.push(walkers::Position::from_lat_lon( - position.latitude(), - position.longitude(), - )); - batch_data.radii.push(*radius); + batch_data + .positions + .push(walkers::Position::from_lat_lon(position[0], position[1])); + batch_data.radii.push(Radius((*radius).into())); batch_data.colors.push(*color); batch_data .instance_id diff --git a/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs b/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs index e8a01ee5a988..c9d062306b2c 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs @@ -244,7 +244,8 @@ impl VisualizerSystem for Arrows2DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - all_show_labels.component::(), + // TODO(cmc): provide a `iter_bool`. + all_show_labels.component_slow::(), ) .map( |( diff --git a/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs b/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs index 5249863867f3..401afd9ec21f 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs @@ -241,7 +241,7 @@ impl VisualizerSystem for Arrows3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |(_index, vectors, origins, colors, radii, labels, class_ids, show_labels)| { diff --git a/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs b/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs index 5f05e0f649c1..bd451dd39f72 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs @@ -245,7 +245,7 @@ impl VisualizerSystem for Boxes2DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |( diff --git a/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs b/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs index 40dfe1adbf05..9853118eab2b 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs @@ -159,9 +159,11 @@ impl VisualizerSystem for Boxes3DVisualizer { let all_fill_modes = results.iter_as(timeline, FillMode::name()); // fill mode is currently a non-repeated component let fill_mode: FillMode = all_fill_modes - .component::() + .primitive::() .next() - .and_then(|(_, fill_modes)| fill_modes.as_slice().first().copied()) + .and_then(|(_, fill_modes)| { + fill_modes.first().copied().and_then(FillMode::from_u8) + }) .unwrap_or_default(); match fill_mode { @@ -181,7 +183,7 @@ impl VisualizerSystem for Boxes3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |(_index, half_sizes, colors, radii, labels, class_ids, show_labels)| { diff --git a/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs b/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs index a397cb80f8af..70705080e575 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs @@ -195,7 +195,7 @@ impl VisualizerSystem for Capsules3DVisualizer { all_radii_indexed, all_colors.primitive::(), all_labels.string(), - all_show_labels.component::(), + all_show_labels.component_slow::(), all_class_ids.primitive::(), ) .map( diff --git a/crates/viewer/re_view_spatial/src/visualizers/depth_images.rs b/crates/viewer/re_view_spatial/src/visualizers/depth_images.rs index 6d5fbbf68dee..94c53af9c08b 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/depth_images.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/depth_images.rs @@ -292,7 +292,7 @@ impl VisualizerSystem for DepthImageVisualizer { let mut data = re_query::range_zip_1x5( all_buffers_indexed, all_formats_indexed, - all_colormaps.component::(), + all_colormaps.primitive::(), all_value_ranges.primitive_array::<2, f64>(), all_depth_meters.primitive::(), all_fill_ratios.primitive::(), @@ -310,7 +310,7 @@ impl VisualizerSystem for DepthImageVisualizer { }, depth_meter: first_copied(depth_meter).map(Into::into), fill_ratio: first_copied(fill_ratio).map(Into::into), - colormap: first_copied(colormap.as_deref()), + colormap: first_copied(colormap).and_then(Colormap::from_u8), value_range: first_copied(value_range).map(Into::into), }) }, diff --git a/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs b/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs index db2add13a89c..fd52a0269b02 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs @@ -178,10 +178,10 @@ impl VisualizerSystem for Ellipsoids3DVisualizer { all_half_sizes_indexed, all_colors.primitive::(), all_line_radii.primitive::(), - all_fill_modes.component::(), + all_fill_modes.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |( @@ -204,6 +204,7 @@ impl VisualizerSystem for Ellipsoids3DVisualizer { .unwrap_or_default() .first() .copied() + .and_then(FillMode::from_u8) .unwrap_or_default(), labels: labels.unwrap_or_default(), class_ids: class_ids diff --git a/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs b/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs index c922ec9ecc22..009b33a3f5dc 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs @@ -232,7 +232,7 @@ impl VisualizerSystem for Lines2DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |(_index, strips, colors, radii, labels, class_ids, show_labels)| { diff --git a/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs b/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs index d8dc908f8458..31d33029c371 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs @@ -236,7 +236,7 @@ impl VisualizerSystem for Lines3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |(_index, strips, colors, radii, labels, class_ids, show_labels)| { diff --git a/crates/viewer/re_view_spatial/src/visualizers/meshes.rs b/crates/viewer/re_view_spatial/src/visualizers/meshes.rs index 09a73e05bea5..d5e83f60f9d2 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/meshes.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/meshes.rs @@ -214,8 +214,10 @@ impl VisualizerSystem for Mesh3DVisualizer { all_vertex_texcoords.primitive_array::<2, f32>(), all_triangle_indices.primitive_array::<3, u32>(), all_albedo_factors.primitive::(), - all_albedo_buffers.component::(), - all_albedo_formats.component::(), + // TODO(cmc): Provide a `iter_blob`. + all_albedo_buffers.component_slow::(), + // Legit call to `component_slow`, `ImageFormat` is real complicated. + all_albedo_formats.component_slow::(), all_class_ids.primitive::(), ) .map( diff --git a/crates/viewer/re_view_spatial/src/visualizers/points2d.rs b/crates/viewer/re_view_spatial/src/visualizers/points2d.rs index 55bb5eb9908c..8929bec8da31 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/points2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/points2d.rs @@ -251,7 +251,7 @@ impl VisualizerSystem for Points2DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |( diff --git a/crates/viewer/re_view_spatial/src/visualizers/points3d.rs b/crates/viewer/re_view_spatial/src/visualizers/points3d.rs index 4860a6f6128c..57abfef3309a 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/points3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/points3d.rs @@ -241,7 +241,7 @@ impl VisualizerSystem for Points3DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - all_show_labels.component::(), + all_show_labels.component_slow::(), ) .map( |( diff --git a/crates/viewer/re_view_tensor/src/visualizer_system.rs b/crates/viewer/re_view_tensor/src/visualizer_system.rs index ce6bd9a18858..aa5e0cbd2412 100644 --- a/crates/viewer/re_view_tensor/src/visualizer_system.rs +++ b/crates/viewer/re_view_tensor/src/visualizer_system.rs @@ -69,13 +69,18 @@ impl VisualizerSystem for TensorSystem { let all_ranges = results.iter_as(timeline, ValueRange::name()); for ((_, tensor_row_id), tensors, data_ranges) in - re_query::range_zip_1x1(all_tensors_indexed, all_ranges.component::()) + re_query::range_zip_1x1(all_tensors_indexed, all_ranges.primitive_array::<2, f64>()) { let Some(tensor) = tensors.first() else { continue; }; let data_range = data_ranges - .and_then(|ranges| ranges.first().copied()) + .and_then(|ranges| { + ranges + .first() + .copied() + .map(|range| ValueRange(range.into())) + }) .unwrap_or_else(|| { let tensor_stats = ctx .viewer_ctx diff --git a/crates/viewer/re_view_text_log/src/visualizer_system.rs b/crates/viewer/re_view_text_log/src/visualizer_system.rs index 9440dbf5883d..d6330d8b842d 100644 --- a/crates/viewer/re_view_text_log/src/visualizer_system.rs +++ b/crates/viewer/re_view_text_log/src/visualizer_system.rs @@ -111,7 +111,7 @@ impl TextLogSystem { let all_frames = range_zip_1x2( all_texts.string(), - all_levels.component(), + all_levels.string(), all_colors.primitive::(), ); @@ -139,7 +139,7 @@ impl TextLogSystem { timepoint: timepoint.clone(), color, body: text.clone().into(), - level, + level: level.clone().map(Into::into), }); } } From 2c72d87c291cb46fa6be11d006522afbce55de18 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 19 Dec 2024 13:48:30 +0100 Subject: [PATCH 02/11] Find and annihilate slow boolean-component iterators (#8541) * Follow-up to #8540 * introduce `iter_bool` * annihilate a bunch of `component_slow` using it --- crates/store/re_chunk/src/iter.rs | 50 +++++++++++++++++-- crates/viewer/re_view/src/results_ext.rs | 14 +++++- .../src/visualizers/arrows2d.rs | 5 +- .../src/visualizers/arrows3d.rs | 4 +- .../src/visualizers/boxes2d.rs | 4 +- .../src/visualizers/boxes3d.rs | 4 +- .../src/visualizers/capsules3d.rs | 4 +- .../src/visualizers/ellipsoids.rs | 4 +- .../src/visualizers/lines2d.rs | 4 +- .../src/visualizers/lines3d.rs | 4 +- .../src/visualizers/points2d.rs | 4 +- .../src/visualizers/points3d.rs | 4 +- 12 files changed, 80 insertions(+), 25 deletions(-) diff --git a/crates/store/re_chunk/src/iter.rs b/crates/store/re_chunk/src/iter.rs index fd212996822c..c417e814c6ad 100644 --- a/crates/store/re_chunk/src/iter.rs +++ b/crates/store/re_chunk/src/iter.rs @@ -2,10 +2,11 @@ use std::sync::Arc; use arrow2::{ array::{ - Array as Arrow2Array, FixedSizeListArray as Arrow2FixedSizeListArray, - ListArray as Arrow2ListArray, PrimitiveArray as Arrow2PrimitiveArray, - Utf8Array as Arrow2Utf8Array, + Array as Arrow2Array, BooleanArray as Arrow2BooleanArray, + FixedSizeListArray as Arrow2FixedSizeListArray, ListArray as Arrow2ListArray, + PrimitiveArray as Arrow2PrimitiveArray, Utf8Array as Arrow2Utf8Array, }, + bitmap::Bitmap as Arrow2Bitmap, Either, }; use itertools::{izip, Itertools}; @@ -264,6 +265,49 @@ impl Chunk { ) } + /// Returns an iterator over the raw boolean values of a [`Chunk`], for a given component. + /// + /// This is a very fast path: the entire column will be downcasted at once, and then every + /// component batch will be a slice reference into that global slice. + /// Use this when working with simple arrow datatypes and performance matters. + /// + /// See also: + /// * [`Self::iter_primitive_array`] + /// * [`Self::iter_primitive_array_list`] + /// * [`Self::iter_string`] + /// * [`Self::iter_buffer`]. + /// * [`Self::iter_component_arrays`]. + /// * [`Self::iter_component`]. + #[inline] + pub fn iter_bool( + &self, + component_name: &ComponentName, + ) -> impl Iterator + '_ { + let Some(list_array) = self.get_first_component(component_name) else { + return Either::Left(std::iter::empty()); + }; + + let Some(values) = list_array + .values() + .as_any() + .downcast_ref::() + else { + if cfg!(debug_assertions) { + panic!("downcast failed for {component_name}, data discarded"); + } else { + re_log::error_once!("downcast failed for {component_name}, data discarded"); + } + return Either::Left(std::iter::empty()); + }; + let values = values.values().clone(); + + // NOTE: No need for validity checks here, `iter_offsets` already takes care of that. + Either::Right( + self.iter_component_offsets(component_name) + .map(move |(idx, len)| values.clone().sliced(idx, len)), + ) + } + /// Returns an iterator over the raw primitive arrays of a [`Chunk`], for a given component. /// /// This is a very fast path: the entire column will be downcasted at once, and then every diff --git a/crates/viewer/re_view/src/results_ext.rs b/crates/viewer/re_view/src/results_ext.rs index ed5a05b659d5..8e4118a48519 100644 --- a/crates/viewer/re_view/src/results_ext.rs +++ b/crates/viewer/re_view/src/results_ext.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use itertools::Itertools as _; use re_chunk_store::{Chunk, LatestAtQuery, RangeQuery, UnitChunkShared}; -use re_log_types::external::arrow2::array::Array as Arrow2Array; +use re_log_types::external::arrow2::{array::Array as Arrow2Array, bitmap::Bitmap as Arrow2Bitmap}; use re_log_types::hash::Hash64; use re_query::{LatestAtResults, RangeResults}; use re_types_core::ComponentName; @@ -437,6 +437,18 @@ impl<'a> HybridResultsChunkIter<'a> { }) } + /// Iterate as indexed booleans. + /// + /// See [`Chunk::iter_bool`] for more information. + pub fn bool(&'a self) -> impl Iterator + 'a { + self.chunks.iter().flat_map(move |chunk| { + itertools::izip!( + chunk.iter_component_indices(&self.timeline, &self.component_name), + chunk.iter_bool(&self.component_name) + ) + }) + } + /// Iterate as indexed primitives. /// /// See [`Chunk::iter_primitive`] for more information. diff --git a/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs b/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs index c9d062306b2c..93b2e76457a6 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/arrows2d.rs @@ -244,8 +244,7 @@ impl VisualizerSystem for Arrows2DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - // TODO(cmc): provide a `iter_bool`. - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |( @@ -269,7 +268,7 @@ impl VisualizerSystem for Arrows2DVisualizer { .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), keypoint_ids: keypoint_ids .map_or(&[], |keypoint_ids| bytemuck::cast_slice(keypoint_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs b/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs index 401afd9ec21f..2e02f969f53d 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/arrows3d.rs @@ -241,7 +241,7 @@ impl VisualizerSystem for Arrows3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |(_index, vectors, origins, colors, radii, labels, class_ids, show_labels)| { @@ -253,7 +253,7 @@ impl VisualizerSystem for Arrows3DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs b/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs index bd451dd39f72..2a236f2cd3e6 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/boxes2d.rs @@ -245,7 +245,7 @@ impl VisualizerSystem for Boxes2DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |( @@ -266,7 +266,7 @@ impl VisualizerSystem for Boxes2DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs b/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs index 9853118eab2b..2d48e092ed32 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/boxes3d.rs @@ -183,7 +183,7 @@ impl VisualizerSystem for Boxes3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |(_index, half_sizes, colors, radii, labels, class_ids, show_labels)| { @@ -196,7 +196,7 @@ impl VisualizerSystem for Boxes3DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs b/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs index 70705080e575..a2e2c5f1b41c 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/capsules3d.rs @@ -195,7 +195,7 @@ impl VisualizerSystem for Capsules3DVisualizer { all_radii_indexed, all_colors.primitive::(), all_labels.string(), - all_show_labels.component_slow::(), + all_show_labels.bool(), all_class_ids.primitive::(), ) .map( @@ -207,7 +207,7 @@ impl VisualizerSystem for Capsules3DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs b/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs index fd52a0269b02..fa4f55c57f6c 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/ellipsoids.rs @@ -181,7 +181,7 @@ impl VisualizerSystem for Ellipsoids3DVisualizer { all_fill_modes.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |( @@ -209,7 +209,7 @@ impl VisualizerSystem for Ellipsoids3DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs b/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs index 009b33a3f5dc..d5b5db1f7cae 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/lines2d.rs @@ -232,7 +232,7 @@ impl VisualizerSystem for Lines2DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |(_index, strips, colors, radii, labels, class_ids, show_labels)| { @@ -243,7 +243,7 @@ impl VisualizerSystem for Lines2DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs b/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs index 31d33029c371..9ef6d4511fb2 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/lines3d.rs @@ -236,7 +236,7 @@ impl VisualizerSystem for Lines3DVisualizer { all_radii.primitive::(), all_labels.string(), all_class_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |(_index, strips, colors, radii, labels, class_ids, show_labels)| { @@ -247,7 +247,7 @@ impl VisualizerSystem for Lines3DVisualizer { labels: labels.unwrap_or_default(), class_ids: class_ids .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/points2d.rs b/crates/viewer/re_view_spatial/src/visualizers/points2d.rs index 8929bec8da31..2b54e568c1d7 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/points2d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/points2d.rs @@ -251,7 +251,7 @@ impl VisualizerSystem for Points2DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |( @@ -273,7 +273,7 @@ impl VisualizerSystem for Points2DVisualizer { .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), keypoint_ids: keypoint_ids .map_or(&[], |keypoint_ids| bytemuck::cast_slice(keypoint_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); diff --git a/crates/viewer/re_view_spatial/src/visualizers/points3d.rs b/crates/viewer/re_view_spatial/src/visualizers/points3d.rs index 57abfef3309a..7928fea07477 100644 --- a/crates/viewer/re_view_spatial/src/visualizers/points3d.rs +++ b/crates/viewer/re_view_spatial/src/visualizers/points3d.rs @@ -241,7 +241,7 @@ impl VisualizerSystem for Points3DVisualizer { all_labels.string(), all_class_ids.primitive::(), all_keypoint_ids.primitive::(), - all_show_labels.component_slow::(), + all_show_labels.bool(), ) .map( |( @@ -263,7 +263,7 @@ impl VisualizerSystem for Points3DVisualizer { .map_or(&[], |class_ids| bytemuck::cast_slice(class_ids)), keypoint_ids: keypoint_ids .map_or(&[], |keypoint_ids| bytemuck::cast_slice(keypoint_ids)), - show_labels: show_labels.unwrap_or_default().first().copied(), + show_labels: show_labels.unwrap_or_default().get(0).map(Into::into), } }, ); From 662e404f53148ad65b1d90cae9182c27b769bcde Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 19 Dec 2024 14:21:17 +0100 Subject: [PATCH 03/11] Port parts of viewer to `arrow-rs` (#8534) ### Related * Part if https://github.com/rerun-io/rerun/issues/3741 ### TODO * [x] `@rerun-bot full-check` --- Cargo.lock | 6 + .../src/codegen/rust/reflection.rs | 2 +- crates/store/re_chunk/src/builder.rs | 22 +- crates/store/re_chunk/src/helpers.rs | 16 +- crates/store/re_chunk/src/lib.rs | 1 + crates/store/re_chunk/src/merge.rs | 4 +- crates/store/re_chunk_store/tests/gc.rs | 2 +- crates/store/re_chunk_store/tests/reads.rs | 2 +- crates/store/re_query/examples/latest_at.rs | 2 +- crates/store/re_query/src/latest_at.rs | 15 +- crates/store/re_types/src/lib.rs | 1 + crates/store/re_types/src/reflection/mod.rs | 212 ++++---- .../store/re_types_core/src/loggable_batch.rs | 5 + crates/store/re_types_core/src/reflection.rs | 4 +- .../arrow2_sizes.rs} | 502 +++++------------- .../src/size_bytes/arrow_sizes.rs | 17 + .../store/re_types_core/src/size_bytes/mod.rs | 270 ++++++++++ .../viewer/re_chunk_store_ui/src/arrow_ui.rs | 2 +- .../viewer/re_chunk_store_ui/src/chunk_ui.rs | 2 +- crates/viewer/re_component_ui/Cargo.toml | 1 + .../src/datatype_uis/singleline_string.rs | 9 +- .../viewer/re_component_ui/src/fallback_ui.rs | 12 +- .../re_data_ui/src/component_ui_registry.rs | 2 +- crates/viewer/re_selection_panel/Cargo.toml | 1 + .../re_selection_panel/src/visualizer_ui.rs | 22 +- crates/viewer/re_view/Cargo.toml | 1 + crates/viewer/re_view/src/query.rs | 7 +- crates/viewer/re_view/src/results_ext.rs | 9 +- crates/viewer/re_view_dataframe/Cargo.toml | 1 + .../src/display_record_batch.rs | 4 +- .../src/line_visualizer_system.rs | 10 +- .../src/point_visualizer_system.rs | 10 +- .../re_viewer/src/blueprint/validation.rs | 2 +- crates/viewer/re_viewer_context/Cargo.toml | 1 + .../src/blueprint_helpers.rs | 9 +- .../src/component_fallbacks.rs | 14 +- .../src/component_ui_registry.rs | 70 ++- .../src/view/view_context.rs | 3 +- .../re_viewer_context/src/viewer_context.rs | 8 +- .../viewer/re_viewport_blueprint/Cargo.toml | 1 + .../src/view_properties.rs | 22 +- examples/rust/extend_viewer_ui/src/main.rs | 6 +- 42 files changed, 694 insertions(+), 618 deletions(-) rename crates/store/re_types_core/src/{size_bytes.rs => size_bytes/arrow2_sizes.rs} (71%) create mode 100644 crates/store/re_types_core/src/size_bytes/arrow_sizes.rs create mode 100644 crates/store/re_types_core/src/size_bytes/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 12ac9a4c6699..222719c60112 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5701,6 +5701,7 @@ dependencies = [ name = "re_component_ui" version = "0.22.0-alpha.1+dev" dependencies = [ + "arrow", "egui", "egui_extras", "egui_plot", @@ -6297,6 +6298,7 @@ dependencies = [ name = "re_selection_panel" version = "0.22.0-alpha.1+dev" dependencies = [ + "arrow", "egui", "egui_tiles", "itertools 0.13.0", @@ -6559,6 +6561,7 @@ dependencies = [ "glam", "itertools 0.13.0", "nohash-hasher", + "re_arrow2", "re_chunk_store", "re_entity_db", "re_log", @@ -6596,6 +6599,7 @@ name = "re_view_dataframe" version = "0.22.0-alpha.1+dev" dependencies = [ "anyhow", + "arrow", "egui", "egui_table", "itertools 0.13.0", @@ -6872,6 +6876,7 @@ dependencies = [ "ahash", "anyhow", "arboard", + "arrow", "bit-vec", "bitflags 2.6.0", "bytemuck", @@ -6950,6 +6955,7 @@ name = "re_viewport_blueprint" version = "0.22.0-alpha.1+dev" dependencies = [ "ahash", + "arrow", "egui", "egui_tiles", "itertools 0.13.0", diff --git a/crates/build/re_types_builder/src/codegen/rust/reflection.rs b/crates/build/re_types_builder/src/codegen/rust/reflection.rs index d347ba243cfb..191dde948f92 100644 --- a/crates/build/re_types_builder/src/codegen/rust/reflection.rs +++ b/crates/build/re_types_builder/src/codegen/rust/reflection.rs @@ -137,7 +137,7 @@ fn generate_component_reflection( || contents.contains(&format!("impl Default for super::{}", &obj.name)) }); let custom_placeholder = if auto_derive_default || has_custom_default_impl { - quote! { Some(#type_name::default().to_arrow2()?) } + quote! { Some(#type_name::default().to_arrow()?) } } else { quote! { None } }; diff --git a/crates/store/re_chunk/src/builder.rs b/crates/store/re_chunk/src/builder.rs index 48ff0facdad4..8834e673d7c8 100644 --- a/crates/store/re_chunk/src/builder.rs +++ b/crates/store/re_chunk/src/builder.rs @@ -1,3 +1,4 @@ +use arrow::array::ArrayRef; use arrow2::{ array::{Array as Arrow2Array, PrimitiveArray as Arrow2PrimitiveArray}, datatypes::DataType as Arrow2Datatype, @@ -102,6 +103,23 @@ impl ChunkBuilder { /// Add a row's worth of data using the given component data. #[inline] pub fn with_row( + self, + row_id: RowId, + timepoint: impl Into, + components: impl IntoIterator, + ) -> Self { + self.with_sparse_row( + row_id, + timepoint, + components + .into_iter() + .map(|(component_descr, array)| (component_descr, Some(array.into()))), + ) + } + + /// Add a row's worth of data using the given component data. + #[inline] + pub fn with_row_arrow2( self, row_id: RowId, timepoint: impl Into, @@ -142,7 +160,7 @@ impl ChunkBuilder { timepoint: impl Into, component_batch: &dyn ComponentBatch, ) -> Self { - self.with_row( + self.with_row_arrow2( row_id, timepoint, component_batch @@ -160,7 +178,7 @@ impl ChunkBuilder { timepoint: impl Into, component_batches: impl IntoIterator, ) -> Self { - self.with_row( + self.with_row_arrow2( row_id, timepoint, component_batches.into_iter().filter_map(|component_batch| { diff --git a/crates/store/re_chunk/src/helpers.rs b/crates/store/re_chunk/src/helpers.rs index 1b345c58e560..4e1ac8ddaf5b 100644 --- a/crates/store/re_chunk/src/helpers.rs +++ b/crates/store/re_chunk/src/helpers.rs @@ -1,5 +1,6 @@ use std::sync::Arc; +use arrow::array::ArrayRef; use arrow2::array::Array as Arrow2Array; use re_log_types::{TimeInt, Timeline}; @@ -262,7 +263,14 @@ impl UnitChunkShared { /// Returns the raw data for the specified component. #[inline] - pub fn component_batch_raw( + pub fn component_batch_raw(&self, component_name: &ComponentName) -> Option { + self.component_batch_raw_arrow2(component_name) + .map(|array| array.into()) + } + + /// Returns the raw data for the specified component. + #[inline] + pub fn component_batch_raw_arrow2( &self, component_name: &ComponentName, ) -> Option> { @@ -276,7 +284,7 @@ impl UnitChunkShared { /// Returns an error if the data cannot be deserialized. #[inline] pub fn component_batch(&self) -> Option>> { - let data = C::from_arrow2(&*self.component_batch_raw(&C::name())?); + let data = C::from_arrow2(&*self.component_batch_raw_arrow2(&C::name())?); Some(data.map_err(Into::into)) } @@ -291,7 +299,7 @@ impl UnitChunkShared { component_name: &ComponentName, instance_index: usize, ) -> Option>> { - let array = self.component_batch_raw(component_name)?; + let array = self.component_batch_raw_arrow2(component_name)?; if array.len() > instance_index { Some(Ok(array.sliced(instance_index, 1))) } else { @@ -334,7 +342,7 @@ impl UnitChunkShared { &self, component_name: &ComponentName, ) -> Option>> { - let array = self.component_batch_raw(component_name)?; + let array = self.component_batch_raw_arrow2(component_name)?; if array.len() == 1 { Some(Ok(array.sliced(0, 1))) } else { diff --git a/crates/store/re_chunk/src/lib.rs b/crates/store/re_chunk/src/lib.rs index 159b47d44ca5..564885c20101 100644 --- a/crates/store/re_chunk/src/lib.rs +++ b/crates/store/re_chunk/src/lib.rs @@ -48,6 +48,7 @@ pub use re_log_types::{EntityPath, TimeInt, TimePoint, Timeline, TimelineName}; pub use re_types_core::{ArchetypeFieldName, ArchetypeName, ComponentName}; pub mod external { + pub use arrow; pub use arrow2; pub use nohash_hasher; diff --git a/crates/store/re_chunk/src/merge.rs b/crates/store/re_chunk/src/merge.rs index e61467ab69c2..1777e94655cd 100644 --- a/crates/store/re_chunk/src/merge.rs +++ b/crates/store/re_chunk/src/merge.rs @@ -804,7 +804,7 @@ mod tests { ::to_arrow2(&MyPoint64::new(1.0, 1.0))?; let chunk1 = Chunk::builder(entity_path.into()) - .with_row( + .with_row_arrow2( row_id1, timepoint1, [ @@ -814,7 +814,7 @@ mod tests { .build()?; let chunk2 = Chunk::builder(entity_path.into()) - .with_row( + .with_row_arrow2( row_id2, timepoint2, [ diff --git a/crates/store/re_chunk_store/tests/gc.rs b/crates/store/re_chunk_store/tests/gc.rs index d461fe2ac79e..561ab67e4e30 100644 --- a/crates/store/re_chunk_store/tests/gc.rs +++ b/crates/store/re_chunk_store/tests/gc.rs @@ -37,7 +37,7 @@ fn query_latest_array( }) .max_by_key(|(index, _chunk)| *index)?; - unit.component_batch_raw(&component_name) + unit.component_batch_raw_arrow2(&component_name) .map(|array| (data_time, row_id, array)) } diff --git a/crates/store/re_chunk_store/tests/reads.rs b/crates/store/re_chunk_store/tests/reads.rs index 66b12f3b29ee..f3c48013d7df 100644 --- a/crates/store/re_chunk_store/tests/reads.rs +++ b/crates/store/re_chunk_store/tests/reads.rs @@ -39,7 +39,7 @@ fn query_latest_array( }) .max_by_key(|(index, _chunk)| *index)?; - unit.component_batch_raw(&component_desc.component_name) + unit.component_batch_raw_arrow2(&component_desc.component_name) .map(|array| (data_time, row_id, array)) } diff --git a/crates/store/re_query/examples/latest_at.rs b/crates/store/re_query/examples/latest_at.rs index 7ef6a93abb4c..2cfc8136dbb1 100644 --- a/crates/store/re_query/examples/latest_at.rs +++ b/crates/store/re_query/examples/latest_at.rs @@ -74,7 +74,7 @@ fn main() -> anyhow::Result<()> { // data directly: let colors = colors .context("missing")? - .component_batch_raw(&MyColor::name()) + .component_batch_raw_arrow2(&MyColor::name()) .context("invalid")?; let colors = colors .as_any() diff --git a/crates/store/re_query/src/latest_at.rs b/crates/store/re_query/src/latest_at.rs index a9b61bcaa627..2bca910b2d12 100644 --- a/crates/store/re_query/src/latest_at.rs +++ b/crates/store/re_query/src/latest_at.rs @@ -12,7 +12,8 @@ use re_chunk::{Chunk, RowId, UnitChunkShared}; use re_chunk_store::{ChunkStore, LatestAtQuery, TimeInt}; use re_log_types::EntityPath; use re_types_core::{ - components::ClearIsRecursive, Component, ComponentDescriptor, ComponentName, SizeBytes, + components::ClearIsRecursive, external::arrow::array::ArrayRef, Component, ComponentDescriptor, + ComponentName, SizeBytes, }; use crate::{QueryCache, QueryCacheKey, QueryError}; @@ -313,13 +314,21 @@ impl LatestAtResults { /// Returns the raw data for the specified component. #[inline] - pub fn component_batch_raw( + pub fn component_batch_raw(&self, component_name: &ComponentName) -> Option { + self.components + .get(component_name)? + .component_batch_raw(component_name) + } + + /// Returns the raw data for the specified component. + #[inline] + pub fn component_batch_raw_arrow2( &self, component_name: &ComponentName, ) -> Option> { self.components .get(component_name) - .and_then(|unit| unit.component_batch_raw(component_name)) + .and_then(|unit| unit.component_batch_raw_arrow2(component_name)) } /// Returns the deserialized data for the specified component. diff --git a/crates/store/re_types/src/lib.rs b/crates/store/re_types/src/lib.rs index 9ad5c1d25cf2..3e75dcfa6fd4 100644 --- a/crates/store/re_types/src/lib.rs +++ b/crates/store/re_types/src/lib.rs @@ -277,6 +277,7 @@ pub mod external { pub use re_types_core; pub use anyhow; + pub use arrow; pub use arrow2; pub use ndarray; pub use uuid; diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index cd1537ad937b..7318042dcd70 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -37,7 +37,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The active tab in a tabbed container.", - custom_placeholder: Some(ActiveTab::default().to_arrow2()?), + custom_placeholder: Some(ActiveTab::default().to_arrow()?), datatype: ActiveTab::arrow2_datatype(), }, ), @@ -45,7 +45,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether empty cells in a dataframe should be filled with a latest-at query.", - custom_placeholder: Some(ApplyLatestAt::default().to_arrow2()?), + custom_placeholder: Some(ApplyLatestAt::default().to_arrow()?), datatype: ApplyLatestAt::arrow2_datatype(), }, ), @@ -53,7 +53,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether the viewport layout is determined automatically.", - custom_placeholder: Some(AutoLayout::default().to_arrow2()?), + custom_placeholder: Some(AutoLayout::default().to_arrow()?), datatype: AutoLayout::arrow2_datatype(), }, ), @@ -61,7 +61,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether or not views should be created automatically.", - custom_placeholder: Some(AutoViews::default().to_arrow2()?), + custom_placeholder: Some(AutoViews::default().to_arrow()?), datatype: AutoViews::arrow2_datatype(), }, ), @@ -69,7 +69,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The type of the background in a view.", - custom_placeholder: Some(BackgroundKind::default().to_arrow2()?), + custom_placeholder: Some(BackgroundKind::default().to_arrow()?), datatype: BackgroundKind::arrow2_datatype(), }, ), @@ -77,7 +77,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The layout share of a column in the container.", - custom_placeholder: Some(ColumnShare::default().to_arrow2()?), + custom_placeholder: Some(ColumnShare::default().to_arrow()?), datatype: ColumnShare::arrow2_datatype(), }, ), @@ -85,9 +85,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Describe a component column to be selected in the dataframe view.", - custom_placeholder: Some( - ComponentColumnSelector::default().to_arrow2()?, - ), + custom_placeholder: Some(ComponentColumnSelector::default().to_arrow()?), datatype: ComponentColumnSelector::arrow2_datatype(), }, ), @@ -95,7 +93,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The kind of a blueprint container (tabs, grid, …).", - custom_placeholder: Some(ContainerKind::default().to_arrow2()?), + custom_placeholder: Some(ContainerKind::default().to_arrow()?), datatype: ContainerKind::arrow2_datatype(), }, ), @@ -103,7 +101,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "One of four 2D corners, typically used to align objects.", - custom_placeholder: Some(Corner2D::default().to_arrow2()?), + custom_placeholder: Some(Corner2D::default().to_arrow()?), datatype: Corner2D::arrow2_datatype(), }, ), @@ -111,7 +109,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether a procedure is enabled.", - custom_placeholder: Some(Enabled::default().to_arrow2()?), + custom_placeholder: Some(Enabled::default().to_arrow()?), datatype: Enabled::arrow2_datatype(), }, ), @@ -119,7 +117,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Configuration for a filter-by-range feature of the dataframe view.", - custom_placeholder: Some(FilterByRange::default().to_arrow2()?), + custom_placeholder: Some(FilterByRange::default().to_arrow()?), datatype: FilterByRange::arrow2_datatype(), }, ), @@ -127,7 +125,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Configuration for the filter is not null feature of the dataframe view.", - custom_placeholder: Some(FilterIsNotNull::default().to_arrow2()?), + custom_placeholder: Some(FilterIsNotNull::default().to_arrow()?), datatype: FilterIsNotNull::arrow2_datatype(), }, ), @@ -135,7 +133,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The target distance between two nodes.\n\nThis is helpful to scale the layout, for example if long labels are involved.", - custom_placeholder: Some(ForceDistance::default().to_arrow2()?), + custom_placeholder: Some(ForceDistance::default().to_arrow()?), datatype: ForceDistance::arrow2_datatype(), }, ), @@ -143,7 +141,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Specifies how often this force should be applied per iteration.\n\nIncreasing this parameter can lead to better results at the cost of longer computation time.", - custom_placeholder: Some(ForceIterations::default().to_arrow2()?), + custom_placeholder: Some(ForceIterations::default().to_arrow()?), datatype: ForceIterations::arrow2_datatype(), }, ), @@ -151,7 +149,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The strength of a given force.\n\nAllows to assign different weights to the individual forces, prioritizing one over the other.", - custom_placeholder: Some(ForceStrength::default().to_arrow2()?), + custom_placeholder: Some(ForceStrength::default().to_arrow()?), datatype: ForceStrength::arrow2_datatype(), }, ), @@ -159,7 +157,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "How many columns a grid container should have.", - custom_placeholder: Some(GridColumns::default().to_arrow2()?), + custom_placeholder: Some(GridColumns::default().to_arrow()?), datatype: GridColumns::arrow2_datatype(), }, ), @@ -167,7 +165,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Space between grid lines of one line to the next in scene units.", - custom_placeholder: Some(GridSpacing::default().to_arrow2()?), + custom_placeholder: Some(GridSpacing::default().to_arrow()?), datatype: GridSpacing::arrow2_datatype(), }, ), @@ -175,7 +173,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "All the contents in the container.", - custom_placeholder: Some(IncludedContent::default().to_arrow2()?), + custom_placeholder: Some(IncludedContent::default().to_arrow()?), datatype: IncludedContent::arrow2_datatype(), }, ), @@ -183,7 +181,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether the entity can be interacted with.\n\nNon interactive components are still visible, but mouse interactions in the view are disabled.", - custom_placeholder: Some(Interactive::default().to_arrow2()?), + custom_placeholder: Some(Interactive::default().to_arrow()?), datatype: Interactive::arrow2_datatype(), }, ), @@ -191,7 +189,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Indicate whether the range should be locked when zooming in on the data.\n\nDefault is `false`, i.e. zoom will change the visualized range.", - custom_placeholder: Some(LockRangeDuringZoom::default().to_arrow2()?), + custom_placeholder: Some(LockRangeDuringZoom::default().to_arrow()?), datatype: LockRangeDuringZoom::arrow2_datatype(), }, ), @@ -199,7 +197,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Name of the map provider to be used in Map views.", - custom_placeholder: Some(MapProvider::default().to_arrow2()?), + custom_placeholder: Some(MapProvider::default().to_arrow()?), datatype: MapProvider::arrow2_datatype(), }, ), @@ -207,7 +205,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Distance to the near clip plane used for `Spatial2DView`.", - custom_placeholder: Some(NearClipPlane::default().to_arrow2()?), + custom_placeholder: Some(NearClipPlane::default().to_arrow()?), datatype: NearClipPlane::arrow2_datatype(), }, ), @@ -215,7 +213,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Tri-state for panel controls.", - custom_placeholder: Some(PanelState::default().to_arrow2()?), + custom_placeholder: Some(PanelState::default().to_arrow()?), datatype: PanelState::arrow2_datatype(), }, ), @@ -223,7 +221,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "An individual query expression used to filter a set of [`datatypes.EntityPath`](https://rerun.io/docs/reference/types/datatypes/entity_path)s.\n\nEach expression is either an inclusion or an exclusion expression.\nInclusions start with an optional `+` and exclusions must start with a `-`.\n\nMultiple expressions are combined together as part of archetypes.ViewContents.\n\nThe `/**` suffix matches the whole subtree, i.e. self and any child, recursively\n(`/world/**` matches both `/world` and `/world/car/driver`).\nOther uses of `*` are not (yet) supported.", - custom_placeholder: Some(QueryExpression::default().to_arrow2()?), + custom_placeholder: Some(QueryExpression::default().to_arrow()?), datatype: QueryExpression::arrow2_datatype(), }, ), @@ -231,7 +229,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The container that sits at the root of a viewport.", - custom_placeholder: Some(RootContainer::default().to_arrow2()?), + custom_placeholder: Some(RootContainer::default().to_arrow()?), datatype: RootContainer::arrow2_datatype(), }, ), @@ -239,7 +237,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The layout share of a row in the container.", - custom_placeholder: Some(RowShare::default().to_arrow2()?), + custom_placeholder: Some(RowShare::default().to_arrow()?), datatype: RowShare::arrow2_datatype(), }, ), @@ -247,7 +245,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Describe a component column to be selected in the dataframe view.", - custom_placeholder: Some(SelectedColumns::default().to_arrow2()?), + custom_placeholder: Some(SelectedColumns::default().to_arrow()?), datatype: SelectedColumns::arrow2_datatype(), }, ), @@ -256,7 +254,7 @@ fn generate_component_reflection() -> Result Result::name(), ComponentReflection { docstring_md: "A timeline identified by its name.", - custom_placeholder: Some(TimelineName::default().to_arrow2()?), + custom_placeholder: Some(TimelineName::default().to_arrow()?), datatype: TimelineName::arrow2_datatype(), }, ), @@ -273,7 +271,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The class identifier of view, e.g. `\"2D\"`, `\"TextLog\"`, ….", - custom_placeholder: Some(ViewClass::default().to_arrow2()?), + custom_placeholder: Some(ViewClass::default().to_arrow()?), datatype: ViewClass::arrow2_datatype(), }, ), @@ -281,7 +279,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Determines whether an image or texture should be scaled to fit the viewport.", - custom_placeholder: Some(ViewFit::default().to_arrow2()?), + custom_placeholder: Some(ViewFit::default().to_arrow()?), datatype: ViewFit::arrow2_datatype(), }, ), @@ -289,7 +287,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Whether a view is maximized.", - custom_placeholder: Some(ViewMaximized::default().to_arrow2()?), + custom_placeholder: Some(ViewMaximized::default().to_arrow()?), datatype: ViewMaximized::arrow2_datatype(), }, ), @@ -297,7 +295,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The origin of a view.", - custom_placeholder: Some(ViewOrigin::default().to_arrow2()?), + custom_placeholder: Some(ViewOrigin::default().to_arrow()?), datatype: ViewOrigin::arrow2_datatype(), }, ), @@ -306,7 +304,7 @@ fn generate_component_reflection() -> Result Result::name(), ComponentReflection { docstring_md: "Whether the container, view, entity or instance is currently visible.", - custom_placeholder: Some(Visible::default().to_arrow2()?), + custom_placeholder: Some(Visible::default().to_arrow()?), datatype: Visible::arrow2_datatype(), }, ), @@ -323,7 +321,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The range of values on a given timeline that will be included in a view's query.\n\nRefer to `VisibleTimeRanges` archetype for more information.", - custom_placeholder: Some(VisibleTimeRange::default().to_arrow2()?), + custom_placeholder: Some(VisibleTimeRange::default().to_arrow()?), datatype: VisibleTimeRange::arrow2_datatype(), }, ), @@ -331,7 +329,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Visual bounds in 2D space used for `Spatial2DView`.", - custom_placeholder: Some(VisualBounds2D::default().to_arrow2()?), + custom_placeholder: Some(VisualBounds2D::default().to_arrow()?), datatype: VisualBounds2D::arrow2_datatype(), }, ), @@ -339,7 +337,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Override the visualizers for an entity.\n\nThis component is a stop-gap mechanism based on the current implementation details\nof the visualizer system. It is not intended to be a long-term solution, but provides\nenough utility to be useful in the short term.\n\nThe long-term solution is likely to be based off: \n\nThis can only be used as part of blueprints. It will have no effect if used\nin a regular entity.", - custom_placeholder: Some(VisualizerOverrides::default().to_arrow2()?), + custom_placeholder: Some(VisualizerOverrides::default().to_arrow()?), datatype: VisualizerOverrides::arrow2_datatype(), }, ), @@ -347,7 +345,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A zoom level determines how much of the world is visible on a map.", - custom_placeholder: Some(ZoomLevel::default().to_arrow2()?), + custom_placeholder: Some(ZoomLevel::default().to_arrow()?), datatype: ZoomLevel::arrow2_datatype(), }, ), @@ -355,7 +353,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Policy for aggregation of multiple scalar plot values.\n\nThis is used for lines in plots when the X axis distance of individual points goes below a single pixel,\ni.e. a single pixel covers more than one tick worth of data. It can greatly improve performance\n(and readability) in such situations as it prevents overdraw.", - custom_placeholder: Some(AggregationPolicy::default().to_arrow2()?), + custom_placeholder: Some(AggregationPolicy::default().to_arrow()?), datatype: AggregationPolicy::arrow2_datatype(), }, ), @@ -363,7 +361,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A color multiplier, usually applied to a whole entity, e.g. a mesh.", - custom_placeholder: Some(AlbedoFactor::default().to_arrow2()?), + custom_placeholder: Some(AlbedoFactor::default().to_arrow()?), datatype: AlbedoFactor::arrow2_datatype(), }, ), @@ -371,7 +369,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The annotation context provides additional information on how to display entities.\n\nEntities can use [`datatypes.ClassId`](https://rerun.io/docs/reference/types/datatypes/class_id)s and [`datatypes.KeypointId`](https://rerun.io/docs/reference/types/datatypes/keypoint_id)s to provide annotations, and\nthe labels and colors will be looked up in the appropriate\nannotation context. We use the *first* annotation context we find in the\npath-hierarchy when searching up through the ancestors of a given entity\npath.", - custom_placeholder: Some(AnnotationContext::default().to_arrow2()?), + custom_placeholder: Some(AnnotationContext::default().to_arrow()?), datatype: AnnotationContext::arrow2_datatype(), }, ), @@ -379,7 +377,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The length of an axis in local units of the space.", - custom_placeholder: Some(AxisLength::default().to_arrow2()?), + custom_placeholder: Some(AxisLength::default().to_arrow()?), datatype: AxisLength::arrow2_datatype(), }, ), @@ -395,7 +393,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 16-bit ID representing a type of semantic class.", - custom_placeholder: Some(ClassId::default().to_arrow2()?), + custom_placeholder: Some(ClassId::default().to_arrow()?), datatype: ClassId::arrow2_datatype(), }, ), @@ -403,7 +401,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Configures how a clear operation should behave - recursive or not.", - custom_placeholder: Some(ClearIsRecursive::default().to_arrow2()?), + custom_placeholder: Some(ClearIsRecursive::default().to_arrow()?), datatype: ClearIsRecursive::arrow2_datatype(), }, ), @@ -411,7 +409,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.\n\nThe color is stored as a 32-bit integer, where the most significant\nbyte is `R` and the least significant byte is `A`.", - custom_placeholder: Some(Color::default().to_arrow2()?), + custom_placeholder: Some(Color::default().to_arrow()?), datatype: Color::arrow2_datatype(), }, ), @@ -419,7 +417,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Colormap for mapping scalar values within a given range to a color.\n\nThis provides a number of popular pre-defined colormaps.\nIn the future, the Rerun Viewer will allow users to define their own colormaps,\nbut currently the Viewer is limited to the types defined here.", - custom_placeholder: Some(Colormap::default().to_arrow2()?), + custom_placeholder: Some(Colormap::default().to_arrow()?), datatype: Colormap::arrow2_datatype(), }, ), @@ -427,7 +425,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The world->depth map scaling factor.\n\nThis measures how many depth map units are in a world unit.\nFor instance, if a depth map uses millimeters and the world uses meters,\nthis value would be `1000`.\n\nNote that the only effect on 2D views is the physical depth values shown when hovering the image.\nIn 3D views on the other hand, this affects where the points of the point cloud are placed.", - custom_placeholder: Some(DepthMeter::default().to_arrow2()?), + custom_placeholder: Some(DepthMeter::default().to_arrow()?), datatype: DepthMeter::arrow2_datatype(), }, ), @@ -435,7 +433,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Spatially disconnect this entity from its parent.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nIt *only* applies to views that work with spatial transformations, i.e. 2D & 3D views.\nThis is useful for specifying that a subgraph is independent of the rest of the scene.", - custom_placeholder: Some(DisconnectedSpace::default().to_arrow2()?), + custom_placeholder: Some(DisconnectedSpace::default().to_arrow()?), datatype: DisconnectedSpace::arrow2_datatype(), }, ), @@ -443,7 +441,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Draw order of 2D elements. Higher values are drawn on top of lower values.\n\nAn entity can have only a single draw order component.\nWithin an entity draw order is governed by the order of the components.\n\nDraw order for entities with the same draw order is generally undefined.", - custom_placeholder: Some(DrawOrder::default().to_arrow2()?), + custom_placeholder: Some(DrawOrder::default().to_arrow()?), datatype: DrawOrder::arrow2_datatype(), }, ), @@ -451,7 +449,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A path to an entity, usually to reference some data that is part of the target entity.", - custom_placeholder: Some(EntityPath::default().to_arrow2()?), + custom_placeholder: Some(EntityPath::default().to_arrow()?), datatype: EntityPath::arrow2_datatype(), }, ), @@ -459,7 +457,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "How a geometric shape is drawn and colored.", - custom_placeholder: Some(FillMode::default().to_arrow2()?), + custom_placeholder: Some(FillMode::default().to_arrow()?), datatype: FillMode::arrow2_datatype(), }, ), @@ -467,7 +465,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "How much a primitive fills out the available space.\n\nUsed for instance to scale the points of the point cloud created from [`archetypes.DepthImage`](https://rerun.io/docs/reference/types/archetypes/depth_image) projection in 3D views.\nValid range is from 0 to max float although typically values above 1.0 are not useful.\n\nDefaults to 1.0.", - custom_placeholder: Some(FillRatio::default().to_arrow2()?), + custom_placeholder: Some(FillRatio::default().to_arrow()?), datatype: FillRatio::arrow2_datatype(), }, ), @@ -475,7 +473,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A gamma correction value to be used with a scalar value or color.\n\nUsed to adjust the gamma of a color or scalar value between 0 and 1 before rendering.\n`new_value = old_value ^ gamma`\n\nValid range is from 0 (excluding) to max float.\nDefaults to 1.0 unless otherwise specified.", - custom_placeholder: Some(GammaCorrection::default().to_arrow2()?), + custom_placeholder: Some(GammaCorrection::default().to_arrow()?), datatype: GammaCorrection::arrow2_datatype(), }, ), @@ -483,7 +481,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A geospatial line string expressed in [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees).", - custom_placeholder: Some(GeoLineString::default().to_arrow2()?), + custom_placeholder: Some(GeoLineString::default().to_arrow()?), datatype: GeoLineString::arrow2_datatype(), }, ), @@ -491,7 +489,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "An edge in a graph connecting two nodes.", - custom_placeholder: Some(GraphEdge::default().to_arrow2()?), + custom_placeholder: Some(GraphEdge::default().to_arrow()?), datatype: GraphEdge::arrow2_datatype(), }, ), @@ -499,7 +497,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A string-based ID representing a node in a graph.", - custom_placeholder: Some(GraphNode::default().to_arrow2()?), + custom_placeholder: Some(GraphNode::default().to_arrow()?), datatype: GraphNode::arrow2_datatype(), }, ), @@ -507,7 +505,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Specifies if a graph has directed or undirected edges.", - custom_placeholder: Some(GraphType::default().to_arrow2()?), + custom_placeholder: Some(GraphType::default().to_arrow()?), datatype: GraphType::arrow2_datatype(), }, ), @@ -515,7 +513,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Half-size (radius) of a 2D box.\n\nMeasured in its local coordinate system.\n\nThe box extends both in negative and positive direction along each axis.\nNegative sizes indicate that the box is flipped along the respective axis, but this has no effect on how it is displayed.", - custom_placeholder: Some(HalfSize2D::default().to_arrow2()?), + custom_placeholder: Some(HalfSize2D::default().to_arrow()?), datatype: HalfSize2D::arrow2_datatype(), }, ), @@ -523,7 +521,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Half-size (radius) of a 3D box.\n\nMeasured in its local coordinate system.\n\nThe box extends both in negative and positive direction along each axis.\nNegative sizes indicate that the box is flipped along the respective axis, but this has no effect on how it is displayed.", - custom_placeholder: Some(HalfSize3D::default().to_arrow2()?), + custom_placeholder: Some(HalfSize3D::default().to_arrow()?), datatype: HalfSize3D::arrow2_datatype(), }, ), @@ -539,7 +537,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The metadata describing the contents of a [`components.ImageBuffer`](https://rerun.io/docs/reference/types/components/image_buffer).", - custom_placeholder: Some(ImageFormat::default().to_arrow2()?), + custom_placeholder: Some(ImageFormat::default().to_arrow()?), datatype: ImageFormat::arrow2_datatype(), }, ), @@ -547,7 +545,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The distance from the camera origin to the image plane when the projection is shown in a 3D viewer.\n\nThis is only used for visualization purposes, and does not affect the projection itself.", - custom_placeholder: Some(ImagePlaneDistance::default().to_arrow2()?), + custom_placeholder: Some(ImagePlaneDistance::default().to_arrow()?), datatype: ImagePlaneDistance::arrow2_datatype(), }, ), @@ -555,7 +553,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 16-bit ID representing a type of semantic keypoint within a class.", - custom_placeholder: Some(KeypointId::default().to_arrow2()?), + custom_placeholder: Some(KeypointId::default().to_arrow()?), datatype: KeypointId::arrow2_datatype(), }, ), @@ -563,7 +561,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A geospatial position expressed in [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees).", - custom_placeholder: Some(LatLon::default().to_arrow2()?), + custom_placeholder: Some(LatLon::default().to_arrow()?), datatype: LatLon::arrow2_datatype(), }, ), @@ -571,7 +569,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Length, or one-dimensional size.\n\nMeasured in its local coordinate system; consult the archetype in use to determine which\naxis or part of the entity this is the length of.", - custom_placeholder: Some(Length::default().to_arrow2()?), + custom_placeholder: Some(Length::default().to_arrow()?), datatype: Length::arrow2_datatype(), }, ), @@ -579,7 +577,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A line strip in 2D space.\n\nA line strip is a list of points connected by line segments. It can be used to draw\napproximations of smooth curves.\n\nThe points will be connected in order, like so:\n```text\n 2------3 5\n / \\ /\n0----1 \\ /\n 4\n```", - custom_placeholder: Some(LineStrip2D::default().to_arrow2()?), + custom_placeholder: Some(LineStrip2D::default().to_arrow()?), datatype: LineStrip2D::arrow2_datatype(), }, ), @@ -587,7 +585,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A line strip in 3D space.\n\nA line strip is a list of points connected by line segments. It can be used to draw\napproximations of smooth curves.\n\nThe points will be connected in order, like so:\n```text\n 2------3 5\n / \\ /\n0----1 \\ /\n 4\n```", - custom_placeholder: Some(LineStrip3D::default().to_arrow2()?), + custom_placeholder: Some(LineStrip3D::default().to_arrow()?), datatype: LineStrip3D::arrow2_datatype(), }, ), @@ -595,7 +593,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Filter used when magnifying an image/texture such that a single pixel/texel is displayed as multiple pixels on screen.", - custom_placeholder: Some(MagnificationFilter::default().to_arrow2()?), + custom_placeholder: Some(MagnificationFilter::default().to_arrow()?), datatype: MagnificationFilter::arrow2_datatype(), }, ), @@ -603,7 +601,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The visual appearance of a point in e.g. a 2D plot.", - custom_placeholder: Some(MarkerShape::default().to_arrow2()?), + custom_placeholder: Some(MarkerShape::default().to_arrow()?), datatype: MarkerShape::arrow2_datatype(), }, ), @@ -611,7 +609,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Radius of a marker of a point in e.g. a 2D plot, measured in UI points.", - custom_placeholder: Some(MarkerSize::default().to_arrow2()?), + custom_placeholder: Some(MarkerSize::default().to_arrow()?), datatype: MarkerSize::arrow2_datatype(), }, ), @@ -619,7 +617,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A standardized media type (RFC2046, formerly known as MIME types), encoded as a string.\n\nThe complete reference of officially registered media types is maintained by the IANA and can be\nconsulted at .", - custom_placeholder: Some(MediaType::default().to_arrow2()?), + custom_placeholder: Some(MediaType::default().to_arrow()?), datatype: MediaType::arrow2_datatype(), }, ), @@ -627,7 +625,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A display name, typically for an entity or a item like a plot series.", - custom_placeholder: Some(Name::default().to_arrow2()?), + custom_placeholder: Some(Name::default().to_arrow()?), datatype: Name::arrow2_datatype(), }, ), @@ -635,7 +633,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Degree of transparency ranging from 0.0 (fully transparent) to 1.0 (fully opaque).\n\nThe final opacity value may be a result of multiplication with alpha values as specified by other color sources.\nUnless otherwise specified, the default value is 1.", - custom_placeholder: Some(Opacity::default().to_arrow2()?), + custom_placeholder: Some(Opacity::default().to_arrow()?), datatype: Opacity::arrow2_datatype(), }, ), @@ -643,7 +641,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Camera projection, from image coordinates to view coordinates.\n\nChild from parent.\nImage coordinates from camera view coordinates.\n\nExample:\n```text\n1496.1 0.0 980.5\n 0.0 1496.1 744.5\n 0.0 0.0 1.0\n```", - custom_placeholder: Some(PinholeProjection::default().to_arrow2()?), + custom_placeholder: Some(PinholeProjection::default().to_arrow()?), datatype: PinholeProjection::arrow2_datatype(), }, ), @@ -659,7 +657,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy.\n\nIf normalization of the rotation axis fails the rotation is treated as an invalid transform.", - custom_placeholder: Some(PoseRotationAxisAngle::default().to_arrow2()?), + custom_placeholder: Some(PoseRotationAxisAngle::default().to_arrow()?), datatype: PoseRotationAxisAngle::arrow2_datatype(), }, ), @@ -667,7 +665,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3D rotation expressed as a quaternion that doesn't propagate in the transform hierarchy.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is treated as an invalid transform.", - custom_placeholder: Some(PoseRotationQuat::default().to_arrow2()?), + custom_placeholder: Some(PoseRotationQuat::default().to_arrow()?), datatype: PoseRotationQuat::arrow2_datatype(), }, ), @@ -675,7 +673,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3D scale factor that doesn't propagate in the transform hierarchy.\n\nA scale of 1.0 means no scaling.\nA scale of 2.0 means doubling the size.\nEach component scales along the corresponding axis.", - custom_placeholder: Some(PoseScale3D::default().to_arrow2()?), + custom_placeholder: Some(PoseScale3D::default().to_arrow()?), datatype: PoseScale3D::arrow2_datatype(), }, ), @@ -683,7 +681,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3x3 transformation matrix Matrix that doesn't propagate in the transform hierarchy.\n\n3x3 matrixes are able to represent any affine transformation in 3D space,\ni.e. rotation, scaling, shearing, reflection etc.\n\nMatrices in Rerun are stored as flat list of coefficients in column-major order:\n```text\n column 0 column 1 column 2\n -------------------------------------------------\nrow 0 | flat_columns[0] flat_columns[3] flat_columns[6]\nrow 1 | flat_columns[1] flat_columns[4] flat_columns[7]\nrow 2 | flat_columns[2] flat_columns[5] flat_columns[8]\n```", - custom_placeholder: Some(PoseTransformMat3x3::default().to_arrow2()?), + custom_placeholder: Some(PoseTransformMat3x3::default().to_arrow()?), datatype: PoseTransformMat3x3::arrow2_datatype(), }, ), @@ -691,7 +689,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A translation vector in 3D space that doesn't propagate in the transform hierarchy.", - custom_placeholder: Some(PoseTranslation3D::default().to_arrow2()?), + custom_placeholder: Some(PoseTranslation3D::default().to_arrow()?), datatype: PoseTranslation3D::arrow2_datatype(), }, ), @@ -699,7 +697,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A position in 2D space.", - custom_placeholder: Some(Position2D::default().to_arrow2()?), + custom_placeholder: Some(Position2D::default().to_arrow()?), datatype: Position2D::arrow2_datatype(), }, ), @@ -707,7 +705,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A position in 3D space.", - custom_placeholder: Some(Position3D::default().to_arrow2()?), + custom_placeholder: Some(Position3D::default().to_arrow()?), datatype: Position3D::arrow2_datatype(), }, ), @@ -715,7 +713,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The radius of something, e.g. a point.\n\nInternally, positive values indicate scene units, whereas negative values\nare interpreted as UI points.\n\nUI points are independent of zooming in Views, but are sensitive to the application UI scaling.\nat 100% UI scaling, UI points are equal to pixels\nThe Viewer's UI scaling defaults to the OS scaling which typically is 100% for full HD screens and 200% for 4k screens.", - custom_placeholder: Some(Radius::default().to_arrow2()?), + custom_placeholder: Some(Radius::default().to_arrow()?), datatype: Radius::arrow2_datatype(), }, ), @@ -723,7 +721,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 1D range, specifying a lower and upper bound.", - custom_placeholder: Some(Range1D::default().to_arrow2()?), + custom_placeholder: Some(Range1D::default().to_arrow()?), datatype: Range1D::arrow2_datatype(), }, ), @@ -739,7 +737,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Pixel resolution width & height, e.g. of a camera sensor.\n\nTypically in integer units, but for some use cases floating point may be used.", - custom_placeholder: Some(Resolution::default().to_arrow2()?), + custom_placeholder: Some(Resolution::default().to_arrow()?), datatype: Resolution::arrow2_datatype(), }, ), @@ -747,7 +745,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "3D rotation represented by a rotation around a given axis.\n\nIf normalization of the rotation axis fails the rotation is treated as an invalid transform.", - custom_placeholder: Some(RotationAxisAngle::default().to_arrow2()?), + custom_placeholder: Some(RotationAxisAngle::default().to_arrow()?), datatype: RotationAxisAngle::arrow2_datatype(), }, ), @@ -755,7 +753,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3D rotation expressed as a quaternion.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is treated as an invalid transform.", - custom_placeholder: Some(RotationQuat::default().to_arrow2()?), + custom_placeholder: Some(RotationQuat::default().to_arrow()?), datatype: RotationQuat::arrow2_datatype(), }, ), @@ -763,7 +761,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A scalar value, encoded as a 64-bit floating point.\n\nUsed for time series plots.", - custom_placeholder: Some(Scalar::default().to_arrow2()?), + custom_placeholder: Some(Scalar::default().to_arrow()?), datatype: Scalar::arrow2_datatype(), }, ), @@ -771,7 +769,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3D scale factor.\n\nA scale of 1.0 means no scaling.\nA scale of 2.0 means doubling the size.\nEach component scales along the corresponding axis.", - custom_placeholder: Some(Scale3D::default().to_arrow2()?), + custom_placeholder: Some(Scale3D::default().to_arrow()?), datatype: Scale3D::arrow2_datatype(), }, ), @@ -787,7 +785,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The width of a stroke specified in UI points.", - custom_placeholder: Some(StrokeWidth::default().to_arrow2()?), + custom_placeholder: Some(StrokeWidth::default().to_arrow()?), datatype: StrokeWidth::arrow2_datatype(), }, ), @@ -795,7 +793,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "An N-dimensional array of numbers.\n\nThe number of dimensions and their respective lengths is specified by the `shape` field.\nThe dimensions are ordered from outermost to innermost. For example, in the common case of\na 2D RGB Image, the shape would be `[height, width, channel]`.\n\nThese dimensions are combined with an index to look up values from the `buffer` field,\nwhich stores a contiguous array of typed values.", - custom_placeholder: Some(TensorData::default().to_arrow2()?), + custom_placeholder: Some(TensorData::default().to_arrow()?), datatype: TensorData::arrow2_datatype(), }, ), @@ -804,7 +802,7 @@ fn generate_component_reflection() -> Result Result::name(), ComponentReflection { docstring_md: "Specifies which dimension to use for height.", - custom_placeholder: Some(TensorHeightDimension::default().to_arrow2()?), + custom_placeholder: Some(TensorHeightDimension::default().to_arrow()?), datatype: TensorHeightDimension::arrow2_datatype(), }, ), @@ -821,7 +819,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Specifies which dimension to use for width.", - custom_placeholder: Some(TensorWidthDimension::default().to_arrow2()?), + custom_placeholder: Some(TensorWidthDimension::default().to_arrow()?), datatype: TensorWidthDimension::arrow2_datatype(), }, ), @@ -829,7 +827,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 2D texture UV coordinate.\n\nTexture coordinates specify a position on a 2D texture.\nA range from 0-1 covers the entire texture in the respective dimension.\nUnless configured otherwise, the texture repeats outside of this range.\nRerun uses top-left as the origin for UV coordinates.\n\n 0 U 1\n0 + --------- →\n | .\nV | .\n | .\n1 ↓ . . . . . .\n\nThis is the same convention as in Vulkan/Metal/DX12/WebGPU, but (!) unlike OpenGL,\nwhich places the origin at the bottom-left.", - custom_placeholder: Some(Texcoord2D::default().to_arrow2()?), + custom_placeholder: Some(Texcoord2D::default().to_arrow()?), datatype: Texcoord2D::arrow2_datatype(), }, ), @@ -837,7 +835,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A string of text, e.g. for labels and text documents.", - custom_placeholder: Some(Text::default().to_arrow2()?), + custom_placeholder: Some(Text::default().to_arrow()?), datatype: Text::arrow2_datatype(), }, ), @@ -845,7 +843,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The severity level of a text log message.\n\nRecommended to be one of:\n* `\"CRITICAL\"`\n* `\"ERROR\"`\n* `\"WARN\"`\n* `\"INFO\"`\n* `\"DEBUG\"`\n* `\"TRACE\"`", - custom_placeholder: Some(TextLogLevel::default().to_arrow2()?), + custom_placeholder: Some(TextLogLevel::default().to_arrow()?), datatype: TextLogLevel::arrow2_datatype(), }, ), @@ -853,7 +851,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A 3x3 transformation matrix Matrix.\n\n3x3 matrixes are able to represent any affine transformation in 3D space,\ni.e. rotation, scaling, shearing, reflection etc.\n\nMatrices in Rerun are stored as flat list of coefficients in column-major order:\n```text\n column 0 column 1 column 2\n -------------------------------------------------\nrow 0 | flat_columns[0] flat_columns[3] flat_columns[6]\nrow 1 | flat_columns[1] flat_columns[4] flat_columns[7]\nrow 2 | flat_columns[2] flat_columns[5] flat_columns[8]\n```", - custom_placeholder: Some(TransformMat3x3::default().to_arrow2()?), + custom_placeholder: Some(TransformMat3x3::default().to_arrow()?), datatype: TransformMat3x3::arrow2_datatype(), }, ), @@ -861,7 +859,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Specifies relation a spatial transform describes.", - custom_placeholder: Some(TransformRelation::default().to_arrow2()?), + custom_placeholder: Some(TransformRelation::default().to_arrow()?), datatype: TransformRelation::arrow2_datatype(), }, ), @@ -869,7 +867,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A translation vector in 3D space.", - custom_placeholder: Some(Translation3D::default().to_arrow2()?), + custom_placeholder: Some(Translation3D::default().to_arrow()?), datatype: Translation3D::arrow2_datatype(), }, ), @@ -877,7 +875,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "The three indices of a triangle in a triangle mesh.", - custom_placeholder: Some(TriangleIndices::default().to_arrow2()?), + custom_placeholder: Some(TriangleIndices::default().to_arrow()?), datatype: TriangleIndices::arrow2_datatype(), }, ), @@ -885,7 +883,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Range of expected or valid values, specifying a lower and upper bound.", - custom_placeholder: Some(ValueRange::default().to_arrow2()?), + custom_placeholder: Some(ValueRange::default().to_arrow()?), datatype: ValueRange::arrow2_datatype(), }, ), @@ -893,7 +891,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A vector in 2D space.", - custom_placeholder: Some(Vector2D::default().to_arrow2()?), + custom_placeholder: Some(Vector2D::default().to_arrow()?), datatype: Vector2D::arrow2_datatype(), }, ), @@ -901,7 +899,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "A vector in 3D space.", - custom_placeholder: Some(Vector3D::default().to_arrow2()?), + custom_placeholder: Some(Vector3D::default().to_arrow()?), datatype: Vector3D::arrow2_datatype(), }, ), @@ -909,7 +907,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "Timestamp inside a [`archetypes.AssetVideo`](https://rerun.io/docs/reference/types/archetypes/asset_video).", - custom_placeholder: Some(VideoTimestamp::default().to_arrow2()?), + custom_placeholder: Some(VideoTimestamp::default().to_arrow()?), datatype: VideoTimestamp::arrow2_datatype(), }, ), @@ -917,7 +915,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { docstring_md: "How we interpret the coordinate system of an entity/space.\n\nFor instance: What is \"up\"? What does the Z axis mean?\n\nThe three coordinates are always ordered as [x, y, z].\n\nFor example [Right, Down, Forward] means that the X axis points to the right, the Y axis points\ndown, and the Z axis points forward.\n\n⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032).\n\nThe following constants are used to represent the different directions:\n * Up = 1\n * Down = 2\n * Right = 3\n * Left = 4\n * Forward = 5\n * Back = 6", - custom_placeholder: Some(ViewCoordinates::default().to_arrow2()?), + custom_placeholder: Some(ViewCoordinates::default().to_arrow()?), datatype: ViewCoordinates::arrow2_datatype(), }, ), diff --git a/crates/store/re_types_core/src/loggable_batch.rs b/crates/store/re_types_core/src/loggable_batch.rs index 665545a1ca6e..71e86b4f7692 100644 --- a/crates/store/re_types_core/src/loggable_batch.rs +++ b/crates/store/re_types_core/src/loggable_batch.rs @@ -24,6 +24,11 @@ pub trait LoggableBatch { // type Loggable: Loggable; /// Serializes the batch into an Arrow array. + fn to_arrow(&self) -> SerializationResult { + self.to_arrow2().map(|array| array.into()) + } + + /// Serializes the batch into an Arrow2 array. fn to_arrow2(&self) -> SerializationResult>; } diff --git a/crates/store/re_types_core/src/reflection.rs b/crates/store/re_types_core/src/reflection.rs index 9fc71d5b4fdf..7ff274c54a3a 100644 --- a/crates/store/re_types_core/src/reflection.rs +++ b/crates/store/re_types_core/src/reflection.rs @@ -1,5 +1,7 @@ //! Run-time reflection for reading meta-data about components and archetypes. +use arrow::array::ArrayRef; + use crate::{ArchetypeName, ComponentName}; /// A trait for code-generated enums. @@ -218,7 +220,7 @@ pub struct ComponentReflection { /// especially when it's necessary to have a starting value for edit ui. /// Typically, this is only used when `FallbackProvider`s are not available. /// If there's no custom placeholder, a placeholder can be derived from the arrow datatype. - pub custom_placeholder: Option>, + pub custom_placeholder: Option, /// Datatype of the component. pub datatype: arrow2::datatypes::DataType, diff --git a/crates/store/re_types_core/src/size_bytes.rs b/crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs similarity index 71% rename from crates/store/re_types_core/src/size_bytes.rs rename to crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs index 3c821883eb08..5a4b5f3a1b15 100644 --- a/crates/store/re_types_core/src/size_bytes.rs +++ b/crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs @@ -1,386 +1,22 @@ -use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; -use std::sync::Arc; - -use arrow2::datatypes::{DataType, Field}; -use arrow2::types::{NativeType, Offset}; -use smallvec::SmallVec; - -// --- - -/// Approximations of stack and heap size for both internal and external types. -/// -/// Motly used for statistics and triggering events such as garbage collection. -pub trait SizeBytes { - /// Returns the total size of `self` in bytes, accounting for both stack and heap space. - #[inline] - fn total_size_bytes(&self) -> u64 { - self.stack_size_bytes() + self.heap_size_bytes() - } - - /// Returns the total size of `self` on the stack, in bytes. - /// - /// Defaults to `std::mem::size_of_val(self)`. - #[inline] - fn stack_size_bytes(&self) -> u64 { - std::mem::size_of_val(self) as _ - } - - /// Returns the total size of `self` on the heap, in bytes. - fn heap_size_bytes(&self) -> u64; - - /// Is `Self` just plain old data? - /// - /// If `true`, this will make most blanket implementations of `SizeBytes` much faster (e.g. `Vec`). - #[inline] - fn is_pod() -> bool { - false - } -} - -// TODO(rust-lang/rust#31844): This isn't happening without specialization. -// impl SizeBytes for T where T: bytemuck::Pod { … } - -// --- Std --- - -impl SizeBytes for String { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.as_bytes().len() as u64 - } -} - -impl SizeBytes for BTreeMap { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - let keys_size_bytes = if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.keys().map(SizeBytes::total_size_bytes).sum::() - }; - - let values_size_bytes = if V::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.values().map(SizeBytes::total_size_bytes).sum::() - }; - - keys_size_bytes + values_size_bytes - } -} - -impl SizeBytes for BTreeSet { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for HashMap { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - let keys_size_bytes = if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.keys().map(SizeBytes::total_size_bytes).sum::() - }; - - let values_size_bytes = if V::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.values().map(SizeBytes::total_size_bytes).sum::() - }; - - keys_size_bytes + values_size_bytes - } -} - -// NOTE: Do _not_ implement `SizeBytes` for slices: we cannot know whether they point to the stack -// or the heap! - -impl SizeBytes for [T; N] { - #[inline] - fn heap_size_bytes(&self) -> u64 { - if T::is_pod() { - 0 // it's a const-sized array - } else { - self.iter().map(SizeBytes::heap_size_bytes).sum::() - } - } -} - -impl SizeBytes for Vec { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for VecDeque { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for SmallVec<[T; N]> { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - if self.len() <= N { - // The `SmallVec` is still smaller than the threshold so no heap data has been - // allocated yet, beyond the heap data each element might have. - - if T::is_pod() { - 0 // early-out - } else { - self.iter().map(SizeBytes::heap_size_bytes).sum::() - } - } else { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } - } -} - -impl SizeBytes for Option { - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.as_ref().map_or(0, SizeBytes::heap_size_bytes) - } -} - -impl SizeBytes for Arc { - #[inline] - fn heap_size_bytes(&self) -> u64 { - 0 // assume it's amortized - } -} - -impl SizeBytes for Box { - #[inline] - fn heap_size_bytes(&self) -> u64 { - T::total_size_bytes(&**self) - } -} - -// TODO(rust-lang/rust#31844): `impl SizeBytesExt for T {}` would be nice but -// violates orphan rules. -macro_rules! impl_size_bytes_pod { - ($ty:ty) => { - impl SizeBytes for $ty { - #[inline] - fn heap_size_bytes(&self) -> u64 { - 0 - } - - #[inline] - fn is_pod() -> bool { - true - } - } - }; - ($ty:ty, $($rest:ty),+) => { - impl_size_bytes_pod!($ty); impl_size_bytes_pod!($($rest),+); - }; -} - -impl_size_bytes_pod!(u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, bool, f32, f64); -impl_size_bytes_pod!(half::f16); - -impl SizeBytes for (T, U) -where - T: SizeBytes, - U: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b) = self; - a.heap_size_bytes() + b.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() - } -} - -impl SizeBytes for (T, U, V) -where - T: SizeBytes, - U: SizeBytes, - V: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b, c) = self; - a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() && V::is_pod() - } -} - -impl SizeBytes for (T, U, V, W) -where - T: SizeBytes, - U: SizeBytes, - V: SizeBytes, - W: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b, c, d) = self; - a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + d.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() && V::is_pod() && W::is_pod() - } -} - -// --- Arrow --- - -impl SizeBytes for DataType { - #[inline] - fn heap_size_bytes(&self) -> u64 { - match self { - Self::Null - | Self::Binary - | Self::Boolean - | Self::Date32 - | Self::Date64 - | Self::Float16 - | Self::Float32 - | Self::Float64 - | Self::Int16 - | Self::Int32 - | Self::Int64 - | Self::Int8 - | Self::LargeBinary - | Self::LargeUtf8 - | Self::UInt16 - | Self::UInt32 - | Self::UInt64 - | Self::UInt8 - | Self::Time32(_) - | Self::Time64(_) - | Self::Duration(_) - | Self::Interval(_) - | Self::FixedSizeBinary(_) - | Self::Decimal(_, _) - | Self::Decimal256(_, _) - | Self::Utf8 => 0, - Self::Timestamp(_, str) => str.heap_size_bytes(), - Self::List(field) - | Self::FixedSizeList(field, _) - | Self::LargeList(field) - | Self::Map(field, _) => field.total_size_bytes(), // NOTE: Boxed, it's all on the heap - Self::Struct(fields) => fields.heap_size_bytes(), - Self::Union(fields, indices, _) => fields.heap_size_bytes() + indices.heap_size_bytes(), - Self::Dictionary(_, datatype, _) => datatype.total_size_bytes(), // NOTE: Boxed, it's all on the heap - Self::Extension(name, datatype, extra) => { - name.heap_size_bytes() - + datatype.total_size_bytes() // NOTE: Boxed, it's all on the heap - + extra.heap_size_bytes() - } - } - } -} - -impl SizeBytes for Field { - #[inline] - fn heap_size_bytes(&self) -> u64 { - let Self { - name, - data_type, - is_nullable, - metadata, - } = self; - - name.heap_size_bytes() - + data_type.heap_size_bytes() - + is_nullable.heap_size_bytes() - + metadata.heap_size_bytes() - } -} - -impl SizeBytes for dyn Array { - #[inline] - fn heap_size_bytes(&self) -> u64 { - estimated_bytes_size(self) as _ - } -} - -impl SizeBytes for Box { - #[inline] - fn heap_size_bytes(&self) -> u64 { - estimated_bytes_size(&**self as _) as _ - } -} - -impl SizeBytes for PrimitiveArray { - #[inline] - fn heap_size_bytes(&self) -> u64 { - estimated_bytes_size(self) as _ - } -} - -impl SizeBytes for ListArray { - #[inline] - fn heap_size_bytes(&self) -> u64 { - estimated_bytes_size(self) as _ - } -} - -impl SizeBytes for StructArray { - #[inline] - fn heap_size_bytes(&self) -> u64 { - estimated_bytes_size(self) as _ - } -} - -// --- Arrow estimations --- - -// The following is a modified version of [1], available under MIT OR Apache-2.0. -// -// [1] https://github.com/jorgecarleitao/arrow2/blob/v0.16.0/src/compute/aggregate/memory.rs - -use arrow2::array::{ - Array, BinaryArray, BooleanArray, DictionaryArray, FixedSizeBinaryArray, FixedSizeListArray, - ListArray, MapArray, PrimitiveArray, StructArray, UnionArray, Utf8Array, +//! --- Arrow2 size estimations --- +//! +//! The following is a modified version of , +//! available under MIT OR Apache-2.0. + +use std::collections::BTreeMap; + +use arrow2::{ + array::{ + Array, BinaryArray, BooleanArray, DictionaryArray, FixedSizeBinaryArray, + FixedSizeListArray, ListArray, MapArray, PrimitiveArray, StructArray, UnionArray, + Utf8Array, + }, + bitmap::Bitmap, + datatypes::{DataType, Field, PhysicalType}, + types::{NativeType, Offset}, }; -use arrow2::bitmap::Bitmap; -use arrow2::datatypes::PhysicalType; + +use super::SizeBytes; macro_rules! with_match_primitive_type {( $key_type:expr, | $_:tt $T:ident | $($body:tt)* @@ -630,7 +266,7 @@ fn estimated_bytes_size(array: &dyn Array) -> usize { // Arrow array?". #[test] #[allow(clippy::from_iter_instead_of_collect)] -fn test_arrow_estimated_size_bytes() { +fn test_arrow2_estimated_size_bytes() { use arrow2::{ array::{Array, Float64Array, ListArray, StructArray, UInt64Array, Utf8Array}, buffer::Buffer, @@ -638,6 +274,7 @@ fn test_arrow_estimated_size_bytes() { offset::Offsets, }; use std::mem::size_of; + use std::sync::Arc; // empty primitive array { @@ -814,3 +451,102 @@ fn test_arrow_estimated_size_bytes() { assert_eq!(raw_size_bytes, arrow_size_bytes); } } + +impl SizeBytes for DataType { + #[inline] + fn heap_size_bytes(&self) -> u64 { + match self { + Self::Null + | Self::Binary + | Self::Boolean + | Self::Date32 + | Self::Date64 + | Self::Float16 + | Self::Float32 + | Self::Float64 + | Self::Int16 + | Self::Int32 + | Self::Int64 + | Self::Int8 + | Self::LargeBinary + | Self::LargeUtf8 + | Self::UInt16 + | Self::UInt32 + | Self::UInt64 + | Self::UInt8 + | Self::Time32(_) + | Self::Time64(_) + | Self::Duration(_) + | Self::Interval(_) + | Self::FixedSizeBinary(_) + | Self::Decimal(_, _) + | Self::Decimal256(_, _) + | Self::Utf8 => 0, + Self::Timestamp(_, str) => str.heap_size_bytes(), + Self::List(field) + | Self::FixedSizeList(field, _) + | Self::LargeList(field) + | Self::Map(field, _) => field.total_size_bytes(), // NOTE: Boxed, it's all on the heap + Self::Struct(fields) => fields.heap_size_bytes(), + Self::Union(fields, indices, _) => fields.heap_size_bytes() + indices.heap_size_bytes(), + Self::Dictionary(_, datatype, _) => datatype.total_size_bytes(), // NOTE: Boxed, it's all on the heap + Self::Extension(name, datatype, extra) => { + name.heap_size_bytes() + + datatype.total_size_bytes() // NOTE: Boxed, it's all on the heap + + extra.heap_size_bytes() + } + } + } +} + +impl SizeBytes for Field { + #[inline] + fn heap_size_bytes(&self) -> u64 { + let Self { + name, + data_type, + is_nullable, + metadata, + } = self; + + name.heap_size_bytes() + + data_type.heap_size_bytes() + + is_nullable.heap_size_bytes() + + metadata.heap_size_bytes() + } +} + +impl SizeBytes for dyn Array { + #[inline] + fn heap_size_bytes(&self) -> u64 { + estimated_bytes_size(self) as _ + } +} + +impl SizeBytes for Box { + #[inline] + fn heap_size_bytes(&self) -> u64 { + estimated_bytes_size(&**self as _) as _ + } +} + +impl SizeBytes for PrimitiveArray { + #[inline] + fn heap_size_bytes(&self) -> u64 { + estimated_bytes_size(self) as _ + } +} + +impl SizeBytes for ListArray { + #[inline] + fn heap_size_bytes(&self) -> u64 { + estimated_bytes_size(self) as _ + } +} + +impl SizeBytes for StructArray { + #[inline] + fn heap_size_bytes(&self) -> u64 { + estimated_bytes_size(self) as _ + } +} diff --git a/crates/store/re_types_core/src/size_bytes/arrow_sizes.rs b/crates/store/re_types_core/src/size_bytes/arrow_sizes.rs new file mode 100644 index 000000000000..7b9ca72d0fd0 --- /dev/null +++ b/crates/store/re_types_core/src/size_bytes/arrow_sizes.rs @@ -0,0 +1,17 @@ +use arrow::array::{Array, ArrayRef}; + +use super::SizeBytes; + +impl SizeBytes for dyn Array { + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.get_array_memory_size() as u64 + } +} + +impl SizeBytes for ArrayRef { + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.get_array_memory_size() as u64 + } +} diff --git a/crates/store/re_types_core/src/size_bytes/mod.rs b/crates/store/re_types_core/src/size_bytes/mod.rs new file mode 100644 index 000000000000..a746ada41f39 --- /dev/null +++ b/crates/store/re_types_core/src/size_bytes/mod.rs @@ -0,0 +1,270 @@ +mod arrow2_sizes; +mod arrow_sizes; + +use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; +use std::sync::Arc; + +use smallvec::SmallVec; + +// --- + +/// Approximations of stack and heap size for both internal and external types. +/// +/// Motly used for statistics and triggering events such as garbage collection. +pub trait SizeBytes { + /// Returns the total size of `self` in bytes, accounting for both stack and heap space. + #[inline] + fn total_size_bytes(&self) -> u64 { + self.stack_size_bytes() + self.heap_size_bytes() + } + + /// Returns the total size of `self` on the stack, in bytes. + /// + /// Defaults to `std::mem::size_of_val(self)`. + #[inline] + fn stack_size_bytes(&self) -> u64 { + std::mem::size_of_val(self) as _ + } + + /// Returns the total size of `self` on the heap, in bytes. + fn heap_size_bytes(&self) -> u64; + + /// Is `Self` just plain old data? + /// + /// If `true`, this will make most blanket implementations of `SizeBytes` much faster (e.g. `Vec`). + #[inline] + fn is_pod() -> bool { + false + } +} + +// TODO(rust-lang/rust#31844): This isn't happening without specialization. +// impl SizeBytes for T where T: bytemuck::Pod { … } + +// --- Std --- + +impl SizeBytes for String { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.as_bytes().len() as u64 + } +} + +impl SizeBytes for BTreeMap { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + let keys_size_bytes = if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.keys().map(SizeBytes::total_size_bytes).sum::() + }; + + let values_size_bytes = if V::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.values().map(SizeBytes::total_size_bytes).sum::() + }; + + keys_size_bytes + values_size_bytes + } +} + +impl SizeBytes for BTreeSet { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for HashMap { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + let keys_size_bytes = if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.keys().map(SizeBytes::total_size_bytes).sum::() + }; + + let values_size_bytes = if V::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.values().map(SizeBytes::total_size_bytes).sum::() + }; + + keys_size_bytes + values_size_bytes + } +} + +// NOTE: Do _not_ implement `SizeBytes` for slices: we cannot know whether they point to the stack +// or the heap! + +impl SizeBytes for [T; N] { + #[inline] + fn heap_size_bytes(&self) -> u64 { + if T::is_pod() { + 0 // it's a const-sized array + } else { + self.iter().map(SizeBytes::heap_size_bytes).sum::() + } + } +} + +impl SizeBytes for Vec { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for VecDeque { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for SmallVec<[T; N]> { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + if self.len() <= N { + // The `SmallVec` is still smaller than the threshold so no heap data has been + // allocated yet, beyond the heap data each element might have. + + if T::is_pod() { + 0 // early-out + } else { + self.iter().map(SizeBytes::heap_size_bytes).sum::() + } + } else { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } + } +} + +impl SizeBytes for Option { + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.as_ref().map_or(0, SizeBytes::heap_size_bytes) + } +} + +impl SizeBytes for Arc { + #[inline] + fn heap_size_bytes(&self) -> u64 { + 0 // assume it's amortized + } +} + +impl SizeBytes for Box { + #[inline] + fn heap_size_bytes(&self) -> u64 { + T::total_size_bytes(&**self) + } +} + +// TODO(rust-lang/rust#31844): `impl SizeBytesExt for T {}` would be nice but +// violates orphan rules. +macro_rules! impl_size_bytes_pod { + ($ty:ty) => { + impl SizeBytes for $ty { + #[inline] + fn heap_size_bytes(&self) -> u64 { + 0 + } + + #[inline] + fn is_pod() -> bool { + true + } + } + }; + ($ty:ty, $($rest:ty),+) => { + impl_size_bytes_pod!($ty); impl_size_bytes_pod!($($rest),+); + }; +} + +impl_size_bytes_pod!(u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, bool, f32, f64); +impl_size_bytes_pod!(half::f16); + +impl SizeBytes for (T, U) +where + T: SizeBytes, + U: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b) = self; + a.heap_size_bytes() + b.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() + } +} + +impl SizeBytes for (T, U, V) +where + T: SizeBytes, + U: SizeBytes, + V: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b, c) = self; + a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() && V::is_pod() + } +} + +impl SizeBytes for (T, U, V, W) +where + T: SizeBytes, + U: SizeBytes, + V: SizeBytes, + W: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b, c, d) = self; + a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + d.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() && V::is_pod() && W::is_pod() + } +} diff --git a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs index aee17cbd5442..f3ee0ef8abd3 100644 --- a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs @@ -8,7 +8,7 @@ use re_ui::UiExt; // Note: this is copied and heavily modified from `re_data_ui`. We don't want to unify them because // that would likely introduce an undesired dependency (`re_chunk_store_ui` should remain as // independent as possible from the viewer, so it may be split off one day). -pub(crate) fn arrow_ui(ui: &mut egui::Ui, array: &dyn arrow2::array::Array) { +pub(crate) fn arrow2_ui(ui: &mut egui::Ui, array: &dyn arrow2::array::Array) { ui.scope(|ui| { ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Truncate); diff --git a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs index 2007531b7512..d7283f48a6a5 100644 --- a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs @@ -149,7 +149,7 @@ impl ChunkUi { chunk.component_batch_raw(&component_desc.component_name, row_index); match component_data { Some(Ok(data)) => { - crate::arrow_ui::arrow_ui(ui, &*data); + crate::arrow_ui::arrow2_ui(ui, &*data); } Some(Err(err)) => { ui.error_with_details_on_hover(err.to_string()); diff --git a/crates/viewer/re_component_ui/Cargo.toml b/crates/viewer/re_component_ui/Cargo.toml index eac5afe72e67..e77648689bab 100644 --- a/crates/viewer/re_component_ui/Cargo.toml +++ b/crates/viewer/re_component_ui/Cargo.toml @@ -32,6 +32,7 @@ re_types_core.workspace = true re_ui.workspace = true re_viewer_context.workspace = true +arrow.workspace = true egui_extras.workspace = true egui_plot.workspace = true egui.workspace = true diff --git a/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs b/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs index faa912c0f64c..510ca3755bfa 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs @@ -1,7 +1,6 @@ use re_types::{ components::{Name, Text}, datatypes::Utf8, - external::arrow2, Loggable as _, }; use re_ui::UiExt as _; @@ -84,9 +83,9 @@ pub fn display_text_ui( _db: &EntityDb, _path: &EntityPath, _row_id: Option, - data: &dyn arrow2::array::Array, + data: &dyn arrow::array::Array, ) { - let text = match Text::from_arrow2(data) { + let text = match Text::from_arrow(data) { Ok(text) => text.first().cloned(), Err(err) => { ui.error_label("Failed to deserialize") @@ -113,9 +112,9 @@ pub fn display_name_ui( _db: &EntityDb, _path: &EntityPath, _row_id: Option, - data: &dyn arrow2::array::Array, + data: &dyn arrow::array::Array, ) { - let name = match Name::from_arrow2(data) { + let name = match Name::from_arrow(data) { Ok(name) => name.first().cloned(), Err(err) => { ui.error_label("Failed to deserialize") diff --git a/crates/viewer/re_component_ui/src/fallback_ui.rs b/crates/viewer/re_component_ui/src/fallback_ui.rs index e392916fdf4b..73ddab380bea 100644 --- a/crates/viewer/re_component_ui/src/fallback_ui.rs +++ b/crates/viewer/re_component_ui/src/fallback_ui.rs @@ -17,12 +17,20 @@ pub fn fallback_component_ui( _db: &EntityDb, _entity_path: &EntityPath, _row_id: Option, - component: &dyn arrow2::array::Array, + component: &dyn arrow::array::Array, ) { arrow_ui(ui, ui_layout, component); } -fn arrow_ui(ui: &mut egui::Ui, ui_layout: UiLayout, array: &dyn arrow2::array::Array) { +fn arrow_ui(ui: &mut egui::Ui, ui_layout: UiLayout, array: &dyn arrow::array::Array) { + arrow2_ui( + ui, + ui_layout, + Box::::from(array).as_ref(), + ); +} + +fn arrow2_ui(ui: &mut egui::Ui, ui_layout: UiLayout, array: &dyn arrow2::array::Array) { use re_types::SizeBytes as _; // Special-treat text. diff --git a/crates/viewer/re_data_ui/src/component_ui_registry.rs b/crates/viewer/re_data_ui/src/component_ui_registry.rs index b0c4fab22e6d..b9218eaffaa0 100644 --- a/crates/viewer/re_data_ui/src/component_ui_registry.rs +++ b/crates/viewer/re_data_ui/src/component_ui_registry.rs @@ -23,7 +23,7 @@ pub fn add_to_registry(registry: &mut Com registry.add_legacy_display_ui( C::name(), Box::new( - |ctx, ui, ui_layout, query, db, entity_path, row_id, component_raw| match C::from_arrow2( + |ctx, ui, ui_layout, query, db, entity_path, row_id, component_raw| match C::from_arrow( component_raw, ) { Ok(components) => match components.len() { diff --git a/crates/viewer/re_selection_panel/Cargo.toml b/crates/viewer/re_selection_panel/Cargo.toml index aa09cf939c9a..3c55589ee298 100644 --- a/crates/viewer/re_selection_panel/Cargo.toml +++ b/crates/viewer/re_selection_panel/Cargo.toml @@ -35,6 +35,7 @@ re_ui.workspace = true re_viewer_context.workspace = true re_viewport_blueprint.workspace = true +arrow.workspace = true egui_tiles.workspace = true egui.workspace = true itertools.workspace = true diff --git a/crates/viewer/re_selection_panel/src/visualizer_ui.rs b/crates/viewer/re_selection_panel/src/visualizer_ui.rs index 9f10aac8862a..488da5d24e99 100644 --- a/crates/viewer/re_selection_panel/src/visualizer_ui.rs +++ b/crates/viewer/re_selection_panel/src/visualizer_ui.rs @@ -5,7 +5,7 @@ use re_data_ui::{sorted_component_list_for_ui, DataUi}; use re_entity_db::EntityDb; use re_log_types::{ComponentPath, EntityPath}; use re_types::blueprint::components::VisualizerOverrides; -use re_types::external::arrow2; +use re_types_core::external::arrow::array::ArrayRef; use re_ui::{list_item, UiExt as _}; use re_view::latest_at_with_blueprint_resolved_data; use re_viewer_context::{ @@ -160,7 +160,7 @@ fn visualizer_components( fn non_empty_component_batch_raw( unit: Option<&UnitChunkShared>, component_name: &ComponentName, - ) -> Option<(Option, Box)> { + ) -> Option<(Option, ArrayRef)> { let unit = unit?; let batch = unit.component_batch_raw(component_name)?; if batch.is_empty() { @@ -397,8 +397,8 @@ fn visualizer_components( override_path, &raw_override.clone().map(|(_, raw_override)| raw_override), raw_default.clone().map(|(_, raw_override)| raw_override), - raw_fallback.as_ref(), - raw_current_value.as_ref(), + raw_fallback.clone(), + raw_current_value.clone(), ); }), add_children, @@ -417,7 +417,7 @@ fn editable_blueprint_component_list_item( blueprint_path: &EntityPath, component: re_types::ComponentName, row_id: Option, - raw_override: &dyn arrow2::array::Array, + raw_override: &dyn arrow::array::Array, ) -> egui::Response { ui.list_item_flat_noninteractive( list_item::PropertyContent::new(name) @@ -449,10 +449,10 @@ fn menu_more( ui: &mut egui::Ui, component_name: re_types::ComponentName, override_path: &EntityPath, - raw_override: &Option>, - raw_default: Option>, - raw_fallback: &dyn arrow2::array::Array, - raw_current_value: &dyn arrow2::array::Array, + raw_override: &Option, + raw_default: Option, + raw_fallback: arrow::array::ArrayRef, + raw_current_value: arrow::array::ArrayRef, ) { if ui .add_enabled(raw_override.is_some(), egui::Button::new("Remove override")) @@ -478,7 +478,7 @@ fn menu_more( } if ui.button("Set to fallback value").clicked() { - ctx.save_blueprint_array(override_path, component_name, raw_fallback.to_boxed()); + ctx.save_blueprint_array(override_path, component_name, raw_fallback); ui.close_menu(); } @@ -503,7 +503,7 @@ fn menu_more( ctx.save_blueprint_array( &ViewBlueprint::defaults_path(ctx.view_id), component_name, - raw_current_value.to_boxed(), + raw_current_value, ); ui.close_menu(); } diff --git a/crates/viewer/re_view/Cargo.toml b/crates/viewer/re_view/Cargo.toml index 6bfd5705e581..29e1973862a3 100644 --- a/crates/viewer/re_view/Cargo.toml +++ b/crates/viewer/re_view/Cargo.toml @@ -37,6 +37,7 @@ re_viewport_blueprint.workspace = true ahash.workspace = true arrow.workspace = true +arrow2.workspace = true bytemuck.workspace = true egui.workspace = true glam.workspace = true diff --git a/crates/viewer/re_view/src/query.rs b/crates/viewer/re_view/src/query.rs index 173a6e453831..7365c2324cc8 100644 --- a/crates/viewer/re_view/src/query.rs +++ b/crates/viewer/re_view/src/query.rs @@ -1,10 +1,11 @@ +use arrow::array::ArrayRef; use nohash_hasher::IntSet; use crate::{ results_ext::{HybridLatestAtResults, HybridRangeResults}, HybridResults, }; -use re_chunk_store::{external::re_chunk::Arrow2Array, LatestAtQuery, RangeQuery, RowId}; +use re_chunk_store::{LatestAtQuery, RangeQuery, RowId}; use re_log_types::{TimeInt, Timeline}; use re_query::LatestAtResults; use re_types_core::{Archetype, ComponentName}; @@ -225,7 +226,7 @@ pub trait DataResultQuery { query_ctx: &'a QueryContext<'a>, visualizer_collection: &'a re_viewer_context::VisualizerCollection, component: re_types_core::ComponentName, - ) -> Box; + ) -> ArrayRef; } impl DataResultQuery for DataResult { @@ -265,7 +266,7 @@ impl DataResultQuery for DataResult { query_ctx: &'a QueryContext<'a>, visualizer_collection: &'a re_viewer_context::VisualizerCollection, component: re_types_core::ComponentName, - ) -> Box { + ) -> ArrayRef { // TODO(jleibs): This should be cached somewhere for vis in &self.visualizers { let Ok(vis) = visualizer_collection.get_by_identifier(*vis) else { diff --git a/crates/viewer/re_view/src/results_ext.rs b/crates/viewer/re_view/src/results_ext.rs index 8e4118a48519..f51350480e55 100644 --- a/crates/viewer/re_view/src/results_ext.rs +++ b/crates/viewer/re_view/src/results_ext.rs @@ -1,10 +1,9 @@ -use std::borrow::Cow; -use std::sync::Arc; +use std::{borrow::Cow, sync::Arc}; use itertools::Itertools as _; use re_chunk_store::{Chunk, LatestAtQuery, RangeQuery, UnitChunkShared}; -use re_log_types::external::arrow2::{array::Array as Arrow2Array, bitmap::Bitmap as Arrow2Bitmap}; +use re_log_types::external::arrow2::bitmap::Bitmap as Arrow2Bitmap; use re_log_types::hash::Hash64; use re_query::{LatestAtResults, RangeResults}; use re_types_core::ComponentName; @@ -50,7 +49,7 @@ impl HybridLatestAtResults<'_> { .or_else(|| self.defaults.get(&component_name)) } - pub fn fallback_raw(&self, component_name: ComponentName) -> Box { + pub fn fallback_raw(&self, component_name: ComponentName) -> arrow::array::ArrayRef { let query_context = QueryContext { viewer_ctx: self.ctx.viewer_ctx, target_entity_path: &self.data_result.entity_path, @@ -118,7 +117,7 @@ impl HybridLatestAtResults<'_> { .or_else(|| { // No override, no store, no default -> try fallback instead let raw_fallback = self.fallback_raw(C::name()); - C::from_arrow2(raw_fallback.as_ref()) + C::from_arrow(raw_fallback.as_ref()) .ok() .and_then(|r| r.first().cloned()) }) diff --git a/crates/viewer/re_view_dataframe/Cargo.toml b/crates/viewer/re_view_dataframe/Cargo.toml index 871c6cab85f9..425b6bd42e62 100644 --- a/crates/viewer/re_view_dataframe/Cargo.toml +++ b/crates/viewer/re_view_dataframe/Cargo.toml @@ -33,6 +33,7 @@ re_viewer_context.workspace = true re_viewport_blueprint.workspace = true anyhow.workspace = true +arrow.workspace = true egui_table.workspace = true egui.workspace = true itertools.workspace = true diff --git a/crates/viewer/re_view_dataframe/src/display_record_batch.rs b/crates/viewer/re_view_dataframe/src/display_record_batch.rs index e8217b0ca165..6260f74cb7e0 100644 --- a/crates/viewer/re_view_dataframe/src/display_record_batch.rs +++ b/crates/viewer/re_view_dataframe/src/display_record_batch.rs @@ -145,6 +145,8 @@ impl ComponentData { data }; + let data_to_display: arrow::array::ArrayRef = data_to_display.into(); + ctx.component_ui_registry.ui_raw( ctx, ui, @@ -154,7 +156,7 @@ impl ComponentData { entity_path, component_name, None, - &*data_to_display, + data_to_display.as_ref(), ); } else { ui.label("-"); diff --git a/crates/viewer/re_view_time_series/src/line_visualizer_system.rs b/crates/viewer/re_view_time_series/src/line_visualizer_system.rs index 140bc073bf28..03ee2a16469b 100644 --- a/crates/viewer/re_view_time_series/src/line_visualizer_system.rs +++ b/crates/viewer/re_view_time_series/src/line_visualizer_system.rs @@ -4,7 +4,7 @@ use re_chunk_store::{RangeQuery, RowId}; use re_log_types::{EntityPath, TimeInt}; use re_types::archetypes; use re_types::components::{AggregationPolicy, ClearIsRecursive}; -use re_types::external::arrow2::datatypes::DataType as Arrow2Datatype; +use re_types::external::arrow::datatypes::DataType as ArrowDatatype; use re_types::{ archetypes::SeriesLine, components::{Color, Name, Scalar, StrokeWidth}, @@ -243,7 +243,7 @@ impl SeriesLineSystem { chunk.iter_component_indices(&query.timeline(), &Scalar::name()) }) .map(|(data_time, _)| { - debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64); + debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); PlotPoint { time: data_time.as_i64(), @@ -257,7 +257,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill values"); - debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64); + debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); all_scalar_chunks .iter() .flat_map(|chunk| chunk.iter_primitive::(&Scalar::name())) @@ -281,7 +281,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill colors"); - debug_assert_eq!(Color::arrow2_datatype(), Arrow2Datatype::UInt32); + debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32); fn map_raw_color(raw: &[u32]) -> Option { raw.first().map(|c| { @@ -334,7 +334,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill stroke widths"); - debug_assert_eq!(StrokeWidth::arrow2_datatype(), Arrow2Datatype::Float32); + debug_assert_eq!(StrokeWidth::arrow_datatype(), ArrowDatatype::Float32); { let all_stroke_width_chunks = results.get_optional_chunks(&StrokeWidth::name()); diff --git a/crates/viewer/re_view_time_series/src/point_visualizer_system.rs b/crates/viewer/re_view_time_series/src/point_visualizer_system.rs index 9ab73b3855f1..912fbd149474 100644 --- a/crates/viewer/re_view_time_series/src/point_visualizer_system.rs +++ b/crates/viewer/re_view_time_series/src/point_visualizer_system.rs @@ -3,7 +3,7 @@ use itertools::Itertools as _; use re_types::{ archetypes::{self, SeriesPoint}, components::{Color, MarkerShape, MarkerSize, Name, Scalar}, - external::arrow2::datatypes::DataType as Arrow2Datatype, + external::arrow::datatypes::DataType as ArrowDatatype, Archetype as _, Component as _, Loggable as _, }; use re_view::range_with_blueprint_resolved_data; @@ -257,7 +257,7 @@ impl SeriesPointSystem { chunk.iter_component_indices(&query.timeline(), &Scalar::name()) }) .map(|(data_time, _)| { - debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64); + debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); PlotPoint { time: data_time.as_i64(), @@ -271,7 +271,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill values"); - debug_assert_eq!(Scalar::arrow2_datatype(), Arrow2Datatype::Float64); + debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); let mut i = 0; all_scalar_chunks .iter() @@ -297,7 +297,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill colors"); - debug_assert_eq!(Color::arrow2_datatype(), Arrow2Datatype::UInt32); + debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32); fn map_raw_color(raw: &[u32]) -> Option { raw.first().map(|c| { @@ -351,7 +351,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill marker sizes"); - debug_assert_eq!(MarkerSize::arrow2_datatype(), Arrow2Datatype::Float32); + debug_assert_eq!(MarkerSize::arrow_datatype(), ArrowDatatype::Float32); { let all_marker_size_chunks = results.get_optional_chunks(&MarkerSize::name()); diff --git a/crates/viewer/re_viewer/src/blueprint/validation.rs b/crates/viewer/re_viewer/src/blueprint/validation.rs index 048c4569e2ec..2d5c10a1db2f 100644 --- a/crates/viewer/re_viewer/src/blueprint/validation.rs +++ b/crates/viewer/re_viewer/src/blueprint/validation.rs @@ -26,7 +26,7 @@ pub(crate) fn validate_component(blueprint: &EntityDb) -> bool { .latest_at(&query, path, [C::name()]) .component_batch_raw(&C::name()) { - if let Err(err) = C::from_arrow2_opt(&*array) { + if let Err(err) = C::from_arrow_opt(&*array) { re_log::debug!( "Failed to deserialize component {:?}: {:?}", C::name(), diff --git a/crates/viewer/re_viewer_context/Cargo.toml b/crates/viewer/re_viewer_context/Cargo.toml index e8cf0eef90d3..dc1dc38cbc33 100644 --- a/crates/viewer/re_viewer_context/Cargo.toml +++ b/crates/viewer/re_viewer_context/Cargo.toml @@ -40,6 +40,7 @@ re_video = { workspace = true, features = ["serde"] } ahash.workspace = true anyhow.workspace = true +arrow.workspace = true bit-vec.workspace = true bitflags.workspace = true bytemuck.workspace = true diff --git a/crates/viewer/re_viewer_context/src/blueprint_helpers.rs b/crates/viewer/re_viewer_context/src/blueprint_helpers.rs index ac0265998a38..ab3a16bda1de 100644 --- a/crates/viewer/re_viewer_context/src/blueprint_helpers.rs +++ b/crates/viewer/re_viewer_context/src/blueprint_helpers.rs @@ -1,4 +1,5 @@ -use re_chunk::{Arrow2Array, RowId}; +use arrow::array::ArrayRef; +use re_chunk::RowId; use re_chunk_store::external::re_chunk::Chunk; use re_log_types::{EntityPath, TimeInt, TimePoint, Timeline}; use re_types::{AsComponents, ComponentBatch, ComponentDescriptor, ComponentName}; @@ -86,7 +87,7 @@ impl ViewerContext<'_> { &self, entity_path: &EntityPath, component_name: ComponentName, - array: Box, + array: ArrayRef, ) { let timepoint = self.store_context.blueprint_timepoint_for_writes(); @@ -126,7 +127,7 @@ impl ViewerContext<'_> { &self, entity_path: &EntityPath, component_name: ComponentName, - ) -> Option> { + ) -> Option { self.store_context .default_blueprint .and_then(|default_blueprint| { @@ -179,7 +180,7 @@ impl ViewerContext<'_> { timepoint, [( ComponentDescriptor::new(component_name), - re_chunk::external::arrow2::array::new_empty_array(datatype), + re_chunk::external::arrow::array::new_empty_array(&datatype), )], ) .build(); diff --git a/crates/viewer/re_viewer_context/src/component_fallbacks.rs b/crates/viewer/re_viewer_context/src/component_fallbacks.rs index fba8527b51f0..0ad9e0babdb6 100644 --- a/crates/viewer/re_viewer_context/src/component_fallbacks.rs +++ b/crates/viewer/re_viewer_context/src/component_fallbacks.rs @@ -1,11 +1,13 @@ -use re_types::{external::arrow2, ComponentName}; +use arrow::array::ArrayRef; + +use re_types::ComponentName; use crate::QueryContext; /// Result for a fallback request to a provider. pub enum ComponentFallbackProviderResult { /// A fallback value was successfully provided. - Value(Box), + Value(ArrayRef), /// The fallback provider is not able to handle the given component. /// @@ -20,7 +22,7 @@ pub enum ComponentFallbackProviderResult { impl From for ComponentFallbackProviderResult { fn from(batch: T) -> Self { - match batch.to_arrow2() { + match batch.to_arrow() { Ok(value) => Self::Value(value), Err(err) => Self::SerializationError(err), } @@ -53,11 +55,7 @@ pub trait ComponentFallbackProvider { /// Provides a fallback value for a given component, first trying the provider and /// then falling back to the placeholder value registered in the viewer context. - fn fallback_for( - &self, - ctx: &QueryContext<'_>, - component: ComponentName, - ) -> Box { + fn fallback_for(&self, ctx: &QueryContext<'_>, component: ComponentName) -> ArrayRef { match self.try_provide_fallback(ctx, component) { ComponentFallbackProviderResult::Value(value) => { return value; diff --git a/crates/viewer/re_viewer_context/src/component_ui_registry.rs b/crates/viewer/re_viewer_context/src/component_ui_registry.rs index 3507aaa423cc..e04caa265280 100644 --- a/crates/viewer/re_viewer_context/src/component_ui_registry.rs +++ b/crates/viewer/re_viewer_context/src/component_ui_registry.rs @@ -1,14 +1,11 @@ use std::collections::BTreeMap; -use re_chunk::{Arrow2Array, RowId, UnitChunkShared}; +use re_chunk::{RowId, UnitChunkShared}; use re_chunk_store::LatestAtQuery; use re_entity_db::{EntityDb, EntityPath}; use re_log::ResultExt; use re_log_types::Instance; -use re_types::{ - external::arrow2::{self}, - ComponentName, -}; +use re_types::ComponentName; use re_ui::UiExt as _; use crate::{ComponentFallbackProvider, MaybeMutRef, QueryContext, ViewerContext}; @@ -174,7 +171,7 @@ type LegacyDisplayComponentUiCallback = Box< &EntityDb, &EntityPath, Option, - &dyn arrow2::array::Array, + &dyn arrow::array::Array, ) + Send + Sync, >; @@ -196,9 +193,9 @@ type UntypedComponentEditOrViewCallback = Box< dyn Fn( &ViewerContext<'_>, &mut egui::Ui, - &dyn arrow2::array::Array, + &dyn arrow::array::Array, EditOrView, - ) -> Option> + ) -> Option + Send + Sync, >; @@ -336,7 +333,7 @@ impl ComponentUiRegistry { if response.changed() { use re_types::LoggableBatch as _; - deserialized_value.to_arrow2().ok_or_log_error_once() + deserialized_value.to_arrow().ok_or_log_error_once() } else { None } @@ -413,7 +410,7 @@ impl ComponentUiRegistry { // Enforce clamp-to-border semantics. // TODO(andreas): Is that always what we want? let index = index.clamp(0, array.len().saturating_sub(1)); - let component_raw = array.sliced(index, 1); + let component_raw = array.slice(index, 1); self.ui_raw( ctx, @@ -440,7 +437,7 @@ impl ComponentUiRegistry { entity_path: &EntityPath, component_name: ComponentName, row_id: Option, - component_raw: &dyn arrow2::array::Array, + component_raw: &dyn arrow::array::Array, ) { re_tracing::profile_function!(component_name.full_name()); @@ -504,7 +501,7 @@ impl ComponentUiRegistry { blueprint_write_path: &EntityPath, component_name: ComponentName, row_id: Option, - component_array: Option<&dyn Arrow2Array>, + component_array: Option<&dyn arrow::array::Array>, fallback_provider: &dyn ComponentFallbackProvider, ) { let multiline = true; @@ -535,7 +532,7 @@ impl ComponentUiRegistry { blueprint_write_path: &EntityPath, component_name: ComponentName, row_id: Option, - component_query_result: Option<&dyn Arrow2Array>, + component_query_result: Option<&dyn arrow::array::Array>, fallback_provider: &dyn ComponentFallbackProvider, ) { let multiline = false; @@ -561,31 +558,32 @@ impl ComponentUiRegistry { blueprint_write_path: &EntityPath, component_name: ComponentName, row_id: Option, - component_array: Option<&dyn Arrow2Array>, + component_array: Option<&dyn arrow::array::Array>, fallback_provider: &dyn ComponentFallbackProvider, allow_multiline: bool, ) { re_tracing::profile_function!(component_name.full_name()); - // Use a fallback if there's either no component data at all or the component array is empty. - let component_raw = if let Some(component_raw) = - component_array.and_then(|array| (!array.is_empty()).then(|| array.to_boxed())) - { - component_raw - } else { - fallback_provider.fallback_for(ctx, component_name) + let mut run_with = |array| { + self.edit_ui_raw( + ctx, + ui, + origin_db, + blueprint_write_path, + component_name, + row_id, + array, + allow_multiline, + ); }; - self.edit_ui_raw( - ctx, - ui, - origin_db, - blueprint_write_path, - component_name, - row_id, - component_raw.as_ref(), - allow_multiline, - ); + // Use a fallback if there's either no component data at all or the component array is empty. + if let Some(component_array) = component_array.filter(|array| !array.is_empty()) { + run_with(component_array); + } else { + let fallback = fallback_provider.fallback_for(ctx, component_name); + run_with(fallback.as_ref()); + } } #[allow(clippy::too_many_arguments)] @@ -597,13 +595,13 @@ impl ComponentUiRegistry { blueprint_write_path: &EntityPath, component_name: ComponentName, row_id: Option, - component_raw: &dyn arrow2::array::Array, + component_raw: &dyn arrow::array::Array, allow_multiline: bool, ) { if !self.try_show_edit_ui( ctx.viewer_ctx, ui, - component_raw.as_ref(), + component_raw, blueprint_write_path, component_name, allow_multiline, @@ -631,7 +629,7 @@ impl ComponentUiRegistry { &self, ctx: &ViewerContext<'_>, ui: &mut egui::Ui, - raw_current_value: &dyn arrow2::array::Array, + raw_current_value: &dyn arrow::array::Array, blueprint_write_path: &EntityPath, component_name: ComponentName, allow_multiline: bool, @@ -660,9 +658,9 @@ impl ComponentUiRegistry { } } -fn try_deserialize(value: &dyn arrow2::array::Array) -> Option { +fn try_deserialize(value: &dyn arrow::array::Array) -> Option { let component_name = C::name(); - let deserialized = C::from_arrow2(value); + let deserialized = C::from_arrow(value); match deserialized { Ok(values) => { if values.len() > 1 { diff --git a/crates/viewer/re_viewer_context/src/view/view_context.rs b/crates/viewer/re_viewer_context/src/view/view_context.rs index 9f8104552328..be33c854ba4d 100644 --- a/crates/viewer/re_viewer_context/src/view/view_context.rs +++ b/crates/viewer/re_viewer_context/src/view/view_context.rs @@ -1,6 +1,5 @@ use std::sync::Arc; -use re_chunk::Arrow2Array; use re_chunk_store::LatestAtQuery; use re_log_types::{EntityPath, TimePoint}; use re_query::StorageEngineReadGuard; @@ -97,7 +96,7 @@ impl<'a> ViewContext<'a> { &self, entity_path: &EntityPath, component_name: ComponentName, - array: Box, + array: arrow::array::ArrayRef, ) { self.viewer_ctx .save_blueprint_array(entity_path, component_name, array); diff --git a/crates/viewer/re_viewer_context/src/viewer_context.rs b/crates/viewer/re_viewer_context/src/viewer_context.rs index c4210930819d..e5720a6404d7 100644 --- a/crates/viewer/re_viewer_context/src/viewer_context.rs +++ b/crates/viewer/re_viewer_context/src/viewer_context.rs @@ -1,4 +1,5 @@ use ahash::HashMap; +use arrow::array::ArrayRef; use parking_lot::RwLock; use re_chunk_store::LatestAtQuery; @@ -227,10 +228,7 @@ impl ViewerContext<'_> { /// The rationale is that to get into this situation, we need to know of a component name for which /// we don't have a datatype, meaning that we can't make any statement about what data this component should represent. // TODO(andreas): Are there cases where this is expected and how to handle this? - pub fn placeholder_for( - &self, - component: re_chunk::ComponentName, - ) -> Box { + pub fn placeholder_for(&self, component: re_chunk::ComponentName) -> ArrayRef { let datatype = if let Some(reflection) = self.reflection.components.get(&component) { // It's a builtin type with reflection. We either have custom place holder, or can rely on the known datatype. if let Some(placeholder) = reflection.custom_placeholder.as_ref() { @@ -251,7 +249,7 @@ impl ViewerContext<'_> { // TODO(andreas): Is this operation common enough to cache the result? If so, here or in the reflection data? // The nice thing about this would be that we could always give out references (but updating said cache wouldn't be easy in that case). - re_types::reflection::generic_placeholder_for_datatype(&datatype) + re_types::reflection::generic_placeholder_for_datatype(&datatype).into() } } diff --git a/crates/viewer/re_viewport_blueprint/Cargo.toml b/crates/viewer/re_viewport_blueprint/Cargo.toml index e4a982608ae9..de84226d4558 100644 --- a/crates/viewer/re_viewport_blueprint/Cargo.toml +++ b/crates/viewer/re_viewport_blueprint/Cargo.toml @@ -31,6 +31,7 @@ re_ui.workspace = true re_viewer_context.workspace = true ahash.workspace = true +arrow.workspace = true egui_tiles.workspace = true egui.workspace = true itertools.workspace = true diff --git a/crates/viewer/re_viewport_blueprint/src/view_properties.rs b/crates/viewer/re_viewport_blueprint/src/view_properties.rs index 4df9945f0a93..a63b923c7b67 100644 --- a/crates/viewer/re_viewport_blueprint/src/view_properties.rs +++ b/crates/viewer/re_viewport_blueprint/src/view_properties.rs @@ -1,9 +1,7 @@ use re_chunk_store::LatestAtQuery; use re_entity_db::{external::re_query::LatestAtResults, EntityDb}; use re_log_types::EntityPath; -use re_types::{ - external::arrow2, Archetype, ArchetypeName, ComponentBatch, ComponentName, DeserializationError, -}; +use re_types::{Archetype, ArchetypeName, ComponentBatch, ComponentName, DeserializationError}; use re_viewer_context::{ external::re_entity_db::EntityTree, ComponentFallbackError, ComponentFallbackProvider, QueryContext, ViewId, ViewSystemExecutionError, ViewerContext, @@ -113,7 +111,7 @@ impl ViewProperty { view_state: &dyn re_viewer_context::ViewState, ) -> Result, ViewPropertyQueryError> { let component_name = C::name(); - C::from_arrow2( + C::from_arrow( self.component_or_fallback_raw(ctx, component_name, fallback_provider, view_state) .as_ref(), ) @@ -135,7 +133,7 @@ impl ViewProperty { ) -> Result>, DeserializationError> { let component_name = C::name(); self.component_raw(component_name) - .map(|raw| C::from_arrow2(raw.as_ref())) + .map(|raw| C::from_arrow(raw.as_ref())) .transpose() } @@ -153,13 +151,11 @@ impl ViewProperty { .and_then(|unit| unit.row_id()) } - pub fn component_raw( - &self, - component_name: ComponentName, - ) -> Option> { - self.query_results - .get(&component_name) - .and_then(|unit| unit.component_batch_raw(&component_name)) + pub fn component_raw(&self, component_name: ComponentName) -> Option { + self.query_results.get(&component_name).and_then(|unit| { + unit.component_batch_raw_arrow2(&component_name) + .map(|array| array.into()) + }) } fn component_or_fallback_raw( @@ -168,7 +164,7 @@ impl ViewProperty { component_name: ComponentName, fallback_provider: &dyn ComponentFallbackProvider, view_state: &dyn re_viewer_context::ViewState, - ) -> Box { + ) -> arrow::array::ArrayRef { if let Some(value) = self.component_raw(component_name) { if value.len() > 0 { return value; diff --git a/examples/rust/extend_viewer_ui/src/main.rs b/examples/rust/extend_viewer_ui/src/main.rs index 76724ef27de2..7c8cb9918133 100644 --- a/examples/rust/extend_viewer_ui/src/main.rs +++ b/examples/rust/extend_viewer_ui/src/main.rs @@ -163,7 +163,7 @@ fn component_ui( .cache() .latest_at(&query, entity_path, [component_name]); - if let Some(data) = results.component_batch_raw(&component_name) { + if let Some(data) = results.component_batch_raw_arrow2(&component_name) { egui::ScrollArea::vertical() .auto_shrink([false, true]) .show(ui, |ui| { @@ -171,13 +171,13 @@ fn component_ui( let num_instances = data.len(); for i in 0..num_instances { - ui.label(format_arrow(&*data.sliced(i, 1))); + ui.label(format_arrow2(&*data.sliced(i, 1))); } }); }; } -fn format_arrow(value: &dyn arrow2::array::Array) -> String { +fn format_arrow2(value: &dyn arrow2::array::Array) -> String { use re_types::SizeBytes as _; let bytes = value.total_size_bytes(); From d65c9ec737591ff88fdbdf4a3898b623df85a0e9 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Thu, 19 Dec 2024 15:42:34 +0100 Subject: [PATCH 04/11] Expand remote APIs to allow for server-side query execution (#8537) ### What This mirrors the existing Recording API surface and query-construction, but dispatches the query through the the server. Without access to the schema, we are not yet able to support glob-expressions for content (https://github.com/rerun-io/dataplatform/issues/105) Recommend viewing without whitespace: https://github.com/rerun-io/rerun/pull/8537/files?w=1 --- Cargo.lock | 1 + crates/store/re_grpc_client/src/lib.rs | 6 +- .../src/path/entity_path_filter.rs | 6 + rerun_py/Cargo.toml | 2 + rerun_py/rerun_bindings/rerun_bindings.pyi | 22 +- rerun_py/src/dataframe.rs | 233 ++++++----- rerun_py/src/remote.rs | 384 +++++++++++++++++- 7 files changed, 547 insertions(+), 107 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 222719c60112..31437527f81a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7287,6 +7287,7 @@ dependencies = [ "re_chunk", "re_chunk_store", "re_dataframe", + "re_grpc_client", "re_log", "re_log_encoding", "re_log_types", diff --git a/crates/store/re_grpc_client/src/lib.rs b/crates/store/re_grpc_client/src/lib.rs index f324862dc3a8..4014d6b974b2 100644 --- a/crates/store/re_grpc_client/src/lib.rs +++ b/crates/store/re_grpc_client/src/lib.rs @@ -38,7 +38,7 @@ use re_protos::remote_store::v0::{ /// Wrapper with a nicer error message #[derive(Debug)] -struct TonicStatusError(tonic::Status); +pub struct TonicStatusError(pub tonic::Status); impl std::fmt::Display for TonicStatusError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -65,7 +65,7 @@ impl Error for TonicStatusError { } #[derive(thiserror::Error, Debug)] -enum StreamError { +pub enum StreamError { /// Native connection error #[cfg(not(target_arch = "wasm32"))] #[error(transparent)] @@ -268,7 +268,7 @@ async fn stream_recording_async( Ok(()) } -fn store_info_from_catalog_chunk( +pub fn store_info_from_catalog_chunk( tc: &TransportChunk, recording_id: &str, ) -> Result { diff --git a/crates/store/re_log_types/src/path/entity_path_filter.rs b/crates/store/re_log_types/src/path/entity_path_filter.rs index 9f94525e9bcc..ce69f6ddd746 100644 --- a/crates/store/re_log_types/src/path/entity_path_filter.rs +++ b/crates/store/re_log_types/src/path/entity_path_filter.rs @@ -587,6 +587,12 @@ impl EntityPathFilter { // inclusion rule and didn't hit an exclusion rule. true } + + #[inline] + /// Iterate over all rules in the filter. + pub fn rules(&self) -> impl Iterator { + self.rules.iter() + } } impl EntityPathRule { diff --git a/rerun_py/Cargo.toml b/rerun_py/Cargo.toml index 5357d7e53a8d..99cdf915700a 100644 --- a/rerun_py/Cargo.toml +++ b/rerun_py/Cargo.toml @@ -39,6 +39,7 @@ remote = [ "dep:object_store", "dep:re_protos", "dep:re_ws_comms", + "dep:re_grpc_client", "dep:tokio", "dep:tokio-stream", "dep:tonic", @@ -61,6 +62,7 @@ re_build_info.workspace = true re_chunk = { workspace = true, features = ["arrow"] } re_chunk_store.workspace = true re_dataframe.workspace = true +re_grpc_client = { workspace = true, optional = true } re_log = { workspace = true, features = ["setup"] } re_log_encoding = { workspace = true } re_log_types.workspace = true diff --git a/rerun_py/rerun_bindings/rerun_bindings.pyi b/rerun_py/rerun_bindings/rerun_bindings.pyi index bd046bf15069..2420615ec2d9 100644 --- a/rerun_py/rerun_bindings/rerun_bindings.pyi +++ b/rerun_py/rerun_bindings/rerun_bindings.pyi @@ -615,7 +615,27 @@ class StorageNodeClient: """ Open a [`Recording`][rerun.dataframe.Recording] by id to use with the dataframe APIs. - This currently downloads the full recording to the local machine. + This will run queries against the remote storage node and stream the results. Faster for small + numbers of queries with small results. + + Parameters + ---------- + id : str + The id of the recording to open. + + Returns + ------- + Recording + The opened recording. + + """ + ... + + def download_recording(self, id: str) -> Recording: + """ + Download a [`Recording`][rerun.dataframe.Recording] by id to use with the dataframe APIs. + + This will download the full recording to memory and run queries against a local chunk store. Parameters ---------- diff --git a/rerun_py/src/dataframe.rs b/rerun_py/src/dataframe.rs index 3f75a459039e..563322bba0c5 100644 --- a/rerun_py/src/dataframe.rs +++ b/rerun_py/src/dataframe.rs @@ -28,6 +28,9 @@ use re_log_encoding::VersionPolicy; use re_log_types::{EntityPathFilter, ResolvedTimeRange, TimeType}; use re_sdk::{ComponentName, EntityPath, StoreId, StoreKind}; +#[cfg(feature = "remote")] +use crate::remote::PyRemoteRecording; + /// Register the `rerun.dataframe` module. pub(crate) fn register(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; @@ -427,7 +430,7 @@ impl IndexValuesLike<'_> { } } -struct ComponentLike(String); +pub struct ComponentLike(pub String); impl FromPyObject<'_> for ComponentLike { fn extract_bound(component: &Bound<'_, PyAny>) -> PyResult { @@ -570,6 +573,13 @@ pub struct PyRecording { pub(crate) cache: re_dataframe::QueryCacheHandle, } +#[derive(Clone)] +pub enum PyRecordingHandle { + Local(std::sync::Arc>), + #[cfg(feature = "remote")] + Remote(std::sync::Arc>), +} + /// A view of a recording restricted to a given index, containing a specific set of entities and components. /// /// See [`Recording.view(…)`][rerun.dataframe.Recording.view] for details on how to create a `RecordingView`. @@ -588,9 +598,9 @@ pub struct PyRecording { #[pyclass(name = "RecordingView")] #[derive(Clone)] pub struct PyRecordingView { - recording: std::sync::Arc>, + pub(crate) recording: PyRecordingHandle, - query_expression: QueryExpression, + pub(crate) query_expression: QueryExpression, } impl PyRecordingView { @@ -638,19 +648,27 @@ impl PyRecordingView { /// /// This schema will only contain the columns that are included in the view via /// the view contents. - fn schema(&self, py: Python<'_>) -> PySchema { - let borrowed = self.recording.borrow(py); - let engine = borrowed.engine(); + fn schema(&self, py: Python<'_>) -> PyResult { + match &self.recording { + PyRecordingHandle::Local(recording) => { + let borrowed: PyRef<'_, PyRecording> = recording.borrow(py); + let engine = borrowed.engine(); - let mut query_expression = self.query_expression.clone(); - query_expression.selection = None; + let mut query_expression = self.query_expression.clone(); + query_expression.selection = None; - let query_handle = engine.query(query_expression); + let query_handle = engine.query(query_expression); - let contents = query_handle.view_contents(); + let contents = query_handle.view_contents(); - PySchema { - schema: contents.to_vec(), + Ok(PySchema { + schema: contents.to_vec(), + }) + } + #[cfg(feature = "remote")] + PyRecordingHandle::Remote(_) => Err::<_, PyErr>(PyRuntimeError::new_err( + "Schema is not implemented for remote recordings yet.", + )), } } @@ -691,60 +709,72 @@ impl PyRecordingView { args: &Bound<'_, PyTuple>, columns: Option>, ) -> PyResult>> { - let borrowed = self.recording.borrow(py); - let engine = borrowed.engine(); - let mut query_expression = self.query_expression.clone(); - query_expression.selection = Self::select_args(args, columns)?; - let query_handle = engine.query(query_expression); + match &self.recording { + PyRecordingHandle::Local(recording) => { + let borrowed = recording.borrow(py); + let engine = borrowed.engine(); - // If the only contents found are static, we might need to warn the user since - // this means we won't naturally have any rows in the result. - let available_data_columns = query_handle - .view_contents() - .iter() - .filter(|c| matches!(c, ColumnDescriptor::Component(_))) - .collect::>(); - - // We only consider all contents static if there at least some columns - let all_contents_are_static = !available_data_columns.is_empty() - && available_data_columns.iter().all(|c| c.is_static()); - - // Additionally, we only want to warn if the user actually tried to select some - // of the static columns. Otherwise the fact that there are no results shouldn't - // be surprising. - let selected_data_columns = query_handle - .selected_contents() - .iter() - .map(|(_, col)| col) - .filter(|c| matches!(c, ColumnDescriptor::Component(_))) - .collect::>(); + let query_handle = engine.query(query_expression); - let any_selected_data_is_static = selected_data_columns.iter().any(|c| c.is_static()); - - if self.query_expression.using_index_values.is_none() - && all_contents_are_static - && any_selected_data_is_static - { - py_rerun_warn("RecordingView::select: tried to select static data, but no non-static contents generated an index value on this timeline. No results will be returned. Either include non-static data or consider using `select_static()` instead.")?; - } + // If the only contents found are static, we might need to warn the user since + // this means we won't naturally have any rows in the result. + let available_data_columns = query_handle + .view_contents() + .iter() + .filter(|c| matches!(c, ColumnDescriptor::Component(_))) + .collect::>(); + + // We only consider all contents static if there at least some columns + let all_contents_are_static = !available_data_columns.is_empty() + && available_data_columns.iter().all(|c| c.is_static()); + + // Additionally, we only want to warn if the user actually tried to select some + // of the static columns. Otherwise the fact that there are no results shouldn't + // be surprising. + let selected_data_columns = query_handle + .selected_contents() + .iter() + .map(|(_, col)| col) + .filter(|c| matches!(c, ColumnDescriptor::Component(_))) + .collect::>(); - let schema = query_handle.schema(); - let fields: Vec = - schema.fields.iter().map(|f| f.clone().into()).collect(); - let metadata = schema.metadata.clone().into_iter().collect(); - let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata); + let any_selected_data_is_static = + selected_data_columns.iter().any(|c| c.is_static()); - let reader = RecordBatchIterator::new( - query_handle - .into_batch_iter() - .map(|batch| batch.try_to_arrow_record_batch()), - std::sync::Arc::new(schema), - ); + if self.query_expression.using_index_values.is_none() + && all_contents_are_static + && any_selected_data_is_static + { + py_rerun_warn("RecordingView::select: tried to select static data, but no non-static contents generated an index value on this timeline. No results will be returned. Either include non-static data or consider using `select_static()` instead.")?; + } - Ok(PyArrowType(Box::new(reader))) + let schema = query_handle.schema(); + let fields: Vec = + schema.fields.iter().map(|f| f.clone().into()).collect(); + let metadata = schema.metadata.clone().into_iter().collect(); + let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata); + + let reader = RecordBatchIterator::new( + query_handle + .into_batch_iter() + .map(|batch| batch.try_to_arrow_record_batch()), + std::sync::Arc::new(schema), + ); + Ok(PyArrowType(Box::new(reader))) + } + #[cfg(feature = "remote")] + PyRecordingHandle::Remote(recording) => { + let borrowed_recording = recording.borrow(py); + let mut borrowed_client = borrowed_recording.client.borrow_mut(py); + borrowed_client.exec_query( + borrowed_recording.store_info.store_id.clone(), + query_expression, + ) + } + } } /// Select only the static columns from the view. @@ -780,54 +810,69 @@ impl PyRecordingView { args: &Bound<'_, PyTuple>, columns: Option>, ) -> PyResult>> { - let borrowed = self.recording.borrow(py); - let engine = borrowed.engine(); - let mut query_expression = self.query_expression.clone(); - // This is a static selection, so we clear the filtered index query_expression.filtered_index = None; // If no columns provided, select all static columns - let static_columns = Self::select_args(args, columns)?.unwrap_or_else(|| { - self.schema(py) - .schema - .iter() - .filter(|col| col.is_static()) - .map(|col| col.clone().into()) - .collect() - }); + let static_columns = Self::select_args(args, columns) + .transpose() + .unwrap_or_else(|| { + Ok(self + .schema(py)? + .schema + .iter() + .filter(|col| col.is_static()) + .map(|col| col.clone().into()) + .collect()) + })?; query_expression.selection = Some(static_columns); - let query_handle = engine.query(query_expression); + match &self.recording { + PyRecordingHandle::Local(recording) => { + let borrowed = recording.borrow(py); + let engine = borrowed.engine(); - let non_static_cols = query_handle - .selected_contents() - .iter() - .filter(|(_, col)| !col.is_static()) - .collect::>(); + let query_handle = engine.query(query_expression); - if !non_static_cols.is_empty() { - return Err(PyValueError::new_err(format!( - "Static selection resulted in non-static columns: {non_static_cols:?}", - ))); - } + let non_static_cols = query_handle + .selected_contents() + .iter() + .filter(|(_, col)| !col.is_static()) + .collect::>(); - let schema = query_handle.schema(); - let fields: Vec = - schema.fields.iter().map(|f| f.clone().into()).collect(); - let metadata = schema.metadata.clone().into_iter().collect(); - let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata); + if !non_static_cols.is_empty() { + return Err(PyValueError::new_err(format!( + "Static selection resulted in non-static columns: {non_static_cols:?}", + ))); + } - let reader = RecordBatchIterator::new( - query_handle - .into_batch_iter() - .map(|batch| batch.try_to_arrow_record_batch()), - std::sync::Arc::new(schema), - ); + let schema = query_handle.schema(); + let fields: Vec = + schema.fields.iter().map(|f| f.clone().into()).collect(); + let metadata = schema.metadata.clone().into_iter().collect(); + let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata); + + let reader = RecordBatchIterator::new( + query_handle + .into_batch_iter() + .map(|batch| batch.try_to_arrow_record_batch()), + std::sync::Arc::new(schema), + ); - Ok(PyArrowType(Box::new(reader))) + Ok(PyArrowType(Box::new(reader))) + } + #[cfg(feature = "remote")] + PyRecordingHandle::Remote(recording) => { + let borrowed_recording = recording.borrow(py); + let mut borrowed_client = borrowed_recording.client.borrow_mut(py); + borrowed_client.exec_query( + borrowed_recording.store_info.store_id.clone(), + query_expression, + ) + } + } } #[allow(rustdoc::private_doc_tests)] @@ -1336,7 +1381,7 @@ impl PyRecording { let recording = slf.unbind(); Ok(PyRecordingView { - recording: std::sync::Arc::new(recording), + recording: PyRecordingHandle::Local(std::sync::Arc::new(recording)), query_expression: query, }) } diff --git a/rerun_py/src/remote.rs b/rerun_py/src/remote.rs index 2619d3990088..414d116bb698 100644 --- a/rerun_py/src/remote.rs +++ b/rerun_py/src/remote.rs @@ -1,4 +1,7 @@ #![allow(unsafe_op_in_unsafe_fn)] + +use std::collections::BTreeSet; + use arrow::{ array::{RecordBatch, RecordBatchIterator, RecordBatchReader}, datatypes::Schema, @@ -6,23 +9,30 @@ use arrow::{ pyarrow::PyArrowType, }; // False positive due to #[pyfunction] macro -use pyo3::{exceptions::PyRuntimeError, prelude::*, Bound, PyResult}; +use pyo3::{ + exceptions::{PyRuntimeError, PyTypeError, PyValueError}, + prelude::*, + types::PyDict, + Bound, PyResult, +}; use re_chunk::{Chunk, TransportChunk}; use re_chunk_store::ChunkStore; -use re_dataframe::ChunkStoreHandle; +use re_dataframe::{ChunkStoreHandle, QueryExpression, SparseFillStrategy, ViewContentsSelector}; +use re_grpc_client::TonicStatusError; use re_log_encoding::codec::wire::{decode, encode}; -use re_log_types::{StoreInfo, StoreSource}; +use re_log_types::{EntityPathFilter, StoreInfo, StoreSource}; use re_protos::{ common::v0::{EncoderVersion, RecordingId}, remote_store::v0::{ - storage_node_client::StorageNodeClient, DataframePart, FetchRecordingRequest, - QueryCatalogRequest, RecordingType, RegisterRecordingRequest, UpdateCatalogRequest, + storage_node_client::StorageNodeClient, CatalogFilter, DataframePart, + FetchRecordingRequest, QueryCatalogRequest, QueryRequest, RecordingType, + RegisterRecordingRequest, UpdateCatalogRequest, }, }; -use re_sdk::{ApplicationId, StoreId, StoreKind, Time}; +use re_sdk::{ApplicationId, ComponentName, StoreId, StoreKind, Time, Timeline}; use tokio_stream::StreamExt; -use crate::dataframe::PyRecording; +use crate::dataframe::{ComponentLike, PyRecording, PyRecordingHandle, PyRecordingView}; /// Register the `rerun.remote` module. pub(crate) fn register(m: &Bound<'_, PyModule>) -> PyResult<()> { @@ -80,6 +90,106 @@ pub struct PyStorageNodeClient { client: StorageNodeClient, } +impl PyStorageNodeClient { + /// Get the [`StoreInfo`] for a single recording in the storage node. + fn get_store_info(&mut self, id: &str) -> PyResult { + let store_info = self + .runtime + .block_on(async { + let resp = self + .client + .query_catalog(QueryCatalogRequest { + column_projection: None, // fetch all columns + filter: Some(CatalogFilter { + recording_ids: vec![RecordingId { id: id.to_owned() }], + }), + }) + .await + .map_err(re_grpc_client::TonicStatusError)? + .into_inner() + .filter_map(|resp| { + resp.and_then(|r| { + decode(r.encoder_version(), &r.payload) + .map_err(|err| tonic::Status::internal(err.to_string())) + }) + .transpose() + }) + .collect::, tonic::Status>>() + .await + .map_err(re_grpc_client::TonicStatusError)?; + + if resp.len() != 1 || resp[0].num_rows() != 1 { + return Err(re_grpc_client::StreamError::ChunkError( + re_chunk::ChunkError::Malformed { + reason: format!( + "expected exactly one recording with id {id}, got {}", + resp.len() + ), + }, + )); + } + + re_grpc_client::store_info_from_catalog_chunk(&resp[0], id) + }) + .map_err(|err| PyRuntimeError::new_err(err.to_string()))?; + + Ok(store_info) + } + + /// Execute a [`QueryExpression`] for a single recording in the storage node. + pub(crate) fn exec_query( + &mut self, + id: StoreId, + query: QueryExpression, + ) -> PyResult>> { + let query: re_protos::common::v0::Query = query.into(); + + let batches = self.runtime.block_on(async { + // TODO(#8536): Avoid the need to collect here. + // This means we shouldn't be blocking on + let batches = self + .client + .query(QueryRequest { + recording_id: Some(id.into()), + query: Some(query.clone()), + }) + .await + .map_err(TonicStatusError)? + .into_inner() + .filter_map(|resp| { + resp.and_then(|r| { + decode(r.encoder_version(), &r.payload) + .map_err(|err| tonic::Status::internal(err.to_string())) + }) + .transpose() + }) + .collect::, tonic::Status>>() + .await + .map_err(TonicStatusError)?; + + let schema = batches + .first() + .map(|batch| batch.schema.clone()) + .unwrap_or_else(|| arrow2::datatypes::Schema::from(vec![])); + + let fields: Vec = + schema.fields.iter().map(|f| f.clone().into()).collect(); + let metadata = schema.metadata.clone().into_iter().collect(); + let schema = arrow::datatypes::Schema::new(fields).with_metadata(metadata); + + Ok(RecordBatchIterator::new( + batches.into_iter().map(|tc| tc.try_to_arrow_record_batch()), + std::sync::Arc::new(schema), + )) + }); + + let result = + batches.map_err(|err: TonicStatusError| PyRuntimeError::new_err(err.to_string()))?; + + Ok(PyArrowType(Box::new(result))) + } +} + #[pymethods] impl PyStorageNodeClient { /// Get the metadata for all recordings in the storage node. @@ -250,7 +360,37 @@ impl PyStorageNodeClient { /// Open a [`Recording`][rerun.dataframe.Recording] by id to use with the dataframe APIs. /// - /// This currently downloads the full recording to the local machine. + /// This will run queries against the remote storage node and stream the results. Faster for small + /// numbers of queries with small results. + /// + /// Parameters + /// ---------- + /// id : str + /// The id of the recording to open. + /// + /// Returns + /// ------- + /// Recording + /// The opened recording. + #[pyo3(signature = ( + id, + ))] + fn open_recording(slf: Bound<'_, Self>, id: &str) -> PyResult { + let mut borrowed_self = slf.borrow_mut(); + + let store_info = borrowed_self.get_store_info(id)?; + + let client = slf.unbind(); + + Ok(PyRemoteRecording { + client: std::sync::Arc::new(client), + store_info, + }) + } + + /// Download a [`Recording`][rerun.dataframe.Recording] by id to use with the dataframe APIs. + /// + /// This will download the full recording to memory and run queries against a local chunk store. /// /// Parameters /// ---------- @@ -264,7 +404,7 @@ impl PyStorageNodeClient { #[pyo3(signature = ( id, ))] - fn open_recording(&mut self, id: &str) -> PyResult { + fn download_recording(&mut self, id: &str) -> PyResult { use tokio_stream::StreamExt as _; let store = self.runtime.block_on(async { let mut resp = self @@ -347,3 +487,229 @@ impl MetadataLike { .map_err(|err| PyRuntimeError::new_err(err.to_string())) } } + +/// A single Rerun recording. +/// +/// This can be loaded from an RRD file using [`load_recording()`][rerun.dataframe.load_recording]. +/// +/// A recording is a collection of data that was logged to Rerun. This data is organized +/// as a column for each index (timeline) and each entity/component pair that was logged. +/// +/// You can examine the [`.schema()`][rerun.dataframe.Recording.schema] of the recording to see +/// what data is available, or create a [`RecordingView`][rerun.dataframe.RecordingView] to +/// to retrieve the data. +#[pyclass(name = "RemoteRecording")] +pub struct PyRemoteRecording { + pub(crate) client: std::sync::Arc>, + pub(crate) store_info: StoreInfo, +} + +impl PyRemoteRecording { + /// Convert a `ViewContentsLike` into a `ViewContentsSelector`. + /// + /// ```python + /// ViewContentsLike = Union[str, Dict[str, Union[ComponentLike, Sequence[ComponentLike]]]] + /// ``` + /// + // TODO(jleibs): This needs access to the schema to resolve paths and components + fn extract_contents_expr( + expr: &Bound<'_, PyAny>, + ) -> PyResult { + if let Ok(expr) = expr.extract::() { + let path_filter = + EntityPathFilter::parse_strict(&expr, &Default::default()).map_err(|err| { + PyValueError::new_err(format!( + "Could not interpret `contents` as a ViewContentsLike. Failed to parse {expr}: {err}.", + )) + })?; + + for (rule, _) in path_filter.rules() { + if rule.include_subtree { + return Err(PyValueError::new_err( + "SubTree path expressions (/**) are not allowed yet for remote recordings.", + )); + } + } + + // Since these are all exact rules, just include them directly + let contents = path_filter + .rules() + .map(|(rule, _)| (rule.path.clone(), None)) + .collect(); + + Ok(contents) + } else if let Ok(dict) = expr.downcast::() { + // `Union[ComponentLike, Sequence[ComponentLike]]]` + + let mut contents = ViewContentsSelector::default(); + + for (key, value) in dict { + let key = key.extract::().map_err(|_err| { + PyTypeError::new_err( + format!("Could not interpret `contents` as a ViewContentsLike. Key: {key} is not a path expression."), + ) + })?; + + let path_filter = EntityPathFilter::parse_strict(&key, &Default::default()).map_err(|err| { + PyValueError::new_err(format!( + "Could not interpret `contents` as a ViewContentsLike. Failed to parse {key}: {err}.", + )) + })?; + + for (rule, _) in path_filter.rules() { + if rule.include_subtree { + return Err(PyValueError::new_err( + "SubTree path expressions (/**) are not allowed yet for remote recordings.", + )); + } + } + + let component_strs: BTreeSet = if let Ok(component) = + value.extract::() + { + std::iter::once(component.0).collect() + } else if let Ok(components) = value.extract::>() { + components.into_iter().map(|c| c.0).collect() + } else { + return Err(PyTypeError::new_err( + format!("Could not interpret `contents` as a ViewContentsLike. Value: {value} is not a ComponentLike or Sequence[ComponentLike]."), + )); + }; + + contents.append( + &mut path_filter + .rules() + .map(|(rule, _)| { + let components = component_strs + .iter() + .map(|component_name| ComponentName::from(component_name.clone())) + .collect(); + (rule.path.clone(), Some(components)) + }) + .collect(), + ); + } + + Ok(contents) + } else { + return Err(PyTypeError::new_err( + "Could not interpret `contents` as a ViewContentsLike. Top-level type must be a string or a dictionary.", + )); + } + } +} + +#[pymethods] +impl PyRemoteRecording { + #[allow(rustdoc::private_doc_tests, rustdoc::invalid_rust_codeblocks)] + /// Create a [`RecordingView`][rerun.dataframe.RecordingView] of the recording according to a particular index and content specification. + /// + /// The only type of index currently supported is the name of a timeline. + /// + /// The view will only contain a single row for each unique value of the index + /// that is associated with a component column that was included in the view. + /// Component columns that are not included via the view contents will not + /// impact the rows that make up the view. If the same entity / component pair + /// was logged to a given index multiple times, only the most recent row will be + /// included in the view, as determined by the `row_id` column. This will + /// generally be the last value logged, as row_ids are guaranteed to be + /// monotonically increasing when data is sent from a single process. + /// + /// Parameters + /// ---------- + /// index : str + /// The index to use for the view. This is typically a timeline name. + /// contents : ViewContentsLike + /// The content specification for the view. + /// + /// This can be a single string content-expression such as: `"world/cameras/**"`, or a dictionary + /// specifying multiple content-expressions and a respective list of components to select within + /// that expression such as `{"world/cameras/**": ["ImageBuffer", "PinholeProjection"]}`. + /// include_semantically_empty_columns : bool, optional + /// Whether to include columns that are semantically empty, by default `False`. + /// + /// Semantically empty columns are components that are `null` or empty `[]` for every row in the recording. + /// include_indicator_columns : bool, optional + /// Whether to include indicator columns, by default `False`. + /// + /// Indicator columns are components used to represent the presence of an archetype within an entity. + /// include_tombstone_columns : bool, optional + /// Whether to include tombstone columns, by default `False`. + /// + /// Tombstone columns are components used to represent clears. However, even without the clear + /// tombstone columns, the view will still apply the clear semantics when resolving row contents. + /// + /// Returns + /// ------- + /// RecordingView + /// The view of the recording. + /// + /// Examples + /// -------- + /// All the data in the recording on the timeline "my_index": + /// ```python + /// recording.view(index="my_index", contents="/**") + /// ``` + /// + /// Just the Position3D components in the "points" entity: + /// ```python + /// recording.view(index="my_index", contents={"points": "Position3D"}) + /// ``` + #[allow(clippy::fn_params_excessive_bools)] + #[pyo3(signature = ( + *, + index, + contents, + include_semantically_empty_columns = false, + include_indicator_columns = false, + include_tombstone_columns = false, + ))] + fn view( + slf: Bound<'_, Self>, + index: &str, + contents: &Bound<'_, PyAny>, + include_semantically_empty_columns: bool, + include_indicator_columns: bool, + include_tombstone_columns: bool, + ) -> PyResult { + // TODO(jleibs): We should be able to use this to resolve the timeline / contents + //let borrowed_self = slf.borrow(); + + // TODO(jleibs): Need to get this from the remote schema + //let timeline = borrowed_self.store.read().resolve_time_selector(&selector); + let timeline = Timeline::new_sequence(index); + + let contents = Self::extract_contents_expr(contents)?; + + let query = QueryExpression { + view_contents: Some(contents), + include_semantically_empty_columns, + include_indicator_columns, + include_tombstone_columns, + filtered_index: Some(timeline), + filtered_index_range: None, + filtered_index_values: None, + using_index_values: None, + filtered_is_not_null: None, + sparse_fill_strategy: SparseFillStrategy::None, + selection: None, + }; + + let recording = slf.unbind(); + + Ok(PyRecordingView { + recording: PyRecordingHandle::Remote(std::sync::Arc::new(recording)), + query_expression: query, + }) + } + + /// The recording ID of the recording. + fn recording_id(&self) -> String { + self.store_info.store_id.id.as_str().to_owned() + } + + /// The application ID of the recording. + fn application_id(&self) -> String { + self.store_info.application_id.to_string() + } +} From cee46d61cf2eac098bc4aab715d59ba8a27f98f6 Mon Sep 17 00:00:00 2001 From: Zeljko Mihaljcic <7150613+zehiko@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:18:50 +0100 Subject: [PATCH 05/11] grpc codec simplification - get rid of NoData message (#8550) --- crates/store/re_grpc_client/src/lib.rs | 10 +-- .../re_log_encoding/src/codec/wire/decoder.rs | 52 +++----------- .../re_log_encoding/src/codec/wire/encoder.rs | 50 ++------------ .../re_log_encoding/src/codec/wire/mod.rs | 68 ++----------------- rerun_py/src/remote.rs | 32 ++++----- 5 files changed, 37 insertions(+), 175 deletions(-) diff --git a/crates/store/re_grpc_client/src/lib.rs b/crates/store/re_grpc_client/src/lib.rs index 4014d6b974b2..2fe879e632eb 100644 --- a/crates/store/re_grpc_client/src/lib.rs +++ b/crates/store/re_grpc_client/src/lib.rs @@ -191,12 +191,11 @@ async fn stream_recording_async( .await .map_err(TonicStatusError)? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }) .collect::, tonic::Status>>() .await @@ -225,12 +224,11 @@ async fn stream_recording_async( .await .map_err(TonicStatusError)? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }); drop(client); @@ -340,7 +338,6 @@ async fn stream_catalog_async( re_log::debug!("Fetching catalog…"); let mut resp = client - // TODO(zehiko) add support for fetching specific columns and rows .query_catalog(QueryCatalogRequest { column_projection: None, // fetch all columns filter: None, // fetch all rows @@ -348,12 +345,11 @@ async fn stream_catalog_async( .await .map_err(TonicStatusError)? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }); drop(client); diff --git a/crates/store/re_log_encoding/src/codec/wire/decoder.rs b/crates/store/re_log_encoding/src/codec/wire/decoder.rs index 06b9bccdbc23..db0db4613cd1 100644 --- a/crates/store/re_log_encoding/src/codec/wire/decoder.rs +++ b/crates/store/re_log_encoding/src/codec/wire/decoder.rs @@ -1,55 +1,23 @@ -use super::MessageHeader; -use super::TransportMessageV0; use crate::codec::arrow::read_arrow_from_bytes; use crate::codec::CodecError; use re_chunk::TransportChunk; -impl MessageHeader { - pub(crate) fn decode(read: &mut impl std::io::Read) -> Result { - let mut buffer = [0_u8; Self::SIZE_BYTES]; - read.read_exact(&mut buffer) - .map_err(CodecError::HeaderDecoding)?; - - let header = u8::from_le(buffer[0]); - - Ok(Self(header)) - } -} - -impl TransportMessageV0 { - pub(crate) fn from_bytes(data: &[u8]) -> Result { - let mut reader = std::io::Cursor::new(data); - let header = MessageHeader::decode(&mut reader)?; - - match header { - MessageHeader::NO_DATA => Ok(Self::NoData), - MessageHeader::RECORD_BATCH => { - let (schema, data) = read_arrow_from_bytes(&mut reader)?; - - let tc = TransportChunk { - schema: schema.clone(), - data, - }; - - Ok(Self::RecordBatch(tc)) - } - _ => Err(CodecError::UnknownMessageHeader), - } - } -} - /// Decode transport data from a byte stream - if there's a record batch present, return it, otherwise return `None`. pub fn decode( version: re_protos::common::v0::EncoderVersion, data: &[u8], -) -> Result, CodecError> { +) -> Result { match version { re_protos::common::v0::EncoderVersion::V0 => { - let msg = TransportMessageV0::from_bytes(data)?; - match msg { - TransportMessageV0::RecordBatch(chunk) => Ok(Some(chunk)), - TransportMessageV0::NoData => Ok(None), - } + let mut reader = std::io::Cursor::new(data); + let (schema, data) = read_arrow_from_bytes(&mut reader)?; + + let tc = TransportChunk { + schema: schema.clone(), + data, + }; + + Ok(tc) } } } diff --git a/crates/store/re_log_encoding/src/codec/wire/encoder.rs b/crates/store/re_log_encoding/src/codec/wire/encoder.rs index e6ae62c1e1b7..87438fd0a33c 100644 --- a/crates/store/re_log_encoding/src/codec/wire/encoder.rs +++ b/crates/store/re_log_encoding/src/codec/wire/encoder.rs @@ -1,58 +1,18 @@ -use super::MessageHeader; -use super::TransportMessageV0; use crate::codec::arrow::write_arrow_to_bytes; use crate::codec::CodecError; use re_chunk::TransportChunk; -impl MessageHeader { - pub(crate) fn encode(&self, write: &mut impl std::io::Write) -> Result<(), CodecError> { - write - .write_all(&[self.0]) - .map_err(CodecError::HeaderEncoding)?; - - Ok(()) - } -} - -impl TransportMessageV0 { - pub(crate) fn to_bytes(&self) -> Result, CodecError> { - match self { - Self::NoData => { - let mut data: Vec = Vec::new(); - MessageHeader::NO_DATA.encode(&mut data)?; - Ok(data) - } - Self::RecordBatch(chunk) => { - let mut data: Vec = Vec::new(); - MessageHeader::RECORD_BATCH.encode(&mut data)?; - - write_arrow_to_bytes(&mut data, &chunk.schema, &chunk.data)?; - - Ok(data) - } - } - } -} - -/// Encode a `NoData` message into a byte stream. This can be used by the remote store -/// (i.e. data producer) to signal back to the client that there's no data available. -pub fn no_data(version: re_protos::common::v0::EncoderVersion) -> Result, CodecError> { - match version { - re_protos::common::v0::EncoderVersion::V0 => TransportMessageV0::NoData.to_bytes(), - } -} - -// TODO(zehiko) add support for separately encoding schema from the record batch to get rid of overhead -// of sending schema in each transport message for the same stream of batches. This will require codec -// to become stateful and keep track if schema was sent / received. /// Encode a transport chunk into a byte stream. pub fn encode( version: re_protos::common::v0::EncoderVersion, - chunk: TransportChunk, + chunk: &TransportChunk, ) -> Result, CodecError> { match version { re_protos::common::v0::EncoderVersion::V0 => { - TransportMessageV0::RecordBatch(chunk).to_bytes() + let mut data: Vec = Vec::new(); + write_arrow_to_bytes(&mut data, &chunk.schema, &chunk.data)?; + + Ok(data) } } } diff --git a/crates/store/re_log_encoding/src/codec/wire/mod.rs b/crates/store/re_log_encoding/src/codec/wire/mod.rs index 587e9e31e2ce..0bc6c702718a 100644 --- a/crates/store/re_log_encoding/src/codec/wire/mod.rs +++ b/crates/store/re_log_encoding/src/codec/wire/mod.rs @@ -4,28 +4,10 @@ pub mod encoder; pub use decoder::decode; pub use encoder::encode; -use re_chunk::TransportChunk; - -#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)] -pub struct MessageHeader(pub u8); - -impl MessageHeader { - pub const NO_DATA: Self = Self(1); - pub const RECORD_BATCH: Self = Self(2); - - pub const SIZE_BYTES: usize = 1; -} - -#[derive(Debug)] -pub enum TransportMessageV0 { - NoData, - RecordBatch(TransportChunk), -} - #[cfg(test)] mod tests { use crate::{ - codec::wire::{decode, encode, TransportMessageV0}, + codec::wire::{decode, encode}, codec::CodecError, }; use re_chunk::{Chunk, RowId}; @@ -56,35 +38,9 @@ mod tests { } #[test] - fn test_message_v0_no_data() { - let msg = TransportMessageV0::NoData; - let data = msg.to_bytes().unwrap(); - let decoded = TransportMessageV0::from_bytes(&data).unwrap(); - assert!(matches!(decoded, TransportMessageV0::NoData)); - } - - #[test] - fn test_message_v0_record_batch() { - let expected_chunk = get_test_chunk(); - - let msg = TransportMessageV0::RecordBatch(expected_chunk.clone().to_transport().unwrap()); - let data = msg.to_bytes().unwrap(); - let decoded = TransportMessageV0::from_bytes(&data).unwrap(); - - #[allow(clippy::match_wildcard_for_single_variants)] - match decoded { - TransportMessageV0::RecordBatch(transport) => { - let decoded_chunk = Chunk::from_transport(&transport).unwrap(); - assert_eq!(expected_chunk, decoded_chunk); - } - _ => panic!("unexpected message type"), - } - } - - #[test] - fn test_invalid_batch_data() { - let data = vec![2, 3, 4]; // '1' is NO_DATA message header - let decoded = TransportMessageV0::from_bytes(&data); + fn test_invalid_data() { + let data = vec![2, 3, 4]; + let decoded = decode(EncoderVersion::V0, &data); assert!(matches!( decoded.err().unwrap(), @@ -92,28 +48,16 @@ mod tests { )); } - #[test] - fn test_unknown_header() { - let data = vec![3]; - let decoded = TransportMessageV0::from_bytes(&data); - assert!(decoded.is_err()); - - assert!(matches!( - decoded.err().unwrap(), - CodecError::UnknownMessageHeader - )); - } - #[test] fn test_v0_codec() { let expected_chunk = get_test_chunk(); let encoded = encode( EncoderVersion::V0, - expected_chunk.clone().to_transport().unwrap(), + &expected_chunk.clone().to_transport().unwrap(), ) .unwrap(); - let decoded = decode(EncoderVersion::V0, &encoded).unwrap().unwrap(); + let decoded = decode(EncoderVersion::V0, &encoded).unwrap(); let decoded_chunk = Chunk::from_transport(&decoded).unwrap(); assert_eq!(expected_chunk, decoded_chunk); diff --git a/rerun_py/src/remote.rs b/rerun_py/src/remote.rs index 414d116bb698..34d436aaf828 100644 --- a/rerun_py/src/remote.rs +++ b/rerun_py/src/remote.rs @@ -107,12 +107,11 @@ impl PyStorageNodeClient { .await .map_err(re_grpc_client::TonicStatusError)? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }) .collect::, tonic::Status>>() .await @@ -156,12 +155,11 @@ impl PyStorageNodeClient { .await .map_err(TonicStatusError)? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }) .collect::, tonic::Status>>() .await @@ -207,12 +205,11 @@ impl PyStorageNodeClient { .await .map_err(|err| PyRuntimeError::new_err(err.to_string()))? .into_inner() - .filter_map(|resp| { + .map(|resp| { resp.and_then(|r| { decode(r.encoder_version(), &r.payload) .map_err(|err| tonic::Status::internal(err.to_string())) }) - .transpose() }) .collect::, _>>() .await @@ -272,7 +269,7 @@ impl PyStorageNodeClient { let metadata_tc = TransportChunk::from_arrow_record_batch(&metadata); - encode(EncoderVersion::V0, metadata_tc) + encode(EncoderVersion::V0, &metadata_tc) .map_err(|err| PyRuntimeError::new_err(err.to_string())) }) .transpose()? @@ -296,9 +293,7 @@ impl PyStorageNodeClient { .map_err(|err| PyRuntimeError::new_err(err.to_string()))? .into_inner(); let metadata = decode(resp.encoder_version(), &resp.payload) - .map_err(|err| PyRuntimeError::new_err(err.to_string()))? - // TODO(zehiko) this is going away soon - .ok_or(PyRuntimeError::new_err("No metadata"))?; + .map_err(|err| PyRuntimeError::new_err(err.to_string()))?; let recording_id = metadata .all_columns() @@ -344,7 +339,7 @@ impl PyStorageNodeClient { let request = UpdateCatalogRequest { metadata: Some(DataframePart { encoder_version: EncoderVersion::V0 as i32, - payload: encode(EncoderVersion::V0, metadata_tc) + payload: encode(EncoderVersion::V0, &metadata_tc) .map_err(|err| PyRuntimeError::new_err(err.to_string()))?, }), }; @@ -434,13 +429,12 @@ impl PyStorageNodeClient { while let Some(result) = resp.next().await { let response = result.map_err(|err| PyRuntimeError::new_err(err.to_string()))?; - let tc = decode(EncoderVersion::V0, &response.payload) - .map_err(|err| PyRuntimeError::new_err(err.to_string()))?; - - let Some(tc) = tc else { - return Err(PyRuntimeError::new_err("Stream error")); + let tc = match decode(EncoderVersion::V0, &response.payload) { + Ok(tc) => tc, + Err(err) => { + return Err(PyRuntimeError::new_err(err.to_string())); + } }; - let chunk = Chunk::from_transport(&tc) .map_err(|err| PyRuntimeError::new_err(err.to_string()))?; @@ -450,9 +444,9 @@ impl PyStorageNodeClient { } Ok(store) - })?; + }); - let handle = ChunkStoreHandle::new(store); + let handle = ChunkStoreHandle::new(store?); let cache = re_dataframe::QueryCacheHandle::new(re_dataframe::QueryCache::new(handle.clone())); From 774ad70b6179b57c4dcbc0f7da56c44f3bc1bbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20G=C3=B6rtler?= Date: Fri, 20 Dec 2024 09:22:17 +0100 Subject: [PATCH 06/11] Show the `GraphNode` as a label by default (#8542) --- crates/viewer/re_view_graph/src/visualizers/nodes.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/viewer/re_view_graph/src/visualizers/nodes.rs b/crates/viewer/re_view_graph/src/visualizers/nodes.rs index 5c13da73385b..ce0a06fa7200 100644 --- a/crates/viewer/re_view_graph/src/visualizers/nodes.rs +++ b/crates/viewer/re_view_graph/src/visualizers/nodes.rs @@ -120,6 +120,10 @@ impl VisualizerSystem for NodeVisualizer { text: label.clone(), color, }, + (None, true) => Label::Text { + text: node.0 .0.clone(), + color, + }, _ => Label::Circle { // Radius is negative for UI radii, but we don't handle this here. radius: radius.unwrap_or(FALLBACK_RADIUS).abs(), From 35327062c114e8805233779043b742ae26c37260 Mon Sep 17 00:00:00 2001 From: Antoine Beyeler <49431240+abey79@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:29:19 +0100 Subject: [PATCH 07/11] Introduce snapshot unit tests for `re_component_ui` (#8546) Co-authored-by: Andreas Reich --- Cargo.lock | 3 + .../src/components/image_format_ext.rs | 2 +- crates/viewer/re_component_ui/Cargo.toml | 6 + .../src/datatype_uis/float_drag.rs | 8 +- .../src/datatype_uis/int_drag.rs | 4 +- .../src/datatype_uis/range1d.rs | 15 +- .../re_component_ui/src/datatype_uis/vec.rs | 30 +- .../src/datatype_uis/view_uuid.rs | 4 +- .../AggregationPolicy_placeholder.png | 3 + .../AlbedoFactor_placeholder.png | 3 + .../ApplyLatestAt_placeholder.png | 3 + .../AxisLength_placeholder.png | 3 + .../BackgroundKind_placeholder.png | 3 + .../ClearIsRecursive_placeholder.png | 3 + .../Color_placeholder.png | 3 + .../Colormap_placeholder.png | 3 + .../ComponentColumnSelector_simple.png | 3 + .../ContainerKind_placeholder.png | 3 + .../Corner2D_placeholder.png | 3 + .../DepthMeter_placeholder.png | 3 + .../DisconnectedSpace_placeholder.png | 3 + .../DrawOrder_placeholder.png | 3 + .../Enabled_placeholder.png | 3 + .../EntityPath_simple.png | 3 + .../FillMode_placeholder.png | 3 + .../FillRatio_placeholder.png | 3 + .../FilterByRange_placeholder.png | 3 + .../FilterIsNotNull_placeholder.png | 3 + .../ForceDistance_placeholder.png | 3 + .../ForceIterations_placeholder.png | 3 + .../ForceStrength_placeholder.png | 3 + .../GammaCorrection_placeholder.png | 3 + .../GeoLineString_placeholder.png | 3 + .../GraphEdge_simple.png | 3 + .../GraphNode_simple.png | 3 + .../GraphType_placeholder.png | 3 + .../GridColumns_placeholder.png | 3 + .../GridSpacing_placeholder.png | 3 + .../HalfSize2D_placeholder.png | 3 + .../HalfSize3D_placeholder.png | 3 + .../ImageFormat_depth_f32.png | 3 + .../ImageFormat_nv12.png | 3 + .../ImageFormat_rgb8.png | 3 + .../ImageFormat_rgba8.png | 3 + .../ImageFormat_segmentation_u32.png | 3 + .../ImagePlaneDistance_placeholder.png | 3 + .../Interactive_placeholder.png | 3 + .../LatLon_placeholder.png | 3 + .../Length_placeholder.png | 3 + .../LineStrip2D_placeholder.png | 3 + .../LineStrip3D_placeholder.png | 3 + .../LockRangeDuringZoom_placeholder.png | 3 + .../MagnificationFilter_placeholder.png | 3 + .../MapProvider_placeholder.png | 3 + .../MarkerShape_placeholder.png | 3 + .../MarkerSize_placeholder.png | 3 + .../MediaType_placeholder.png | 3 + .../Name_placeholder.png | 3 + .../NearClipPlane_placeholder.png | 3 + .../Opacity_placeholder.png | 3 + .../PinholeProjection_placeholder.png | 3 + .../Plane3D_placeholder.png | 3 + .../PoseRotationAxisAngle_placeholder.png | 3 + .../PoseRotationQuat_placeholder.png | 3 + .../PoseScale3D_placeholder.png | 3 + .../PoseTransformMat3x3_placeholder.png | 3 + .../PoseTranslation3D_placeholder.png | 3 + .../Position2D_placeholder.png | 3 + .../Position3D_placeholder.png | 3 + .../QueryExpression_simple.png | 3 + .../Radius_placeholder.png | 3 + .../Range1D_placeholder.png | 3 + .../RecordingUri_simple.png | 3 + .../Resolution_placeholder.png | 3 + .../RotationAxisAngle_placeholder.png | 3 + .../RotationQuat_placeholder.png | 3 + .../Scalar_placeholder.png | 3 + .../Scale3D_placeholder.png | 3 + .../SelectedColumns_placeholder.png | 3 + .../ShowLabels_placeholder.png | 3 + .../StrokeWidth_placeholder.png | 3 + ...sorDimensionIndexSelection_placeholder.png | 3 + ...TensorDimensionIndexSlider_placeholder.png | 3 + .../TensorHeightDimension_placeholder.png | 3 + .../TensorWidthDimension_placeholder.png | 3 + .../Texcoord2D_placeholder.png | 3 + .../TextLogLevel_placeholder.png | 3 + .../Text_simple.png | 3 + .../TimelineName_placeholder.png | 3 + .../TransformMat3x3_placeholder.png | 3 + .../TransformRelation_placeholder.png | 3 + .../Translation3D_placeholder.png | 3 + .../TriangleIndices_placeholder.png | 3 + .../ValueRange_placeholder.png | 3 + .../Vector2D_placeholder.png | 3 + .../Vector3D_placeholder.png | 3 + .../VideoTimestamp_placeholder.png | 3 + .../ViewClass_placeholder.png | 3 + .../ViewCoordinates_placeholder.png | 3 + .../ViewFit_placeholder.png | 3 + .../VisibleTimeRange_placeholder.png | 3 + .../Visible_placeholder.png | 3 + .../VisualBounds2D_placeholder.png | 3 + .../ZoomLevel_placeholder.png | 3 + .../AggregationPolicy_placeholder.png | 3 + .../AlbedoFactor_placeholder.png | 3 + .../ApplyLatestAt_placeholder.png | 3 + .../AxisLength_placeholder.png | 3 + .../BackgroundKind_placeholder.png | 3 + .../ClearIsRecursive_placeholder.png | 3 + .../Color_placeholder.png | 3 + .../Colormap_placeholder.png | 3 + .../ComponentColumnSelector_simple.png | 3 + .../ContainerKind_placeholder.png | 3 + .../Corner2D_placeholder.png | 3 + .../DepthMeter_placeholder.png | 3 + .../DisconnectedSpace_placeholder.png | 3 + .../DrawOrder_placeholder.png | 3 + .../Enabled_placeholder.png | 3 + .../EntityPath_simple.png | 3 + .../FillMode_placeholder.png | 3 + .../FillRatio_placeholder.png | 3 + .../FilterByRange_placeholder.png | 3 + .../FilterIsNotNull_placeholder.png | 3 + .../ForceDistance_placeholder.png | 3 + .../ForceIterations_placeholder.png | 3 + .../ForceStrength_placeholder.png | 3 + .../GammaCorrection_placeholder.png | 3 + .../GeoLineString_placeholder.png | 3 + .../GraphEdge_simple.png | 3 + .../GraphNode_simple.png | 3 + .../GraphType_placeholder.png | 3 + .../GridColumns_placeholder.png | 3 + .../GridSpacing_placeholder.png | 3 + .../HalfSize2D_placeholder.png | 3 + .../HalfSize3D_placeholder.png | 3 + .../ImageFormat_depth_f32.png | 3 + .../ImageFormat_nv12.png | 3 + .../ImageFormat_rgb8.png | 3 + .../ImageFormat_rgba8.png | 3 + .../ImageFormat_segmentation_u32.png | 3 + .../ImagePlaneDistance_placeholder.png | 3 + .../Interactive_placeholder.png | 3 + .../LatLon_placeholder.png | 3 + .../Length_placeholder.png | 3 + .../LineStrip2D_placeholder.png | 3 + .../LineStrip3D_placeholder.png | 3 + .../LockRangeDuringZoom_placeholder.png | 3 + .../MagnificationFilter_placeholder.png | 3 + .../MapProvider_placeholder.png | 3 + .../MarkerShape_placeholder.png | 3 + .../MarkerSize_placeholder.png | 3 + .../MediaType_placeholder.png | 3 + .../Name_placeholder.png | 3 + .../NearClipPlane_placeholder.png | 3 + .../Opacity_placeholder.png | 3 + .../PinholeProjection_placeholder.png | 3 + .../Plane3D_placeholder.png | 3 + .../PoseRotationAxisAngle_placeholder.png | 3 + .../PoseRotationQuat_placeholder.png | 3 + .../PoseScale3D_placeholder.png | 3 + .../PoseTransformMat3x3_placeholder.png | 3 + .../PoseTranslation3D_placeholder.png | 3 + .../Position2D_placeholder.png | 3 + .../Position3D_placeholder.png | 3 + .../QueryExpression_simple.png | 3 + .../Radius_placeholder.png | 3 + .../Range1D_placeholder.png | 3 + .../RecordingUri_simple.png | 3 + .../Resolution_placeholder.png | 3 + .../RotationAxisAngle_placeholder.png | 3 + .../RotationQuat_placeholder.png | 3 + .../Scalar_placeholder.png | 3 + .../Scale3D_placeholder.png | 3 + .../SelectedColumns_placeholder.png | 3 + .../ShowLabels_placeholder.png | 3 + .../StrokeWidth_placeholder.png | 3 + ...sorDimensionIndexSelection_placeholder.png | 3 + ...TensorDimensionIndexSlider_placeholder.png | 3 + .../TensorHeightDimension_placeholder.png | 3 + .../TensorWidthDimension_placeholder.png | 3 + .../Texcoord2D_placeholder.png | 3 + .../TextLogLevel_placeholder.png | 3 + .../Text_simple.png | 3 + .../TimelineName_placeholder.png | 3 + .../TransformMat3x3_placeholder.png | 3 + .../TransformRelation_placeholder.png | 3 + .../Translation3D_placeholder.png | 3 + .../TriangleIndices_placeholder.png | 3 + .../ValueRange_placeholder.png | 3 + .../Vector2D_placeholder.png | 3 + .../Vector3D_placeholder.png | 3 + .../VideoTimestamp_placeholder.png | 3 + .../ViewClass_placeholder.png | 3 + .../ViewCoordinates_placeholder.png | 3 + .../ViewFit_placeholder.png | 3 + .../VisibleTimeRange_placeholder.png | 3 + .../Visible_placeholder.png | 3 + .../VisualBounds2D_placeholder.png | 3 + .../ZoomLevel_placeholder.png | 3 + .../tests/test_all_components_ui.rs | 369 ++++++++++++++++++ .../re_data_ui/src/component_ui_registry.rs | 2 +- .../re_viewer_context/src/test_context.rs | 10 +- 203 files changed, 999 insertions(+), 30 deletions(-) create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AggregationPolicy_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AlbedoFactor_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ApplyLatestAt_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AxisLength_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/BackgroundKind_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ClearIsRecursive_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Color_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Colormap_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ComponentColumnSelector_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ContainerKind_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Corner2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DepthMeter_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DrawOrder_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Enabled_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/EntityPath_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillMode_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillRatio_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterByRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterIsNotNull_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceDistance_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceIterations_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceStrength_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GammaCorrection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GeoLineString_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphEdge_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphNode_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphType_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridColumns_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridSpacing_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_depth_f32.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_nv12.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgb8.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgba8.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_segmentation_u32.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImagePlaneDistance_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Interactive_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LatLon_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Length_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LockRangeDuringZoom_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MagnificationFilter_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MapProvider_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerShape_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerSize_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MediaType_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Name_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/NearClipPlane_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Opacity_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PinholeProjection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Plane3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationAxisAngle_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationQuat_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseScale3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTransformMat3x3_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTranslation3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/QueryExpression_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Radius_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Range1D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RecordingUri_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Resolution_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationAxisAngle_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationQuat_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scalar_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scale3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/SelectedColumns_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ShowLabels_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/StrokeWidth_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSelection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSlider_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorHeightDimension_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorWidthDimension_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Texcoord2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TextLogLevel_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Text_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TimelineName_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformMat3x3_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformRelation_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Translation3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TriangleIndices_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ValueRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VideoTimestamp_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewClass_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewCoordinates_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewFit_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisibleTimeRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Visible_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisualBounds2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ZoomLevel_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AggregationPolicy_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AlbedoFactor_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ApplyLatestAt_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AxisLength_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/BackgroundKind_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ClearIsRecursive_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Color_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Colormap_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ComponentColumnSelector_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ContainerKind_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Corner2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DepthMeter_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DrawOrder_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Enabled_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/EntityPath_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillMode_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillRatio_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterByRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterIsNotNull_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceDistance_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceIterations_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceStrength_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GammaCorrection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GeoLineString_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphEdge_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphNode_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphType_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridColumns_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridSpacing_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_depth_f32.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_nv12.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgb8.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgba8.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_segmentation_u32.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImagePlaneDistance_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Interactive_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LatLon_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Length_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LockRangeDuringZoom_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MagnificationFilter_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MapProvider_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerShape_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerSize_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MediaType_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Name_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/NearClipPlane_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Opacity_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PinholeProjection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Plane3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationAxisAngle_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationQuat_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseScale3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTransformMat3x3_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTranslation3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/QueryExpression_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Radius_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Range1D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RecordingUri_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Resolution_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationAxisAngle_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationQuat_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scalar_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scale3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/SelectedColumns_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ShowLabels_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/StrokeWidth_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSelection_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSlider_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorHeightDimension_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorWidthDimension_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Texcoord2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TextLogLevel_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Text_simple.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TimelineName_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformMat3x3_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformRelation_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Translation3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TriangleIndices_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ValueRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector3D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VideoTimestamp_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewClass_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewCoordinates_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewFit_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisibleTimeRange_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Visible_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisualBounds2D_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ZoomLevel_placeholder.png create mode 100644 crates/viewer/re_component_ui/tests/test_all_components_ui.rs diff --git a/Cargo.lock b/Cargo.lock index 31437527f81a..356aea98c0b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5704,7 +5704,10 @@ dependencies = [ "arrow", "egui", "egui_extras", + "egui_kittest", "egui_plot", + "itertools 0.13.0", + "nohash-hasher", "re_data_source", "re_data_ui", "re_format", diff --git a/crates/store/re_types/src/components/image_format_ext.rs b/crates/store/re_types/src/components/image_format_ext.rs index 8298b8780e80..c1dc10709633 100644 --- a/crates/store/re_types/src/components/image_format_ext.rs +++ b/crates/store/re_types/src/components/image_format_ext.rs @@ -26,7 +26,7 @@ impl ImageFormat { datatypes::ImageFormat::rgba8([width, height]).into() } - /// From a speicifc pixel format. + /// From a specific pixel format. #[inline] pub fn from_pixel_format([width, height]: [u32; 2], pixel_format: PixelFormat) -> Self { datatypes::ImageFormat::from_pixel_format([width, height], pixel_format).into() diff --git a/crates/viewer/re_component_ui/Cargo.toml b/crates/viewer/re_component_ui/Cargo.toml index e77648689bab..42db39072dab 100644 --- a/crates/viewer/re_component_ui/Cargo.toml +++ b/crates/viewer/re_component_ui/Cargo.toml @@ -36,3 +36,9 @@ arrow.workspace = true egui_extras.workspace = true egui_plot.workspace = true egui.workspace = true + + +[dev-dependencies] +egui_kittest.workspace = true +itertools.workspace = true +nohash-hasher.workspace = true diff --git a/crates/viewer/re_component_ui/src/datatype_uis/float_drag.rs b/crates/viewer/re_component_ui/src/datatype_uis/float_drag.rs index 8964dd6cce4c..e5fdbf3b9ae9 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/float_drag.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/float_drag.rs @@ -2,7 +2,7 @@ use std::ops::RangeInclusive; use egui::NumExt as _; use re_types::datatypes; -use re_viewer_context::MaybeMutRef; +use re_viewer_context::{MaybeMutRef, UiLayout}; /// Generic editor for a [`re_types::datatypes::Float32`] value from zero to max float. pub fn edit_f32_zero_to_max( @@ -77,7 +77,7 @@ pub fn edit_f32_float_raw_with_speed_impl( .suffix(suffix), ) } else { - ui.label(format!("{}{}", re_format::format_f32(**value), suffix)) + UiLayout::List.data_label(ui, format!("{}{}", re_format::format_f32(**value), suffix)) } } @@ -105,7 +105,7 @@ fn edit_f32_zero_to_one_raw(ui: &mut egui::Ui, value: &mut MaybeMutRef<'_, f32>) .fixed_decimals(2), ) } else { - ui.label(re_format::format_f32(**value)) + UiLayout::List.data_label(ui, re_format::format_f32(**value)) } } @@ -162,6 +162,6 @@ pub fn edit_f64_float_raw_with_speed_impl( .speed(speed), ) } else { - ui.label(re_format::format_f64(**value)) + UiLayout::List.data_label(ui, re_format::format_f64(**value)) } } diff --git a/crates/viewer/re_component_ui/src/datatype_uis/int_drag.rs b/crates/viewer/re_component_ui/src/datatype_uis/int_drag.rs index e92b3c91a39b..248690060555 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/int_drag.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/int_drag.rs @@ -2,7 +2,7 @@ use std::ops::RangeInclusive; use egui::NumExt as _; use re_types_core::datatypes; -use re_viewer_context::MaybeMutRef; +use re_viewer_context::{MaybeMutRef, UiLayout}; /// Generic editor for a [`re_types::datatypes::UInt64`] values within a given range. pub fn edit_u64_range( @@ -46,6 +46,6 @@ pub fn edit_u64_raw_with_speed_impl( .suffix(suffix), ) } else { - ui.label(format!("{}{}", re_format::format_uint(**value), suffix)) + UiLayout::List.data_label(ui, format!("{}{}", re_format::format_uint(**value), suffix)) } } diff --git a/crates/viewer/re_component_ui/src/datatype_uis/range1d.rs b/crates/viewer/re_component_ui/src/datatype_uis/range1d.rs index a1f109085f7e..fcde02f4ef3a 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/range1d.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/range1d.rs @@ -1,7 +1,7 @@ use egui::NumExt as _; use re_types::datatypes::Range1D; -use re_viewer_context::MaybeMutRef; +use re_viewer_context::{MaybeMutRef, UiLayout}; pub fn edit_view_range1d( _ctx: &re_viewer_context::ViewerContext<'_>, @@ -41,10 +41,13 @@ fn edit_view_range1d_impl( response_min | response_max } else { let [min, max] = value.0; - ui.label(format!( - "{} - {}", - re_format::format_f64(min), - re_format::format_f64(max) - )) + UiLayout::List.data_label( + ui, + format!( + "{} - {}", + re_format::format_f64(min), + re_format::format_f64(max) + ), + ) } } diff --git a/crates/viewer/re_component_ui/src/datatype_uis/vec.rs b/crates/viewer/re_component_ui/src/datatype_uis/vec.rs index 799c110bf008..0053c0f35b7d 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/vec.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/vec.rs @@ -2,7 +2,7 @@ use std::ops::RangeInclusive; use egui::NumExt as _; use re_types::datatypes; -use re_viewer_context::MaybeMutRef; +use re_viewer_context::{MaybeMutRef, UiLayout}; pub fn edit_or_view_vec2d( _ctx: &re_viewer_context::ViewerContext<'_>, @@ -60,11 +60,14 @@ pub fn edit_or_view_vec2d_raw( response } else { - ui.label(format!( - "[ {} , {} ]", - re_format::format_f32(x), - re_format::format_f32(y), - )) + UiLayout::List.data_label( + ui, + format!( + "[{}, {}]", + re_format::format_f32(x), + re_format::format_f32(y), + ), + ) } } @@ -94,11 +97,14 @@ pub fn edit_or_view_vec3d_raw( response } else { - ui.label(format!( - "[ {} , {} , {} ]", - re_format::format_f32(x), - re_format::format_f32(y), - re_format::format_f32(z), - )) + UiLayout::List.data_label( + ui, + format!( + "[{}, {}, {}]", + re_format::format_f32(x), + re_format::format_f32(y), + re_format::format_f32(z), + ), + ) } } diff --git a/crates/viewer/re_component_ui/src/datatype_uis/view_uuid.rs b/crates/viewer/re_component_ui/src/datatype_uis/view_uuid.rs index 1c05c28a6a65..f98bfc36ce54 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/view_uuid.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/view_uuid.rs @@ -1,10 +1,10 @@ use re_types::datatypes::Uuid; -use re_viewer_context::MaybeMutRef; +use re_viewer_context::{MaybeMutRef, UiLayout}; pub fn view_uuid( _ctx: &re_viewer_context::ViewerContext<'_>, ui: &mut egui::Ui, value: &mut MaybeMutRef<'_, impl std::ops::DerefMut>, ) -> egui::Response { - ui.label(value.as_ref().to_string()) + UiLayout::List.data_label(ui, value.as_ref().to_string()) } diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AggregationPolicy_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AggregationPolicy_placeholder.png new file mode 100644 index 000000000000..ce4a17dc963d --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AggregationPolicy_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d1a0403035e1105f8f8f8c19c5d05fc9bf47293d9ec6e02c15add04445ce305 +size 3708 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AlbedoFactor_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AlbedoFactor_placeholder.png new file mode 100644 index 000000000000..516a5f3acfe8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AlbedoFactor_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcbc3d328bca52a715731be693802a9ee39f474355e754561aa605edb4180c09 +size 2827 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ApplyLatestAt_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ApplyLatestAt_placeholder.png new file mode 100644 index 000000000000..c2cef93c070f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ApplyLatestAt_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3188a2764468ce44a1d427f53217f945e27225afcc0c2a8907e72f3e97a69e4c +size 3551 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AxisLength_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AxisLength_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/AxisLength_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/BackgroundKind_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/BackgroundKind_placeholder.png new file mode 100644 index 000000000000..01c521ffc7cd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/BackgroundKind_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2ee8b93d7143c443b54461be95c872e09ad2b1db4fad19ceef7f8c262006f26 +size 4195 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ClearIsRecursive_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ClearIsRecursive_placeholder.png new file mode 100644 index 000000000000..c2cef93c070f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ClearIsRecursive_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3188a2764468ce44a1d427f53217f945e27225afcc0c2a8907e72f3e97a69e4c +size 3551 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Color_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Color_placeholder.png new file mode 100644 index 000000000000..516a5f3acfe8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Color_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcbc3d328bca52a715731be693802a9ee39f474355e754561aa605edb4180c09 +size 2827 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Colormap_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Colormap_placeholder.png new file mode 100644 index 000000000000..ce0036cbf231 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Colormap_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26030c15524fbc658807f54c970c89b93cf4da4c0879137f5230dacdf3d78feb +size 3326 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ComponentColumnSelector_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ComponentColumnSelector_simple.png new file mode 100644 index 000000000000..41ff10c42e1f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ComponentColumnSelector_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:915841f5ce3aaff8e39ce2c2ceb8f58ad926a29507032a915c954bc787ea3486 +size 4263 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ContainerKind_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ContainerKind_placeholder.png new file mode 100644 index 000000000000..dc94ce99c250 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ContainerKind_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:433b98591d3b4410a2c8c5a1273c7cd34775e645536e122c902104009d387e93 +size 2833 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Corner2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Corner2D_placeholder.png new file mode 100644 index 000000000000..8aee414d179c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Corner2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59cc672911f83fbbe4ed7c17f52f3a6a8e78817002bd6421e68f3a1f0e45b8bc +size 4248 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DepthMeter_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DepthMeter_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DepthMeter_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png new file mode 100644 index 000000000000..7eff823eb509 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c7e7982b97d6219a78beb8967d92da8251a45f40b291e58ae0fcbe0713373d7 +size 3243 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DrawOrder_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DrawOrder_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DrawOrder_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Enabled_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Enabled_placeholder.png new file mode 100644 index 000000000000..6015b0103ca3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Enabled_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcd16488de6d5ebb6ffec49b311b11f1d67513e5d9cb0dbaf3f3da82dca35334 +size 2835 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/EntityPath_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/EntityPath_simple.png new file mode 100644 index 000000000000..ec8ae5fe7732 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/EntityPath_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13fb8fe013fe84b4742a1429593688e98f28daa45d5262ff691472187d588d15 +size 4520 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillMode_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillMode_placeholder.png new file mode 100644 index 000000000000..71222f069048 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillMode_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd621b11553d06cb4f3cf541f6c7cec7c9c941e6685aff61a58a41e01d84da9f +size 4429 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillRatio_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillRatio_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FillRatio_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterByRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterByRange_placeholder.png new file mode 100644 index 000000000000..16a41bac7e6e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterByRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ddce3349330f6c0214ab2ace5deccf0e461ef1dbfdf0bd76c6b21ea849b0722 +size 4110 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterIsNotNull_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterIsNotNull_placeholder.png new file mode 100644 index 000000000000..6a6987593ca0 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/FilterIsNotNull_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43f56b381372f2efd7307fd799559fd4f432cfbc493aa7bc340ba13f4ec14e15 +size 4184 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceDistance_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceDistance_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceDistance_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceIterations_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceIterations_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceIterations_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceStrength_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceStrength_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ForceStrength_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GammaCorrection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GammaCorrection_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GammaCorrection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GeoLineString_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GeoLineString_placeholder.png new file mode 100644 index 000000000000..73a84bdce334 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GeoLineString_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54adede21781e791e401815c43eface9baebb702b9dcff72eeeb899bafdb8a8c +size 4341 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphEdge_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphEdge_simple.png new file mode 100644 index 000000000000..545c6e432ff4 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphEdge_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9473cfcf1d24fe8165215bde2f7804675c8e53529541dbaa73657f2f5ec02bed +size 4061 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphNode_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphNode_simple.png new file mode 100644 index 000000000000..f32ea9b440bc --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphNode_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19ff387903e6205538e50a91fa91b4ff057656ad83984b88bd5e0fe105646b61 +size 4262 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphType_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphType_placeholder.png new file mode 100644 index 000000000000..72cc034a81af --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GraphType_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:881b9fa1f2d5c150de7a96d28083c24235e0e46da50e5140340a030fea84fb31 +size 4131 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridColumns_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridColumns_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridColumns_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridSpacing_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridSpacing_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/GridSpacing_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize2D_placeholder.png new file mode 100644 index 000000000000..a5e50476a8ec --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a56ad6b58c206e6d4d74ec51ebeccdaa6ef03357b5a070b97cd67dd5108d496a +size 3129 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize3D_placeholder.png new file mode 100644 index 000000000000..2a7e50986d56 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/HalfSize3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9745c1303a456d12426c487c9bb9e6b1d699911b56adaff284d1afd422ca756c +size 3330 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_depth_f32.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_depth_f32.png new file mode 100644 index 000000000000..e0ff3948ca7c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_depth_f32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6f5070d9edd6534ed56e6f38e8c74117d08af8533aa3df23942a37ab1f613ee +size 4199 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_nv12.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_nv12.png new file mode 100644 index 000000000000..d95cd2beaa0f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_nv12.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:327b6be68362c2d6523b643c42ebf9b9799e31d78ae3ce8acd740790413c3d14 +size 4289 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgb8.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgb8.png new file mode 100644 index 000000000000..0b057eb947bd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgb8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1f9c404df8c396d625de5fdca811a9a464fafd1ebe463523da33a1e3dba8bec +size 4458 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgba8.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgba8.png new file mode 100644 index 000000000000..c4ddb601261c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_rgba8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24290110509ebb986d56ffbcd4d9def572ae6f58479747a9092a400ce9900615 +size 4429 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_segmentation_u32.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_segmentation_u32.png new file mode 100644 index 000000000000..06872b73d717 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImageFormat_segmentation_u32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c68d439de793e63a2ef5e0b01ad7a06cb52cfb9af432241ada778737af270f1d +size 4230 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImagePlaneDistance_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImagePlaneDistance_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ImagePlaneDistance_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Interactive_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Interactive_placeholder.png new file mode 100644 index 000000000000..7eff823eb509 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Interactive_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c7e7982b97d6219a78beb8967d92da8251a45f40b291e58ae0fcbe0713373d7 +size 3243 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LatLon_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LatLon_placeholder.png new file mode 100644 index 000000000000..baa28fdc5751 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LatLon_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14ae8fc6d119409546fbca1eeeb36e30b7996a08a74e357a3a6777d567c13bd4 +size 4345 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Length_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Length_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Length_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip2D_placeholder.png new file mode 100644 index 000000000000..73a84bdce334 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54adede21781e791e401815c43eface9baebb702b9dcff72eeeb899bafdb8a8c +size 4341 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip3D_placeholder.png new file mode 100644 index 000000000000..73a84bdce334 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LineStrip3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54adede21781e791e401815c43eface9baebb702b9dcff72eeeb899bafdb8a8c +size 4341 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LockRangeDuringZoom_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LockRangeDuringZoom_placeholder.png new file mode 100644 index 000000000000..6015b0103ca3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/LockRangeDuringZoom_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcd16488de6d5ebb6ffec49b311b11f1d67513e5d9cb0dbaf3f3da82dca35334 +size 2835 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MagnificationFilter_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MagnificationFilter_placeholder.png new file mode 100644 index 000000000000..5b379b59aba3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MagnificationFilter_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c91bd16eaca147265f4044963c49155872b6358b734d41c696e42a6dfe0b331 +size 3780 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MapProvider_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MapProvider_placeholder.png new file mode 100644 index 000000000000..fc4d7a5a296c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MapProvider_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a3d32b0e83ef515a58a704d1b815b27de34d6ab2d91f0cfa461a9d4d20d47f0 +size 4481 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerShape_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerShape_placeholder.png new file mode 100644 index 000000000000..6080441dc012 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerShape_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d27edcca40c729dbff3418e78e055e71f5883547c038b763de961e3433649412 +size 3793 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerSize_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerSize_placeholder.png new file mode 100644 index 000000000000..77bc35a3e629 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MarkerSize_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de20a65b75d6f0398c74224ec4e82aa408f7b1b236646a3f5fbdcd97d107bbb0 +size 3346 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MediaType_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MediaType_placeholder.png new file mode 100644 index 000000000000..ece7792b720c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/MediaType_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:789685b21c016fc7e6ca2cb7f836f42e9e7b0fe626ff6f9993259c80c60ecdad +size 4475 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Name_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Name_placeholder.png new file mode 100644 index 000000000000..7a40c67b26d2 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Name_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b6f20e71a6b52839b3265ae1b360128eb14f6c1134a045684a6ab1084b503bb +size 3668 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/NearClipPlane_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/NearClipPlane_placeholder.png new file mode 100644 index 000000000000..0a09ee395e00 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/NearClipPlane_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b53b02205c8c20bbddde36ca2862b042530cf74ae583944a44bdec3f8587d565 +size 3088 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Opacity_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Opacity_placeholder.png new file mode 100644 index 000000000000..a0a2d461209a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Opacity_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf82be5e97ac1eb76828d8bdb19d8a66f66935ade56295890ec9836af88b9d4e +size 2778 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PinholeProjection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PinholeProjection_placeholder.png new file mode 100644 index 000000000000..1340d5648b2c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PinholeProjection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d88188b96d9be13f7239db13de21cc970759b792105d0c7ccc580b9046fd7a20 +size 4297 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Plane3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Plane3D_placeholder.png new file mode 100644 index 000000000000..c5f234b56587 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Plane3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f6dc1c52b1b7b36b1a36cae67a18f0aeca99d9162364b7cf73937e5911dc379 +size 3761 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationAxisAngle_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationAxisAngle_placeholder.png new file mode 100644 index 000000000000..10422adde65f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationAxisAngle_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a54ba133a55acdf936eb7864a56dcf58921bc2abf9e394344ef6f1586f337b3 +size 4048 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationQuat_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationQuat_placeholder.png new file mode 100644 index 000000000000..d24e21b5cb22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseRotationQuat_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b8ec21b3ddbf24cb7fced6edb805ee356e7265ef2409c7cb2c3b90838dff0a5 +size 3843 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseScale3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseScale3D_placeholder.png new file mode 100644 index 000000000000..2a7e50986d56 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseScale3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9745c1303a456d12426c487c9bb9e6b1d699911b56adaff284d1afd422ca756c +size 3330 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTransformMat3x3_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTransformMat3x3_placeholder.png new file mode 100644 index 000000000000..9b62d2676f90 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTransformMat3x3_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d26ef2482809cb1b16d0dd6a19f77ab6b5d085bbe1a5a47e95ba7d85bae8427c +size 3685 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTranslation3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTranslation3D_placeholder.png new file mode 100644 index 000000000000..5acffa3791cc --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/PoseTranslation3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb9ad32a52e1e0042eeaddf1811d2342cb867dba2331a79f26399a0649d034b +size 3771 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position2D_placeholder.png new file mode 100644 index 000000000000..9e2cb5465651 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98772373ea83350e3a3e5c8f4584ec9f5122d952b5dc4a410ddf6c641183fa5a +size 3423 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position3D_placeholder.png new file mode 100644 index 000000000000..5acffa3791cc --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Position3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb9ad32a52e1e0042eeaddf1811d2342cb867dba2331a79f26399a0649d034b +size 3771 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/QueryExpression_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/QueryExpression_simple.png new file mode 100644 index 000000000000..775d22d0ad6a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/QueryExpression_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8ed5266dfbdc3f2cb0e10d32a5889549daa83adc9268e6d83ede234b6e70366 +size 3947 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Radius_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Radius_placeholder.png new file mode 100644 index 000000000000..7f76e08fae44 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Radius_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e2105fb5b4567d2a2bdb396012ad36cc506e7ce6312ae16c1130c2405354cac +size 4159 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Range1D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Range1D_placeholder.png new file mode 100644 index 000000000000..d25aeef56235 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Range1D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef9d406df618913cae1735972bb9aa2c3ceff6e477fd6ae8ec5ce68fe3478674 +size 3089 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RecordingUri_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RecordingUri_simple.png new file mode 100644 index 000000000000..d4a025afcaa8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RecordingUri_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf6ffe022e455d18478b877ddc27f858c051538e57d49ae083d60adfa8214be0 +size 4325 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Resolution_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Resolution_placeholder.png new file mode 100644 index 000000000000..91ce4bcccdde --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Resolution_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a12c5eb1f2dc296085a657e195b3eb4e18dfa155c027bd58656bcced2d8e6a5 +size 3407 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationAxisAngle_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationAxisAngle_placeholder.png new file mode 100644 index 000000000000..10422adde65f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationAxisAngle_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a54ba133a55acdf936eb7864a56dcf58921bc2abf9e394344ef6f1586f337b3 +size 4048 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationQuat_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationQuat_placeholder.png new file mode 100644 index 000000000000..d24e21b5cb22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/RotationQuat_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b8ec21b3ddbf24cb7fced6edb805ee356e7265ef2409c7cb2c3b90838dff0a5 +size 3843 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scalar_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scalar_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scalar_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scale3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scale3D_placeholder.png new file mode 100644 index 000000000000..2a7e50986d56 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Scale3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9745c1303a456d12426c487c9bb9e6b1d699911b56adaff284d1afd422ca756c +size 3330 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/SelectedColumns_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/SelectedColumns_placeholder.png new file mode 100644 index 000000000000..4dc7fd0aaea8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/SelectedColumns_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8927b55176689a51d4cd12265599de4f0880de57d7d78a860d2fe67b94bf5d5b +size 4131 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ShowLabels_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ShowLabels_placeholder.png new file mode 100644 index 000000000000..6015b0103ca3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ShowLabels_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcd16488de6d5ebb6ffec49b311b11f1d67513e5d9cb0dbaf3f3da82dca35334 +size 2835 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/StrokeWidth_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/StrokeWidth_placeholder.png new file mode 100644 index 000000000000..77bc35a3e629 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/StrokeWidth_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de20a65b75d6f0398c74224ec4e82aa408f7b1b236646a3f5fbdcd97d107bbb0 +size 3346 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSelection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSelection_placeholder.png new file mode 100644 index 000000000000..18bdb57c8a24 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSelection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bad3b63fccd519d1c2e7bf38a8a0b7bf4616850164867aa64c28f398de61d00 +size 4308 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSlider_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSlider_placeholder.png new file mode 100644 index 000000000000..18bdb57c8a24 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorDimensionIndexSlider_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bad3b63fccd519d1c2e7bf38a8a0b7bf4616850164867aa64c28f398de61d00 +size 4308 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorHeightDimension_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorHeightDimension_placeholder.png new file mode 100644 index 000000000000..18bdb57c8a24 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorHeightDimension_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bad3b63fccd519d1c2e7bf38a8a0b7bf4616850164867aa64c28f398de61d00 +size 4308 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorWidthDimension_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorWidthDimension_placeholder.png new file mode 100644 index 000000000000..18bdb57c8a24 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TensorWidthDimension_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bad3b63fccd519d1c2e7bf38a8a0b7bf4616850164867aa64c28f398de61d00 +size 4308 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Texcoord2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Texcoord2D_placeholder.png new file mode 100644 index 000000000000..9e2cb5465651 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Texcoord2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98772373ea83350e3a3e5c8f4584ec9f5122d952b5dc4a410ddf6c641183fa5a +size 3423 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TextLogLevel_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TextLogLevel_placeholder.png new file mode 100644 index 000000000000..91617b5329c8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TextLogLevel_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3320e8273342eaa2e1e696d906478a561e3b799c537c5af4e2de846f43ed373d +size 3294 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Text_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Text_simple.png new file mode 100644 index 000000000000..772ea265b7e8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Text_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d62b2e88d66c490ca14939aba1b55f692654323eeeb03912c7982526ad25876 +size 4017 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TimelineName_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TimelineName_placeholder.png new file mode 100644 index 000000000000..51cc7223c69e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TimelineName_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869a3f9c1dd1e2c16920ee0f3ac0f1ff7028f0aadd2e7c23debae64651e2709a +size 3737 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformMat3x3_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformMat3x3_placeholder.png new file mode 100644 index 000000000000..fd44897af1e6 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformMat3x3_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f52042d458ee5bfb864c8ff960c639170a39b0c3e8b6d37ee341438c1b83cd17 +size 3705 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformRelation_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformRelation_placeholder.png new file mode 100644 index 000000000000..0da6ab624cbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TransformRelation_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e40d93f0f01c30f659b3464d00592c97b875ea9f6bd2db3bcac71af66d7509c0 +size 4121 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Translation3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Translation3D_placeholder.png new file mode 100644 index 000000000000..5acffa3791cc --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Translation3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb9ad32a52e1e0042eeaddf1811d2342cb867dba2331a79f26399a0649d034b +size 3771 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TriangleIndices_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TriangleIndices_placeholder.png new file mode 100644 index 000000000000..9cb9af4f7d72 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/TriangleIndices_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8fd907ee695c6c2306d1f8dc8649d0a715b514ead3728468360dc5bc035764c +size 3584 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ValueRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ValueRange_placeholder.png new file mode 100644 index 000000000000..d25aeef56235 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ValueRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef9d406df618913cae1735972bb9aa2c3ceff6e477fd6ae8ec5ce68fe3478674 +size 3089 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector2D_placeholder.png new file mode 100644 index 000000000000..9e2cb5465651 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98772373ea83350e3a3e5c8f4584ec9f5122d952b5dc4a410ddf6c641183fa5a +size 3423 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector3D_placeholder.png new file mode 100644 index 000000000000..5acffa3791cc --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Vector3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb9ad32a52e1e0042eeaddf1811d2342cb867dba2331a79f26399a0649d034b +size 3771 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VideoTimestamp_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VideoTimestamp_placeholder.png new file mode 100644 index 000000000000..d0546be511e9 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VideoTimestamp_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b5ada92f23605310e4364b0ea0456daf1276ed7f8205587794ca0f89e311fa1 +size 3992 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewClass_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewClass_placeholder.png new file mode 100644 index 000000000000..bc91c96325ea --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewClass_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7b275c738e7af0a6b0be2cb8f8fe5b7b460dc232060afcb549c049ce91d9f46 +size 4142 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewCoordinates_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewCoordinates_placeholder.png new file mode 100644 index 000000000000..c7b7bdc3df39 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewCoordinates_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d065a4e7823d48e04af1b7099fae1bfcaf501d8a142271014d11069af59f46b5 +size 4295 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewFit_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewFit_placeholder.png new file mode 100644 index 000000000000..7f3e49edb4a8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ViewFit_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d3318b13c414ae6f7f3ad1abb5cd5b8acdba6936f719590541e73023f92c166 +size 4470 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisibleTimeRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisibleTimeRange_placeholder.png new file mode 100644 index 000000000000..5ba7e8f4ad3f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisibleTimeRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e62ce19c1aad49e8d70297cc90d99abe72b150c944bd2954dd61ddb779eec798 +size 4218 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Visible_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Visible_placeholder.png new file mode 100644 index 000000000000..bf50d6f74ed1 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/Visible_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1db9e3d75b028762e0c42f9b4e8fe9efbc782d66dc8f617e6e9b1a0a08a7f44 +size 3007 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisualBounds2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisualBounds2D_placeholder.png new file mode 100644 index 000000000000..2a16690a360f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/VisualBounds2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ad89ec578747544e5c9ee285fcc163731270cf4e1d6deb91b2d349b1c93e9c4 +size 3979 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ZoomLevel_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ZoomLevel_placeholder.png new file mode 100644 index 000000000000..b73132997f05 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/ZoomLevel_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b6ca27d4addf38ddb9ead85c25fa01dbf930ab464e4df00dade0b86197d878 +size 2938 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AggregationPolicy_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AggregationPolicy_placeholder.png new file mode 100644 index 000000000000..f0681f0377b7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AggregationPolicy_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dec8ba7c3d11a8a82c53746da0537f1cc09742ae779d81946e7f2af6b42e84ae +size 4019 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AlbedoFactor_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AlbedoFactor_placeholder.png new file mode 100644 index 000000000000..0321ea816c06 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AlbedoFactor_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:687df70f81563566512069ab2182cad07911ea40e2a3aeeea33130054f31688a +size 3137 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ApplyLatestAt_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ApplyLatestAt_placeholder.png new file mode 100644 index 000000000000..5e98698046cb --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ApplyLatestAt_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:417e1f21df8b60941060e963097b211fc0c2775638ccda6990aee567c56a2b4a +size 3863 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AxisLength_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AxisLength_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/AxisLength_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/BackgroundKind_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/BackgroundKind_placeholder.png new file mode 100644 index 000000000000..dd4ae352b553 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/BackgroundKind_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb639edc6ccf096e5fa64fa0938d1e52acbc400178e2cd14ee8815dafe20e89a +size 4818 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ClearIsRecursive_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ClearIsRecursive_placeholder.png new file mode 100644 index 000000000000..5e98698046cb --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ClearIsRecursive_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:417e1f21df8b60941060e963097b211fc0c2775638ccda6990aee567c56a2b4a +size 3863 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Color_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Color_placeholder.png new file mode 100644 index 000000000000..0321ea816c06 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Color_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:687df70f81563566512069ab2182cad07911ea40e2a3aeeea33130054f31688a +size 3137 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Colormap_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Colormap_placeholder.png new file mode 100644 index 000000000000..72612aea86a9 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Colormap_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58205dc78f239c52840ccd86cbbdbc881ff8476d0f03f3c11854a905733a3e90 +size 3638 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ComponentColumnSelector_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ComponentColumnSelector_simple.png new file mode 100644 index 000000000000..687c3220ac0a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ComponentColumnSelector_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db7a94dbed9e8e1b0aff8cf21f3520a044692cd667d4b4f54d2b87f0359b7329 +size 11501 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ContainerKind_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ContainerKind_placeholder.png new file mode 100644 index 000000000000..3f2d330df625 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ContainerKind_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7d081dbd2bc0a87d7135ad4399889a469dc14fa1c22174ed6a6e94118dccde9 +size 3146 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Corner2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Corner2D_placeholder.png new file mode 100644 index 000000000000..2d506c1aeb7f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Corner2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5118cddea8ded48f7f737e30fcdf1d7b84ffe1793dab6f6afc89b6d590f804e4 +size 4793 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DepthMeter_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DepthMeter_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DepthMeter_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png new file mode 100644 index 000000000000..0333b48d5aa9 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f21d8cedc48aa3e11c0e9eadde3f5616f53ee785679e8e25ca6d151573cb7403 +size 3554 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DrawOrder_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DrawOrder_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DrawOrder_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Enabled_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Enabled_placeholder.png new file mode 100644 index 000000000000..273941735972 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Enabled_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a35dfbe710b9fb0827301b563fb9e7881ba6416968a57eec3691fc51844bd21 +size 3155 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/EntityPath_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/EntityPath_simple.png new file mode 100644 index 000000000000..faefaee88869 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/EntityPath_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53f9b5bc5748a7d5ac183afd0cf8e8f0e96f59c5321d192cf4385ab04e21c9e7 +size 6434 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillMode_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillMode_placeholder.png new file mode 100644 index 000000000000..ea65ef2f1e20 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillMode_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf32f41d00bfb66461e3edbc0e6970544734ab6511f30f29908cbc6714baeab2 +size 5180 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillRatio_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillRatio_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FillRatio_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterByRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterByRange_placeholder.png new file mode 100644 index 000000000000..05ec98a6866c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterByRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac9f50aa8d90c2410dfbd8b88e24c2087de4a8a81340065edb3b2c2632e4889a +size 12670 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterIsNotNull_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterIsNotNull_placeholder.png new file mode 100644 index 000000000000..0cd10f33aeb4 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/FilterIsNotNull_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd5a2ad311444290834aca2093b95ebf89c9a9e166c98e17b8588c1a6dcb881b +size 9884 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceDistance_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceDistance_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceDistance_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceIterations_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceIterations_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceIterations_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceStrength_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceStrength_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ForceStrength_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GammaCorrection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GammaCorrection_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GammaCorrection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GeoLineString_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GeoLineString_placeholder.png new file mode 100644 index 000000000000..ab3f28fb8263 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GeoLineString_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f342372690333f63b9d072ccbb844a438a979747842e5bd2fe79e13b1d25d2cc +size 4654 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphEdge_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphEdge_simple.png new file mode 100644 index 000000000000..e7dc73c80eea --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphEdge_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7a9961b105b359819cf51786123a92f9f1ef34c0d5738a71906bb9812ee1d11 +size 7123 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphNode_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphNode_simple.png new file mode 100644 index 000000000000..3c520440e41f --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphNode_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6733346f32e5abfa96d59b408b011c8cf8123ea6c8e1c89b906ad6b14068942 +size 4576 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphType_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphType_placeholder.png new file mode 100644 index 000000000000..f99f74aa162e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GraphType_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e38416f4769c2c4ab1f6c9e6f69f72042ef3e59956b27a9e321b4e09f567b46 +size 4444 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridColumns_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridColumns_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridColumns_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridSpacing_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridSpacing_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/GridSpacing_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize2D_placeholder.png new file mode 100644 index 000000000000..f695b57571f4 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b15740484aabecc80f2e5261f7923cbde78a5e25de21a9d7aac4f1184d6e2993 +size 3441 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize3D_placeholder.png new file mode 100644 index 000000000000..15787cab0c22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/HalfSize3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9796dc9d6b32ebef86a19855f64eb3dea9a9ddb54e6111ff1c2f4d62d4c7d9d +size 3641 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_depth_f32.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_depth_f32.png new file mode 100644 index 000000000000..a652727ddcc8 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_depth_f32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61d3ae6984ded4545b7726d917647cd090364ea7a1a3454d1b579f0a719d6481 +size 5112 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_nv12.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_nv12.png new file mode 100644 index 000000000000..5fe1a92308f3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_nv12.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef4134e6e31d0c5918690433e833e1ec04a04b3c4d2ec585f4401ff086c1afdb +size 5165 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgb8.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgb8.png new file mode 100644 index 000000000000..e95c541670af --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgb8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ace3c287097281a9781ba0175f5b280b33e35221d6c11f857e2732902c1284c2 +size 5547 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgba8.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgba8.png new file mode 100644 index 000000000000..fd073601e53a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_rgba8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2398b1f06bb56575139a697cb7774070fec95904bba6f5339501f6fd14a411d8 +size 5760 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_segmentation_u32.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_segmentation_u32.png new file mode 100644 index 000000000000..106e329f553c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImageFormat_segmentation_u32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb0a915059db631748a623137149f919ec55cb2c7be68ffb953d0ea56aa71fd6 +size 5140 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImagePlaneDistance_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImagePlaneDistance_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ImagePlaneDistance_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Interactive_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Interactive_placeholder.png new file mode 100644 index 000000000000..0333b48d5aa9 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Interactive_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f21d8cedc48aa3e11c0e9eadde3f5616f53ee785679e8e25ca6d151573cb7403 +size 3554 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LatLon_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LatLon_placeholder.png new file mode 100644 index 000000000000..da04d3646a24 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LatLon_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69ab042561c498d41c84f3568645782b44bec27bb14cb6c09c88e4971c100583 +size 6814 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Length_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Length_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Length_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip2D_placeholder.png new file mode 100644 index 000000000000..ab3f28fb8263 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f342372690333f63b9d072ccbb844a438a979747842e5bd2fe79e13b1d25d2cc +size 4654 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip3D_placeholder.png new file mode 100644 index 000000000000..ab3f28fb8263 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LineStrip3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f342372690333f63b9d072ccbb844a438a979747842e5bd2fe79e13b1d25d2cc +size 4654 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LockRangeDuringZoom_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LockRangeDuringZoom_placeholder.png new file mode 100644 index 000000000000..273941735972 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/LockRangeDuringZoom_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a35dfbe710b9fb0827301b563fb9e7881ba6416968a57eec3691fc51844bd21 +size 3155 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MagnificationFilter_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MagnificationFilter_placeholder.png new file mode 100644 index 000000000000..479ac3fb88ca --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MagnificationFilter_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d7f4922e419c20ce7cee5e3dad4cde0544603dc75781e7a9f68aafeea5db47c +size 4092 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MapProvider_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MapProvider_placeholder.png new file mode 100644 index 000000000000..cdb1059bcf31 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MapProvider_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f04dd4a4c2ef50bc4f0a866088728cbef910533e2146389906fd57000469dc20 +size 5478 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerShape_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerShape_placeholder.png new file mode 100644 index 000000000000..31cb80d78e25 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerShape_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7746a4c74d4ad8fe11871920714ad80e90c8c18eb27b652d002589177a0758f9 +size 4120 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerSize_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerSize_placeholder.png new file mode 100644 index 000000000000..a8d506e4ab80 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MarkerSize_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67788004bff75cd2fcfc779202a9f8c645030bbd3f383436f599654792df3574 +size 3665 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MediaType_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MediaType_placeholder.png new file mode 100644 index 000000000000..8569492cfb75 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/MediaType_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89630c537d030cdf13ff8c010a98b65bf2d7a1eceb8bbc70cc3ff71903f60ade +size 6736 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Name_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Name_placeholder.png new file mode 100644 index 000000000000..02c6c0ba5b07 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Name_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e7f391a97bcce86410fe3791575b073809da63126cf9d301dbc3232ca1ec5a3 +size 3979 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/NearClipPlane_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/NearClipPlane_placeholder.png new file mode 100644 index 000000000000..bd28a11804b1 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/NearClipPlane_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8671ec4d2295309405844dcd255ea3e332f893eed437fc0ff7ce51a6b307f938 +size 3406 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Opacity_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Opacity_placeholder.png new file mode 100644 index 000000000000..78e5ace99a5c --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Opacity_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c695a351b830364136a94a2ba7fd8f1800987776c892a213fdb855b6b8163fa2 +size 3091 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PinholeProjection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PinholeProjection_placeholder.png new file mode 100644 index 000000000000..3caa2c7da5ee --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PinholeProjection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b14796480d7eb5ac98e36ef5f1c897ddd9a9caecde1b62f9fb42501b1b690051 +size 8647 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Plane3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Plane3D_placeholder.png new file mode 100644 index 000000000000..cbfaaa878102 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Plane3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:837f2ba4b925c2c63bce11d4149e25ade16f3b921b7d22d0fb2e9fabe511f3dc +size 4072 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationAxisAngle_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationAxisAngle_placeholder.png new file mode 100644 index 000000000000..4c9cc15dfa08 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationAxisAngle_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da4ae0cabdf85b8c99d487fac504b8f4ff80524714973abd91bf1ddf6e14c42c +size 6496 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationQuat_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationQuat_placeholder.png new file mode 100644 index 000000000000..a792aaab3c5e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseRotationQuat_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:394c92143e5ea2c6487c7924f0b3e4e9f479d7709c3dcc0162e630fa64feb8f7 +size 4282 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseScale3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseScale3D_placeholder.png new file mode 100644 index 000000000000..15787cab0c22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseScale3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9796dc9d6b32ebef86a19855f64eb3dea9a9ddb54e6111ff1c2f4d62d4c7d9d +size 3641 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTransformMat3x3_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTransformMat3x3_placeholder.png new file mode 100644 index 000000000000..6f4d406319cf --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTransformMat3x3_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8457a14fc37bdb300d21c49a598a41cf1c38eeb863f05cc96574831bd2db9476 +size 5648 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTranslation3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTranslation3D_placeholder.png new file mode 100644 index 000000000000..0fb3ca2390bd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/PoseTranslation3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:151fb60aedceeaf62165c4b67adc039145cdd7dc6e5b2fb6a4eb932d41ba29d8 +size 4082 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position2D_placeholder.png new file mode 100644 index 000000000000..6cb19b4301a7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6832fae63ca911d76491d93c3ae281ae3b85489ae1e4f6a1870dbe2321352909 +size 3734 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position3D_placeholder.png new file mode 100644 index 000000000000..0fb3ca2390bd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Position3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:151fb60aedceeaf62165c4b67adc039145cdd7dc6e5b2fb6a4eb932d41ba29d8 +size 4082 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/QueryExpression_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/QueryExpression_simple.png new file mode 100644 index 000000000000..f83aebfa3243 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/QueryExpression_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f486cbb9f5a8edeb2395f2d05cf84076ac1c6406c6b9c6d4a24aa18612e34ac +size 4503 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Radius_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Radius_placeholder.png new file mode 100644 index 000000000000..c5e91ecb75d7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Radius_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6e78e89bafba478f70508517a50f8ac3b705295c675bdfd4e00abc433557957 +size 4473 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Range1D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Range1D_placeholder.png new file mode 100644 index 000000000000..71c740f7313d --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Range1D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f07557553490621a2629756d4e842c110aee29534a944b8282d8dbaae0a76c6 +size 3402 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RecordingUri_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RecordingUri_simple.png new file mode 100644 index 000000000000..73eff8ddd48e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RecordingUri_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cadda1c98087d18f97a8548486ba10db696e9f15737310ff065d13a48ad9dff +size 8762 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Resolution_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Resolution_placeholder.png new file mode 100644 index 000000000000..49e2955ab850 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Resolution_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba9ad76c391f50cca66fec0985b5a4827eaeb5eacc7445c6886daecc11af284b +size 3718 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationAxisAngle_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationAxisAngle_placeholder.png new file mode 100644 index 000000000000..4c9cc15dfa08 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationAxisAngle_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da4ae0cabdf85b8c99d487fac504b8f4ff80524714973abd91bf1ddf6e14c42c +size 6496 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationQuat_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationQuat_placeholder.png new file mode 100644 index 000000000000..a792aaab3c5e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/RotationQuat_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:394c92143e5ea2c6487c7924f0b3e4e9f479d7709c3dcc0162e630fa64feb8f7 +size 4282 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scalar_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scalar_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scalar_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scale3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scale3D_placeholder.png new file mode 100644 index 000000000000..15787cab0c22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Scale3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9796dc9d6b32ebef86a19855f64eb3dea9a9ddb54e6111ff1c2f4d62d4c7d9d +size 3641 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/SelectedColumns_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/SelectedColumns_placeholder.png new file mode 100644 index 000000000000..2df182f1a303 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/SelectedColumns_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a658d6153ac9a42c1b469e01ad5a71ac02948eb355e9802f760908ce3a7a956 +size 8055 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ShowLabels_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ShowLabels_placeholder.png new file mode 100644 index 000000000000..273941735972 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ShowLabels_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a35dfbe710b9fb0827301b563fb9e7881ba6416968a57eec3691fc51844bd21 +size 3155 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/StrokeWidth_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/StrokeWidth_placeholder.png new file mode 100644 index 000000000000..a8d506e4ab80 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/StrokeWidth_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67788004bff75cd2fcfc779202a9f8c645030bbd3f383436f599654792df3574 +size 3665 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSelection_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSelection_placeholder.png new file mode 100644 index 000000000000..ff44bcb78e22 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSelection_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59e34af57ebabf23d0b2affd950e2f76a8fb58badcd31e0c873af9ef6c6355e6 +size 6334 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSlider_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSlider_placeholder.png new file mode 100644 index 000000000000..1a9d09b4c760 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorDimensionIndexSlider_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d073c79588bb3c3603e20d5f5bf0918311ad39bf305d104af6fad79a6ad26d0a +size 5088 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorHeightDimension_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorHeightDimension_placeholder.png new file mode 100644 index 000000000000..9e0252590452 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorHeightDimension_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33c3ac3892cf88ee77256eb704c7b1690ba3044b1e443e0edfce7bc8525e8872 +size 6953 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorWidthDimension_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorWidthDimension_placeholder.png new file mode 100644 index 000000000000..9e0252590452 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TensorWidthDimension_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33c3ac3892cf88ee77256eb704c7b1690ba3044b1e443e0edfce7bc8525e8872 +size 6953 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Texcoord2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Texcoord2D_placeholder.png new file mode 100644 index 000000000000..6cb19b4301a7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Texcoord2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6832fae63ca911d76491d93c3ae281ae3b85489ae1e4f6a1870dbe2321352909 +size 3734 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TextLogLevel_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TextLogLevel_placeholder.png new file mode 100644 index 000000000000..f4360037a7fa --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TextLogLevel_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60391d97d7e4ef2e4f2fbe5cec116e205266a08937e3b2a26e58d62bda19b907 +size 3604 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Text_simple.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Text_simple.png new file mode 100644 index 000000000000..f113bc5dc0fd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Text_simple.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:430cecf754fb60758aeeb0c945fefe33e2f6c4865c8c5ee08ec905bc0b1f050d +size 4694 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TimelineName_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TimelineName_placeholder.png new file mode 100644 index 000000000000..edf73f2c9ca3 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TimelineName_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e5b8af17598b7bc475ea2968b9facf67e59298aaaccfb6c5881dab72e11d07d +size 4049 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformMat3x3_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformMat3x3_placeholder.png new file mode 100644 index 000000000000..7daca85c3e4e --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformMat3x3_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b90d25af9609759bfa6c5e93a00e23572d9845e786b7b819555800fc9c534e4 +size 4016 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformRelation_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformRelation_placeholder.png new file mode 100644 index 000000000000..73c154965f13 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TransformRelation_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:424aaba9c29182742d2bc0eacc3c3dbd2abb28a70d7fa3495b4dd2158d1f4948 +size 5010 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Translation3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Translation3D_placeholder.png new file mode 100644 index 000000000000..0fb3ca2390bd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Translation3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:151fb60aedceeaf62165c4b67adc039145cdd7dc6e5b2fb6a4eb932d41ba29d8 +size 4082 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TriangleIndices_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TriangleIndices_placeholder.png new file mode 100644 index 000000000000..be9978f0da88 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/TriangleIndices_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40485ff7171f1bb3fd28da6a2181efa5d07855faf23fb70d15317f5631d1e0a1 +size 3896 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ValueRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ValueRange_placeholder.png new file mode 100644 index 000000000000..71c740f7313d --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ValueRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f07557553490621a2629756d4e842c110aee29534a944b8282d8dbaae0a76c6 +size 3402 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector2D_placeholder.png new file mode 100644 index 000000000000..6cb19b4301a7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6832fae63ca911d76491d93c3ae281ae3b85489ae1e4f6a1870dbe2321352909 +size 3734 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector3D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector3D_placeholder.png new file mode 100644 index 000000000000..0fb3ca2390bd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Vector3D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:151fb60aedceeaf62165c4b67adc039145cdd7dc6e5b2fb6a4eb932d41ba29d8 +size 4082 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VideoTimestamp_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VideoTimestamp_placeholder.png new file mode 100644 index 000000000000..c8cac93c9520 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VideoTimestamp_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd82c2cb812d60b36bb01242abf45f8210834ddeec4fedbe4f96fec31bb45efe +size 4304 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewClass_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewClass_placeholder.png new file mode 100644 index 000000000000..1935fb24460a --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewClass_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15f0c9672fd7a1dc4f5f73c5c62a4a01ff3e0e6ec4e205de4fe7f3c2bef5eb5d +size 4453 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewCoordinates_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewCoordinates_placeholder.png new file mode 100644 index 000000000000..c2405f3491b1 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewCoordinates_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3de0351f824c4bc00058bc8e1ab5a36984f91f4e927088f68c07b5118afd8434 +size 7088 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewFit_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewFit_placeholder.png new file mode 100644 index 000000000000..5c28e3df7a1b --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ViewFit_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8471f37c291d7a076c543304b172d2b572f83eeff93cf8090c20874cb08f6c04 +size 6002 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisibleTimeRange_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisibleTimeRange_placeholder.png new file mode 100644 index 000000000000..83801d4a5bbe --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisibleTimeRange_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8aac02c21250aa3aeb1d23f0e68a0dd4de22cc50dfcbd6ced164ffcd1cb83e5d +size 9417 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Visible_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Visible_placeholder.png new file mode 100644 index 000000000000..8194e11bf9ff --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/Visible_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a157dcdf893e3a490cb24366c1a528c9375816d0ade797c6d5538366f4b65107 +size 3328 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisualBounds2D_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisualBounds2D_placeholder.png new file mode 100644 index 000000000000..1400ca1a2fe7 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/VisualBounds2D_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42520eba2223bcdb56ab764188039c0873e7671c4768960d014dc630122d08a1 +size 4291 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ZoomLevel_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ZoomLevel_placeholder.png new file mode 100644 index 000000000000..79029399bfbd --- /dev/null +++ b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/ZoomLevel_placeholder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d829442c06420d942fb0da541ce2cfba460d617160541e7ab9f13bcf39a7b4 +size 3252 diff --git a/crates/viewer/re_component_ui/tests/test_all_components_ui.rs b/crates/viewer/re_component_ui/tests/test_all_components_ui.rs new file mode 100644 index 000000000000..5b230215cf56 --- /dev/null +++ b/crates/viewer/re_component_ui/tests/test_all_components_ui.rs @@ -0,0 +1,369 @@ +#![allow(clippy::unwrap_used)] + +use std::collections::HashSet; +use std::fmt::Formatter; +use std::fs; + +use arrow::array::ArrayRef; +use egui::Vec2; +use egui_kittest::{SnapshotError, SnapshotOptions}; +use itertools::Itertools; +use nohash_hasher::IntSet; + +use re_component_ui::create_component_ui_registry; +use re_log_types::{EntityPath, Timeline}; +use re_types::{ + blueprint::components::{ComponentColumnSelector, QueryExpression}, + components::{self, GraphEdge, GraphNode, ImageFormat, RecordingUri, Text}, + datatypes::{ChannelDatatype, PixelFormat}, +}; +use re_types_core::{reflection::Reflection, Component, ComponentName, LoggableBatch}; +use re_ui::{list_item, UiExt}; +use re_viewer_context::{ + external::re_chunk_store::{external::re_chunk, LatestAtQuery}, + test_context::TestContext, + UiLayout, ViewerContext, +}; + +/// Test case master list. +/// +/// Edit this function to fine-tune the list of test cases. By default, every component in the +/// [`Reflection`] will be added to the list using their placeholder content. You can both exclude +/// components from that list and add test cases with custom component values. +fn test_cases(reflection: &Reflection) -> Vec { + // + // ADD YOUR CUSTOM TEST CASES HERE! + // + + let custom_test_cases = [ + TestCase::from_component( + ComponentColumnSelector::new( + &EntityPath::from("/world"), + "rerun.components.Position3D", + ), + "simple", + ), + TestCase::from_component( + components::EntityPath::from("/world/robot/camera"), + "simple", + ), + TestCase::from_component(GraphNode::from("graph_node"), "simple"), + TestCase::from_component(GraphEdge::from(("node_a", "node_b")), "simple"), + TestCase::from_component(ImageFormat::rgb8([640, 480]), "rgb8"), + TestCase::from_component(ImageFormat::rgba8([640, 480]), "rgba8"), + TestCase::from_component( + ImageFormat::depth([640, 480], ChannelDatatype::F32), + "depth_f32", + ), + TestCase::from_component( + ImageFormat::segmentation([640, 480], ChannelDatatype::U32), + "segmentation_u32", + ), + TestCase::from_component( + ImageFormat::from_pixel_format([640, 480], PixelFormat::NV12), + "nv12", + ), + TestCase::from_component(QueryExpression::from("+ /world/**"), "simple"), + TestCase::from_component( + RecordingUri::from("rerun://0.0.0.0:1234/recordings/XYZ"), + "simple", + ), + TestCase::from_component(Text::from("Hello World!"), "simple"), + ]; + + // + // EXCLUDE COMPONENTS FROM THE PLACEHOLDER LIST HERE! + // + + let excluded_components = [ + // TODO(#6661): these components still have special treatment via `DataUi` and + // `EntityDatatUi`. The hooks are registered by `re_data_ui::register_component_uis`, which + // is not available here. So basically no point testing them here. + re_types::components::AnnotationContext::name(), + re_types::components::Blob::name(), + re_types::components::ClassId::name(), + re_types::components::ImageBuffer::name(), // this one is not technically handled by `DataUi`, but should get a custom ui first (it's using default ui right now). + re_types::components::KeypointId::name(), + re_types::components::TensorData::name(), + // + // no need to clutter the tests with these internal blueprint types + re_types::blueprint::components::ActiveTab::name(), + re_types::blueprint::components::AutoLayout::name(), + re_types::blueprint::components::AutoViews::name(), + re_types::blueprint::components::ColumnShare::name(), + re_types::blueprint::components::IncludedContent::name(), + re_types::blueprint::components::PanelState::name(), + re_types::blueprint::components::RootContainer::name(), + re_types::blueprint::components::RowShare::name(), + re_types::blueprint::components::ViewMaximized::name(), + re_types::blueprint::components::ViewOrigin::name(), + re_types::blueprint::components::ViewerRecommendationHash::name(), + re_types::blueprint::components::VisualizerOverrides::name(), + ] + .into_iter() + // Exclude components that have custom test cases. + .chain( + custom_test_cases + .iter() + .map(|test_case| test_case.component_name), + ) + .collect::>(); + + // + // Placeholder test cases for all components. + // + + let placeholder_test_cases = reflection + .components + .keys() + .filter(|component_name| !excluded_components.contains(*component_name)) + .map(|&component_name| { + let component_data = placeholder_for_component(reflection, component_name).unwrap(); + TestCase { + label: "placeholder", + component_name, + component_data, + } + }); + + placeholder_test_cases + .chain(custom_test_cases) + .sorted_by(|left, right| { + left.component_name + .short_name() + .cmp(right.component_name.short_name()) + .then_with(|| left.label.cmp(right.label)) + }) + .collect_vec() +} + +// --- + +/// Test all components UI in a narrow list item context. +#[test] +pub fn test_all_components_ui_as_list_items_narrow() { + let test_context = get_test_context(); + let test_cases = test_cases(&test_context.reflection); + let snapshot_options = + SnapshotOptions::default().output_path("tests/snapshots/all_components_list_item_narrow"); + + let results = test_cases + .iter() + .map(|test_case| { + test_single_component_ui_as_list_item( + &test_context, + test_case, + 200.0, + &snapshot_options, + ) + }) + .collect_vec(); + + check_for_unused_snapshots(&test_cases, &snapshot_options); + check_and_print_results(&test_cases, &results); +} + +/// Test all components UI in a wide list item context. +#[test] +pub fn test_all_components_ui_as_list_items_wide() { + let test_context = get_test_context(); + let test_cases = test_cases(&test_context.reflection); + let snapshot_options = + SnapshotOptions::default().output_path("tests/snapshots/all_components_list_item_wide"); + + let results = test_cases + .iter() + .map(|test_case| { + test_single_component_ui_as_list_item( + &test_context, + test_case, + 600.0, + &snapshot_options, + ) + }) + .collect_vec(); + + check_for_unused_snapshots(&test_cases, &snapshot_options); + check_and_print_results(&test_cases, &results); +} + +fn test_single_component_ui_as_list_item( + test_context: &TestContext, + test_case: &TestCase, + ui_width: f32, + _snapshot_options: &SnapshotOptions, +) -> Result<(), SnapshotError> { + let actual_ui = |ctx: &ViewerContext<'_>, ui: &mut egui::Ui| { + ui.list_item_flat_noninteractive( + list_item::PropertyContent::new("ComponentName").value_fn(|ui, _| { + ctx.component_ui_registry.ui_raw( + ctx, + ui, + UiLayout::List, + // Note: recording and queries are only used for tooltips, + // which we are not testing here. + &LatestAtQuery::latest(Timeline::log_time()), + ctx.recording(), + &EntityPath::root(), + test_case.component_name, + None, + &*test_case.component_data, + ); + }), + ); + }; + + let mut harness = egui_kittest::Harness::builder() + .with_size(Vec2::new(ui_width, 40.0)) + .build_ui(|ui| { + test_context.run(&ui.ctx().clone(), |ctx| { + ui.full_span_scope(ui.max_rect().x_range(), |ui| { + list_item::list_item_scope(ui, "list_item_scope", |ui| { + actual_ui(ctx, ui); + }); + }); + }); + }); + + harness.run(); + + //TODO(#8245): enable this everywhere when we have a software renderer setup + if cfg!(target_os = "macos") { + harness.try_wgpu_snapshot_options(&format!("{test_case}"), _snapshot_options) + } else { + Ok(()) + } +} + +// --- + +/// Description of a single test case. +struct TestCase { + /// Label for the test case. + /// + /// Labels must be unique per component. + label: &'static str, + + /// The component this test case refers to. + component_name: ComponentName, + + /// The data for that component. + component_data: ArrayRef, +} + +impl std::fmt::Display for TestCase { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}_{}", self.component_name.short_name(), self.label) + } +} + +impl TestCase { + #[allow(clippy::needless_pass_by_value)] + fn from_component(component: C, label: &'static str) -> Self { + let component_name = C::name(); + let component_data = LoggableBatch::to_arrow(&component).unwrap(); + Self { + label, + component_name, + component_data, + } + } +} + +/// Ensures that we don't have a dangling snapshot image that is no longer used. +/// +/// This assumes that each snapshot image is named after `TestCase` display impl. +fn check_for_unused_snapshots(test_cases: &[TestCase], snapshot_options: &SnapshotOptions) { + let ok_file_names = test_cases + .iter() + .map(ToString::to_string) + .collect::>(); + + for entry in fs::read_dir(&snapshot_options.output_path).unwrap() { + let path = entry.unwrap().path(); + + if !path.is_file() { + continue; + } + + let file_name = path.file_name().unwrap().to_string_lossy().to_string(); + + if file_name.ends_with(".png") + && !file_name.ends_with(".new.png") + && !file_name.ends_with(".diff.png") + && !ok_file_names.contains(file_name.strip_suffix(".png").unwrap()) + { + panic!( + "File {} does not belong to any known test", + path.to_string_lossy() + ) + } + } +} + +/// Pretty prints a list of test cases with the OK/NOK result and panics if any of the tests failed. +fn check_and_print_results(test_cases: &[TestCase], results: &[Result<(), SnapshotError>]) { + let component_name_width = test_cases + .iter() + .map(|test_case| test_case.component_name.short_name().len()) + .max() + .unwrap(); + + let label_width = test_cases + .iter() + .map(|test_case| test_case.label.len()) + .max() + .unwrap(); + + for (test_case, result) in test_cases.iter().zip(results.iter()) { + match result { + Ok(_) => println!( + "{:>component_name_width$}[{:label_width$}] OK", + test_case.component_name.short_name(), + test_case.label, + ), + Err(err) => println!( + "{:>component_name_width$}[{:label_width$}] ERR {}", + test_case.component_name.short_name(), + test_case.label, + err, + ), + } + } + + assert!( + results.iter().all(Result::is_ok), + "Some test cases failed, see previous output." + ); +} + +/// Create a [`TestContext`] with a fully populated component ui registry. +// TODO(ab): It would be nice to generalise this utility. However, TestContext current lives in +// re_viewer_context, which cannot depend on re_component_ui. +fn get_test_context() -> TestContext { + let mut test_context = TestContext::default(); + test_context.component_ui_registry = create_component_ui_registry(); + test_context +} + +/// Get some placeholder data for the provided component. +/// +/// This is a simpler version of [`ViewerContext::placeholder_for`] which doesn't attempt to infer +/// datatypes from store contents. As a result, it will fail for user-defined components, which is +/// fine as we only test built-in components here. +fn placeholder_for_component( + reflection: &Reflection, + component: re_chunk::ComponentName, +) -> Option { + let datatype = if let Some(reflection) = reflection.components.get(&component) { + if let Some(placeholder) = reflection.custom_placeholder.as_ref() { + return Some(placeholder.clone()); + } + Some(reflection.datatype.clone()) + } else { + None + }; + + datatype + .map(|datatype| re_types::reflection::generic_placeholder_for_datatype(&datatype).into()) +} diff --git a/crates/viewer/re_data_ui/src/component_ui_registry.rs b/crates/viewer/re_data_ui/src/component_ui_registry.rs index b9218eaffaa0..041242a3de14 100644 --- a/crates/viewer/re_data_ui/src/component_ui_registry.rs +++ b/crates/viewer/re_data_ui/src/component_ui_registry.rs @@ -9,7 +9,7 @@ pub fn register_component_uis(registry: &mut re_viewer_context::ComponentUiRegis // TODO(#6661): Move this to component_ui_registry. Separate components could simplify this to the extent that multi/single line is enough? add_to_registry::(registry); - // TODO(#6661): Move this to component_ui_registry. Image preview is a bit hard because row_id and size stuff needs to be known + // TODO(#6661): Move this to component_ui_registry. Image preview is a bit hard because row_id and size stuff needs to be known. `ImageBuffer` needs to be handled as well. add_to_registry::(registry); add_to_registry::(registry); diff --git a/crates/viewer/re_viewer_context/src/test_context.rs b/crates/viewer/re_viewer_context/src/test_context.rs index e661e60cf4fc..b772f32dc21a 100644 --- a/crates/viewer/re_viewer_context/src/test_context.rs +++ b/crates/viewer/re_viewer_context/src/test_context.rs @@ -3,6 +3,7 @@ use std::sync::Arc; use re_chunk_store::LatestAtQuery; use re_entity_db::EntityDb; use re_log_types::{StoreId, StoreKind}; +use re_types_core::reflection::Reflection; use crate::{ blueprint_timeline, command_channel, ApplicationSelectionState, CommandReceiver, CommandSender, @@ -30,7 +31,8 @@ pub struct TestContext { pub recording_config: RecordingConfig, pub blueprint_query: LatestAtQuery, - component_ui_registry: ComponentUiRegistry, + pub component_ui_registry: ComponentUiRegistry, + pub reflection: Reflection, command_sender: CommandSender, command_receiver: CommandReceiver, @@ -51,6 +53,9 @@ impl Default for TestContext { |_ctx, _ui, _ui_layout, _query, _db, _entity_path, _row_id, _component| {}, )); + let reflection = + re_types::reflection::generate_reflection().expect("Failed to generate reflection"); + Self { recording_store, blueprint_store, @@ -59,6 +64,7 @@ impl Default for TestContext { recording_config, blueprint_query, component_ui_registry, + reflection, command_sender, command_receiver, } @@ -95,7 +101,7 @@ impl TestContext { let ctx = ViewerContext { app_options: &Default::default(), cache: &Default::default(), - reflection: &Default::default(), + reflection: &self.reflection, component_ui_registry: &self.component_ui_registry, view_class_registry: &self.view_class_registry, store_context: &store_context, From 649d74ca7a084e6867328451ac5b2d975817ca3e Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 20 Dec 2024 10:00:59 +0100 Subject: [PATCH 08/11] Remove `Chunk::iter_component_arrays` (#8548) This method makes no sense. It's a complete anti-pattern. The whole point of the Chunk level methods is to pay the cost of reflection/downcasting/deserialization once for the whole Chunk, this can never happen with the way this method is defined. I'm not sure what I was thinking back then. I likely wasn't. There is never a good reason to use this. --- crates/store/re_chunk/src/iter.rs | 34 ++-------------- crates/store/re_grpc_client/src/lib.rs | 10 +---- .../src/max_image_dimension_subscriber.rs | 40 +++++++++---------- 3 files changed, 23 insertions(+), 61 deletions(-) diff --git a/crates/store/re_chunk/src/iter.rs b/crates/store/re_chunk/src/iter.rs index c417e814c6ad..4bce90046356 100644 --- a/crates/store/re_chunk/src/iter.rs +++ b/crates/store/re_chunk/src/iter.rs @@ -2,9 +2,9 @@ use std::sync::Arc; use arrow2::{ array::{ - Array as Arrow2Array, BooleanArray as Arrow2BooleanArray, - FixedSizeListArray as Arrow2FixedSizeListArray, ListArray as Arrow2ListArray, - PrimitiveArray as Arrow2PrimitiveArray, Utf8Array as Arrow2Utf8Array, + BooleanArray as Arrow2BooleanArray, FixedSizeListArray as Arrow2FixedSizeListArray, + ListArray as Arrow2ListArray, PrimitiveArray as Arrow2PrimitiveArray, + Utf8Array as Arrow2Utf8Array, }, bitmap::Bitmap as Arrow2Bitmap, Either, @@ -200,27 +200,6 @@ impl Chunk { } } - /// Returns an iterator over the raw arrays of a [`Chunk`], for a given component. - /// - /// See also: - /// * [`Self::iter_primitive`] - /// * [`Self::iter_primitive_array`] - /// * [`Self::iter_primitive_array_list`] - /// * [`Self::iter_string`] - /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component`]. - #[inline] - pub fn iter_component_arrays( - &self, - component_name: &ComponentName, - ) -> impl Iterator> + '_ { - let Some(list_array) = self.get_first_component(component_name) else { - return Either::Left(std::iter::empty()); - }; - - Either::Right(list_array.iter().flatten()) - } - /// Returns an iterator over the raw primitive values of a [`Chunk`], for a given component. /// /// This is a very fast path: the entire column will be downcasted at once, and then every @@ -233,7 +212,6 @@ impl Chunk { /// * [`Self::iter_primitive_array_list`] /// * [`Self::iter_string`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. #[inline] pub fn iter_primitive( @@ -276,7 +254,6 @@ impl Chunk { /// * [`Self::iter_primitive_array_list`] /// * [`Self::iter_string`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. #[inline] pub fn iter_bool( @@ -319,7 +296,6 @@ impl Chunk { /// * [`Self::iter_primitive`] /// * [`Self::iter_string`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. pub fn iter_primitive_array( &self, @@ -381,7 +357,6 @@ impl Chunk { /// * [`Self::iter_primitive_array`] /// * [`Self::iter_string`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. pub fn iter_primitive_array_list( &self, @@ -466,7 +441,6 @@ impl Chunk { /// * [`Self::iter_primitive_array`] /// * [`Self::iter_primitive_array_list`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. pub fn iter_string( &self, @@ -517,7 +491,6 @@ impl Chunk { /// * [`Self::iter_primitive_array`] /// * [`Self::iter_primitive_array_list`] /// * [`Self::iter_string`]. - /// * [`Self::iter_component_arrays`]. /// * [`Self::iter_component`]. pub fn iter_buffer( &self, @@ -740,7 +713,6 @@ impl Chunk { /// * [`Self::iter_primitive_array_list`] /// * [`Self::iter_string`] /// * [`Self::iter_buffer`]. - /// * [`Self::iter_component_arrays`]. #[inline] pub fn iter_component( &self, diff --git a/crates/store/re_grpc_client/src/lib.rs b/crates/store/re_grpc_client/src/lib.rs index 2fe879e632eb..9be46a4b8260 100644 --- a/crates/store/re_grpc_client/src/lib.rs +++ b/crates/store/re_grpc_client/src/lib.rs @@ -480,15 +480,9 @@ async fn stream_catalog_async( )))?; let recording_uri_arrays: Vec> = chunk - .iter_component_arrays(&"id".into()) + .iter_string(&"id".into()) .map(|id| { - let rec_id = id - .as_any() - .downcast_ref::>() - .ok_or(StreamError::ChunkError(re_chunk::ChunkError::Malformed { - reason: format!("id must be a utf8 array: {:?}", tc.schema), - }))? - .value(0); // each component batch is of length 1 i.e. single 'id' value + let rec_id = &id[0]; // each component batch is of length 1 i.e. single 'id' value let recording_uri = format!("rerun://{host}:{port}/recording/{rec_id}"); diff --git a/crates/viewer/re_view_spatial/src/max_image_dimension_subscriber.rs b/crates/viewer/re_view_spatial/src/max_image_dimension_subscriber.rs index 735cba3f50ff..327d24b60db5 100644 --- a/crates/viewer/re_view_spatial/src/max_image_dimension_subscriber.rs +++ b/crates/viewer/re_view_spatial/src/max_image_dimension_subscriber.rs @@ -1,4 +1,3 @@ -use arrow2::array::Array; use nohash_hasher::IntMap; use once_cell::sync::OnceCell; @@ -85,41 +84,38 @@ impl PerStoreChunkSubscriber for MaxImageDimensionsStoreSubscriber { } // Handle `ImageEncoded`, `AssetVideo`… - let blobs = event.diff.chunk.iter_component_arrays(&Blob::name()); - let media_types = event.diff.chunk.iter_component_arrays(&MediaType::name()); + let blobs = event.diff.chunk.iter_buffer(&Blob::name()); + let media_types = event.diff.chunk.iter_string(&MediaType::name()); for (blob, media_type) in itertools::izip!(blobs, media_types.map(Some).chain(std::iter::repeat(None))) { - if let Some([width, height]) = size_from_blob(blob.as_ref(), media_type.as_deref()) - { - let max_dim = self - .max_dimensions - .entry(event.diff.chunk.entity_path().clone()) - .or_default(); - max_dim.width = max_dim.width.max(width); - max_dim.height = max_dim.height.max(height); + if let Some(blob) = blob.first() { + if let Some([width, height]) = size_from_blob( + blob.as_slice(), + media_type.and_then(|v| v.first().map(|v| MediaType(v.clone().into()))), + ) { + let max_dim = self + .max_dimensions + .entry(event.diff.chunk.entity_path().clone()) + .or_default(); + max_dim.width = max_dim.width.max(width); + max_dim.height = max_dim.height.max(height); + } } } } } } -fn size_from_blob(blob: &dyn Array, media_type: Option<&dyn Array>) -> Option<[u32; 2]> { +fn size_from_blob(blob: &[u8], media_type: Option) -> Option<[u32; 2]> { re_tracing::profile_function!(); - let blob = Blob::from_arrow2_opt(blob).ok()?.first()?.clone()?; - - let media_type: Option = media_type - .and_then(|media_type| MediaType::from_arrow2_opt(media_type).ok()) - .and_then(|list| list.first().cloned()) - .flatten(); - - let media_type = MediaType::or_guess_from_data(media_type, &blob)?; + let media_type = MediaType::or_guess_from_data(media_type, blob)?; if media_type.is_image() { re_tracing::profile_scope!("image"); - let image_bytes = blob.0.as_slice(); + let image_bytes = blob; let mut reader = image::ImageReader::new(std::io::Cursor::new(image_bytes)); @@ -137,7 +133,7 @@ fn size_from_blob(blob: &dyn Array, media_type: Option<&dyn Array>) -> Option<[u reader.into_dimensions().ok().map(|size| size.into()) } else if media_type.is_video() { re_tracing::profile_scope!("video"); - re_video::VideoData::load_from_bytes(&blob, &media_type) + re_video::VideoData::load_from_bytes(blob, &media_type) .ok() .map(|video| video.dimensions()) } else { From 8ff83369f84766977f3ef5a5ff2787d28408ddca Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 20 Dec 2024 10:10:13 +0100 Subject: [PATCH 09/11] Move `trait SizeBytes` to new crate `re_byte_size` (#8544) This is so that I can move `fn arrow_ui` (which depend on `SizeBytes`) into `re_ui`, as part of improved testing of it before migrating it to arrow1. And `re_byte_size` sounds nicer than `re_sizes_bytes`. Maybe we should rename the trait to `ByteSize` too. --------- Co-authored-by: Clement Rey --- ARCHITECTURE.md | 3 +- Cargo.lock | 25 +- Cargo.toml | 1 + .../re_types_builder/src/codegen/rust/api.rs | 6 +- crates/store/re_chunk/Cargo.toml | 1 + crates/store/re_chunk/src/batcher.rs | 5 +- crates/store/re_chunk/src/chunk.rs | 8 +- crates/store/re_chunk/src/helpers.rs | 4 +- crates/store/re_chunk/src/id.rs | 4 +- crates/store/re_chunk/src/lib.rs | 1 + crates/store/re_chunk/src/transport.rs | 5 +- crates/store/re_chunk_store/Cargo.toml | 1 + crates/store/re_chunk_store/src/gc.rs | 3 +- crates/store/re_chunk_store/src/stats.rs | 2 +- crates/store/re_chunk_store/src/writes.rs | 2 +- crates/store/re_entity_db/Cargo.toml | 1 + crates/store/re_entity_db/src/entity_db.rs | 2 +- crates/store/re_log_types/Cargo.toml | 1 + .../re_log_types/src/example_components.rs | 3 +- crates/store/re_log_types/src/hash.rs | 2 +- .../re_log_types/src/path/entity_path.rs | 4 +- .../re_log_types/src/resolved_time_range.rs | 2 +- .../store/re_log_types/src/time_point/mod.rs | 2 +- .../re_log_types/src/time_point/time_int.rs | 2 +- .../re_log_types/src/time_point/timeline.rs | 2 +- crates/store/re_query/Cargo.toml | 1 + crates/store/re_query/src/cache.rs | 2 +- crates/store/re_query/src/cache_stats.rs | 2 +- crates/store/re_query/src/latest_at.rs | 3 +- crates/store/re_query/src/range.rs | 3 +- crates/store/re_types/Cargo.toml | 1 + .../src/archetypes/annotation_context.rs | 2 +- .../store/re_types/src/archetypes/arrows2d.rs | 2 +- .../store/re_types/src/archetypes/arrows3d.rs | 2 +- .../store/re_types/src/archetypes/asset3d.rs | 2 +- .../re_types/src/archetypes/asset_video.rs | 2 +- .../re_types/src/archetypes/bar_chart.rs | 2 +- .../store/re_types/src/archetypes/boxes2d.rs | 2 +- .../store/re_types/src/archetypes/boxes3d.rs | 2 +- .../re_types/src/archetypes/capsules3d.rs | 2 +- .../re_types/src/archetypes/depth_image.rs | 2 +- .../src/archetypes/disconnected_space.rs | 2 +- .../re_types/src/archetypes/ellipsoids3d.rs | 2 +- .../re_types/src/archetypes/encoded_image.rs | 2 +- .../src/archetypes/geo_line_strings.rs | 2 +- .../re_types/src/archetypes/geo_points.rs | 2 +- .../re_types/src/archetypes/graph_edges.rs | 2 +- .../re_types/src/archetypes/graph_nodes.rs | 2 +- crates/store/re_types/src/archetypes/image.rs | 2 +- .../src/archetypes/instance_poses3d.rs | 2 +- .../re_types/src/archetypes/line_strips2d.rs | 2 +- .../re_types/src/archetypes/line_strips3d.rs | 2 +- .../store/re_types/src/archetypes/mesh3d.rs | 2 +- .../store/re_types/src/archetypes/pinhole.rs | 2 +- .../store/re_types/src/archetypes/points2d.rs | 2 +- .../store/re_types/src/archetypes/points3d.rs | 2 +- .../store/re_types/src/archetypes/scalar.rs | 2 +- .../src/archetypes/segmentation_image.rs | 2 +- .../re_types/src/archetypes/series_line.rs | 2 +- .../re_types/src/archetypes/series_point.rs | 2 +- .../store/re_types/src/archetypes/tensor.rs | 2 +- .../re_types/src/archetypes/text_document.rs | 2 +- .../store/re_types/src/archetypes/text_log.rs | 2 +- .../re_types/src/archetypes/transform3d.rs | 2 +- .../src/archetypes/video_frame_reference.rs | 2 +- .../src/archetypes/view_coordinates.rs | 2 +- .../src/blueprint/archetypes/background.rs | 2 +- .../archetypes/container_blueprint.rs | 2 +- .../blueprint/archetypes/dataframe_query.rs | 2 +- .../src/blueprint/archetypes/force_center.rs | 2 +- .../archetypes/force_collision_radius.rs | 2 +- .../src/blueprint/archetypes/force_link.rs | 2 +- .../blueprint/archetypes/force_many_body.rs | 2 +- .../blueprint/archetypes/force_position.rs | 2 +- .../src/blueprint/archetypes/line_grid3d.rs | 2 +- .../blueprint/archetypes/map_background.rs | 2 +- .../src/blueprint/archetypes/map_zoom.rs | 2 +- .../blueprint/archetypes/near_clip_plane.rs | 2 +- .../blueprint/archetypes/panel_blueprint.rs | 2 +- .../src/blueprint/archetypes/plot_legend.rs | 2 +- .../src/blueprint/archetypes/scalar_axis.rs | 2 +- .../archetypes/tensor_scalar_mapping.rs | 2 +- .../archetypes/tensor_slice_selection.rs | 2 +- .../blueprint/archetypes/tensor_view_fit.rs | 2 +- .../blueprint/archetypes/view_blueprint.rs | 2 +- .../src/blueprint/archetypes/view_contents.rs | 2 +- .../archetypes/viewport_blueprint.rs | 2 +- .../archetypes/visible_time_ranges.rs | 2 +- .../blueprint/archetypes/visual_bounds2d.rs | 2 +- .../src/blueprint/components/active_tab.rs | 2 +- .../blueprint/components/apply_latest_at.rs | 2 +- .../src/blueprint/components/auto_layout.rs | 2 +- .../src/blueprint/components/auto_views.rs | 2 +- .../blueprint/components/background_kind.rs | 2 +- .../src/blueprint/components/column_share.rs | 2 +- .../components/component_column_selector.rs | 2 +- .../blueprint/components/container_kind.rs | 2 +- .../src/blueprint/components/corner2d.rs | 2 +- .../src/blueprint/components/enabled.rs | 2 +- .../blueprint/components/filter_by_range.rs | 2 +- .../components/filter_is_not_null.rs | 2 +- .../blueprint/components/force_distance.rs | 2 +- .../blueprint/components/force_iterations.rs | 2 +- .../blueprint/components/force_strength.rs | 2 +- .../src/blueprint/components/grid_columns.rs | 2 +- .../src/blueprint/components/grid_spacing.rs | 2 +- .../blueprint/components/included_content.rs | 2 +- .../src/blueprint/components/interactive.rs | 2 +- .../components/lock_range_during_zoom.rs | 2 +- .../src/blueprint/components/map_provider.rs | 2 +- .../blueprint/components/near_clip_plane.rs | 2 +- .../src/blueprint/components/panel_state.rs | 2 +- .../blueprint/components/query_expression.rs | 2 +- .../blueprint/components/root_container.rs | 2 +- .../src/blueprint/components/row_share.rs | 2 +- .../blueprint/components/selected_columns.rs | 2 +- .../tensor_dimension_index_slider.rs | 2 +- .../src/blueprint/components/timeline_name.rs | 2 +- .../src/blueprint/components/view_class.rs | 2 +- .../src/blueprint/components/view_fit.rs | 2 +- .../blueprint/components/view_maximized.rs | 2 +- .../src/blueprint/components/view_origin.rs | 2 +- .../components/viewer_recommendation_hash.rs | 2 +- .../src/blueprint/components/visible.rs | 2 +- .../components/visible_time_range.rs | 2 +- .../blueprint/components/visual_bounds2d.rs | 2 +- .../components/visualizer_overrides.rs | 2 +- .../src/blueprint/components/zoom_level.rs | 2 +- .../datatypes/component_column_selector.rs | 2 +- .../blueprint/datatypes/filter_by_range.rs | 2 +- .../blueprint/datatypes/filter_is_not_null.rs | 2 +- .../blueprint/datatypes/selected_columns.rs | 2 +- .../tensor_dimension_index_slider.rs | 2 +- .../src/blueprint/datatypes/utf8list.rs | 2 +- .../src/blueprint/views/bar_chart_view.rs | 2 +- .../src/blueprint/views/dataframe_view.rs | 2 +- .../src/blueprint/views/graph_view.rs | 2 +- .../re_types/src/blueprint/views/map_view.rs | 2 +- .../src/blueprint/views/spatial2d_view.rs | 2 +- .../src/blueprint/views/spatial3d_view.rs | 2 +- .../src/blueprint/views/tensor_view.rs | 2 +- .../src/blueprint/views/text_document_view.rs | 2 +- .../src/blueprint/views/text_log_view.rs | 2 +- .../src/blueprint/views/time_series_view.rs | 2 +- .../src/components/aggregation_policy.rs | 2 +- .../re_types/src/components/albedo_factor.rs | 2 +- .../src/components/annotation_context.rs | 2 +- .../re_types/src/components/axis_length.rs | 2 +- crates/store/re_types/src/components/blob.rs | 2 +- .../store/re_types/src/components/class_id.rs | 2 +- crates/store/re_types/src/components/color.rs | 2 +- .../store/re_types/src/components/colormap.rs | 2 +- .../re_types/src/components/depth_meter.rs | 2 +- .../src/components/disconnected_space.rs | 2 +- .../re_types/src/components/draw_order.rs | 2 +- .../re_types/src/components/entity_path.rs | 2 +- .../re_types/src/components/fill_mode.rs | 2 +- .../re_types/src/components/fill_ratio.rs | 2 +- .../src/components/gamma_correction.rs | 2 +- .../src/components/geo_line_string.rs | 2 +- .../re_types/src/components/graph_edge.rs | 2 +- .../re_types/src/components/graph_node.rs | 2 +- .../re_types/src/components/graph_type.rs | 2 +- .../re_types/src/components/half_size2d.rs | 2 +- .../re_types/src/components/half_size3d.rs | 2 +- .../re_types/src/components/image_buffer.rs | 2 +- .../re_types/src/components/image_format.rs | 2 +- .../src/components/image_plane_distance.rs | 2 +- .../re_types/src/components/keypoint_id.rs | 2 +- .../store/re_types/src/components/lat_lon.rs | 2 +- .../store/re_types/src/components/length.rs | 2 +- .../re_types/src/components/line_strip2d.rs | 2 +- .../re_types/src/components/line_strip3d.rs | 2 +- .../src/components/magnification_filter.rs | 2 +- .../re_types/src/components/marker_shape.rs | 2 +- .../re_types/src/components/marker_size.rs | 2 +- .../re_types/src/components/media_type.rs | 2 +- crates/store/re_types/src/components/name.rs | 2 +- .../store/re_types/src/components/opacity.rs | 2 +- .../src/components/pinhole_projection.rs | 2 +- .../store/re_types/src/components/plane3d.rs | 2 +- .../components/pose_rotation_axis_angle.rs | 2 +- .../src/components/pose_rotation_quat.rs | 2 +- .../re_types/src/components/pose_scale3d.rs | 2 +- .../src/components/pose_transform_mat3x3.rs | 2 +- .../src/components/pose_translation3d.rs | 2 +- .../re_types/src/components/position2d.rs | 2 +- .../re_types/src/components/position3d.rs | 2 +- .../store/re_types/src/components/radius.rs | 2 +- .../store/re_types/src/components/range1d.rs | 2 +- .../re_types/src/components/recording_uri.rs | 2 +- .../re_types/src/components/resolution.rs | 2 +- .../src/components/rotation_axis_angle.rs | 2 +- .../re_types/src/components/rotation_quat.rs | 2 +- .../store/re_types/src/components/scalar.rs | 2 +- .../store/re_types/src/components/scale3d.rs | 2 +- .../re_types/src/components/show_labels.rs | 2 +- .../re_types/src/components/stroke_width.rs | 2 +- .../re_types/src/components/tensor_data.rs | 2 +- .../tensor_dimension_index_selection.rs | 2 +- .../src/components/tensor_height_dimension.rs | 2 +- .../src/components/tensor_width_dimension.rs | 2 +- .../re_types/src/components/texcoord2d.rs | 2 +- crates/store/re_types/src/components/text.rs | 2 +- .../re_types/src/components/text_log_level.rs | 2 +- .../src/components/transform_mat3x3.rs | 2 +- .../src/components/transform_relation.rs | 2 +- .../re_types/src/components/translation3d.rs | 2 +- .../src/components/triangle_indices.rs | 2 +- .../re_types/src/components/value_range.rs | 2 +- .../store/re_types/src/components/vector2d.rs | 2 +- .../store/re_types/src/components/vector3d.rs | 2 +- .../src/components/video_timestamp.rs | 2 +- .../src/components/view_coordinates.rs | 2 +- crates/store/re_types/src/datatypes/angle.rs | 2 +- .../re_types/src/datatypes/annotation_info.rs | 2 +- crates/store/re_types/src/datatypes/blob.rs | 2 +- .../src/datatypes/channel_datatype.rs | 2 +- .../src/datatypes/class_description.rs | 2 +- .../datatypes/class_description_map_elem.rs | 2 +- .../store/re_types/src/datatypes/class_id.rs | 2 +- .../re_types/src/datatypes/color_model.rs | 2 +- crates/store/re_types/src/datatypes/dvec2d.rs | 2 +- .../re_types/src/datatypes/image_format.rs | 2 +- .../re_types/src/datatypes/keypoint_id.rs | 2 +- .../re_types/src/datatypes/keypoint_pair.rs | 2 +- crates/store/re_types/src/datatypes/mat3x3.rs | 2 +- crates/store/re_types/src/datatypes/mat4x4.rs | 2 +- .../re_types/src/datatypes/pixel_format.rs | 2 +- .../store/re_types/src/datatypes/plane3d.rs | 2 +- .../re_types/src/datatypes/quaternion.rs | 2 +- .../store/re_types/src/datatypes/range1d.rs | 2 +- .../store/re_types/src/datatypes/range2d.rs | 2 +- crates/store/re_types/src/datatypes/rgba32.rs | 2 +- .../src/datatypes/rotation_axis_angle.rs | 2 +- .../re_types/src/datatypes/tensor_buffer.rs | 2 +- .../re_types/src/datatypes/tensor_data.rs | 2 +- .../tensor_dimension_index_selection.rs | 2 +- .../datatypes/tensor_dimension_selection.rs | 2 +- .../store/re_types/src/datatypes/utf8pair.rs | 2 +- crates/store/re_types/src/datatypes/uuid.rs | 2 +- crates/store/re_types/src/datatypes/uvec2d.rs | 2 +- crates/store/re_types/src/datatypes/uvec3d.rs | 2 +- crates/store/re_types/src/datatypes/uvec4d.rs | 2 +- crates/store/re_types/src/datatypes/vec2d.rs | 2 +- crates/store/re_types/src/datatypes/vec3d.rs | 2 +- crates/store/re_types/src/datatypes/vec4d.rs | 2 +- .../re_types/src/datatypes/video_timestamp.rs | 2 +- .../src/datatypes/view_coordinates.rs | 2 +- .../src/testing/archetypes/affix_fuzzer1.rs | 2 +- .../src/testing/archetypes/affix_fuzzer2.rs | 2 +- .../src/testing/archetypes/affix_fuzzer3.rs | 2 +- .../src/testing/archetypes/affix_fuzzer4.rs | 2 +- .../src/testing/components/affix_fuzzer1.rs | 2 +- .../src/testing/components/affix_fuzzer10.rs | 2 +- .../src/testing/components/affix_fuzzer11.rs | 2 +- .../src/testing/components/affix_fuzzer12.rs | 2 +- .../src/testing/components/affix_fuzzer13.rs | 2 +- .../src/testing/components/affix_fuzzer14.rs | 2 +- .../src/testing/components/affix_fuzzer15.rs | 2 +- .../src/testing/components/affix_fuzzer16.rs | 2 +- .../src/testing/components/affix_fuzzer17.rs | 2 +- .../src/testing/components/affix_fuzzer18.rs | 2 +- .../src/testing/components/affix_fuzzer19.rs | 2 +- .../src/testing/components/affix_fuzzer2.rs | 2 +- .../src/testing/components/affix_fuzzer20.rs | 2 +- .../src/testing/components/affix_fuzzer21.rs | 2 +- .../src/testing/components/affix_fuzzer22.rs | 2 +- .../src/testing/components/affix_fuzzer23.rs | 2 +- .../src/testing/components/affix_fuzzer3.rs | 2 +- .../src/testing/components/affix_fuzzer4.rs | 2 +- .../src/testing/components/affix_fuzzer5.rs | 2 +- .../src/testing/components/affix_fuzzer6.rs | 2 +- .../src/testing/components/affix_fuzzer7.rs | 2 +- .../src/testing/components/affix_fuzzer8.rs | 2 +- .../src/testing/components/affix_fuzzer9.rs | 2 +- .../src/testing/datatypes/affix_fuzzer1.rs | 2 +- .../src/testing/datatypes/affix_fuzzer2.rs | 2 +- .../src/testing/datatypes/affix_fuzzer20.rs | 2 +- .../src/testing/datatypes/affix_fuzzer21.rs | 2 +- .../src/testing/datatypes/affix_fuzzer22.rs | 2 +- .../src/testing/datatypes/affix_fuzzer3.rs | 2 +- .../src/testing/datatypes/affix_fuzzer4.rs | 2 +- .../src/testing/datatypes/affix_fuzzer5.rs | 2 +- .../src/testing/datatypes/enum_test.rs | 2 +- .../src/testing/datatypes/flattened_scalar.rs | 2 +- .../src/testing/datatypes/multi_enum.rs | 2 +- .../testing/datatypes/primitive_component.rs | 2 +- .../src/testing/datatypes/string_component.rs | 2 +- .../src/testing/datatypes/valued_enum.rs | 2 +- crates/store/re_types_core/Cargo.toml | 3 +- crates/store/re_types_core/src/archetype.rs | 4 +- .../re_types_core/src/archetypes/clear.rs | 2 +- .../store/re_types_core/src/arrow_buffer.rs | 3 +- .../store/re_types_core/src/arrow_string.rs | 2 +- .../re_types_core/src/component_descriptor.rs | 4 +- .../src/components/clear_is_recursive.rs | 2 +- .../store/re_types_core/src/datatypes/bool.rs | 2 +- .../src/datatypes/entity_path.rs | 2 +- .../re_types_core/src/datatypes/float32.rs | 2 +- .../re_types_core/src/datatypes/float64.rs | 2 +- .../re_types_core/src/datatypes/time_int.rs | 2 +- .../re_types_core/src/datatypes/time_range.rs | 2 +- .../src/datatypes/time_range_boundary.rs | 2 +- .../re_types_core/src/datatypes/uint16.rs | 2 +- .../re_types_core/src/datatypes/uint32.rs | 2 +- .../re_types_core/src/datatypes/uint64.rs | 2 +- .../store/re_types_core/src/datatypes/utf8.rs | 2 +- .../src/datatypes/visible_time_range.rs | 2 +- crates/store/re_types_core/src/lib.rs | 2 - crates/store/re_types_core/src/loggable.rs | 10 +- .../store/re_types_core/src/size_bytes/mod.rs | 270 ------------------ crates/store/re_types_core/src/tuid.rs | 10 +- crates/top/re_sdk/Cargo.toml | 1 + crates/top/re_sdk/src/lib.rs | 4 +- crates/top/rerun/Cargo.toml | 1 + crates/top/rerun/src/commands/rrd/print.rs | 2 +- crates/utils/re_byte_size/Cargo.toml | 31 ++ crates/utils/re_byte_size/README.md | 10 + .../re_byte_size/src}/arrow2_sizes.rs | 2 + .../re_byte_size/src}/arrow_sizes.rs | 0 crates/utils/re_byte_size/src/lib.rs | 47 +++ .../utils/re_byte_size/src/primitive_sizes.rs | 28 ++ .../utils/re_byte_size/src/smallvec_sizes.rs | 27 ++ crates/utils/re_byte_size/src/std_sizes.rs | 132 +++++++++ crates/utils/re_byte_size/src/tuple_sizes.rs | 55 ++++ crates/utils/re_tuid/src/lib.rs | 10 - crates/viewer/re_chunk_store_ui/Cargo.toml | 1 + .../viewer/re_chunk_store_ui/src/arrow_ui.rs | 2 +- .../viewer/re_chunk_store_ui/src/chunk_ui.rs | 2 +- crates/viewer/re_component_ui/Cargo.toml | 3 +- .../viewer/re_component_ui/src/fallback_ui.rs | 2 +- crates/viewer/re_data_ui/Cargo.toml | 1 + crates/viewer/re_data_ui/src/entity_db.rs | 2 +- crates/viewer/re_data_ui/src/item_ui.rs | 2 +- crates/viewer/re_ui/src/arrow_ui.rs | 79 +++++ examples/rust/extend_viewer_ui/src/main.rs | 5 +- 337 files changed, 787 insertions(+), 620 deletions(-) delete mode 100644 crates/store/re_types_core/src/size_bytes/mod.rs create mode 100644 crates/utils/re_byte_size/Cargo.toml create mode 100644 crates/utils/re_byte_size/README.md rename crates/{store/re_types_core/src/size_bytes => utils/re_byte_size/src}/arrow2_sizes.rs (99%) rename crates/{store/re_types_core/src/size_bytes => utils/re_byte_size/src}/arrow_sizes.rs (100%) create mode 100644 crates/utils/re_byte_size/src/lib.rs create mode 100644 crates/utils/re_byte_size/src/primitive_sizes.rs create mode 100644 crates/utils/re_byte_size/src/smallvec_sizes.rs create mode 100644 crates/utils/re_byte_size/src/std_sizes.rs create mode 100644 crates/utils/re_byte_size/src/tuple_sizes.rs create mode 100644 crates/viewer/re_ui/src/arrow_ui.rs diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index abaa65b1725b..1f07bcdb65ff 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -209,7 +209,8 @@ Update instructions: | Crate | Description | |--------------------|--------------------------------------------------------------------------------------| | re_analytics | Rerun's analytics SDK | -| re_capabilities | Capability tokens | +| re_byte_size | Calculate the heap-allocated size of values at runtime | +| re_capabilities | Capability tokens | | re_case | Case conversions, the way Rerun likes them | | re_crash_handler | Detect panics and signals, logging them and optionally sending them to analytics. | | re_error | Helpers for handling errors. | diff --git a/Cargo.lock b/Cargo.lock index 356aea98c0b7..cc5951d3b51d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5605,6 +5605,17 @@ dependencies = [ "walkdir", ] +[[package]] +name = "re_byte_size" +version = "0.22.0-alpha.1+dev" +dependencies = [ + "arrow", + "half", + "re_arrow2", + "re_tuid", + "smallvec", +] + [[package]] name = "re_capabilities" version = "0.22.0-alpha.1+dev" @@ -5637,6 +5648,7 @@ dependencies = [ "nohash-hasher", "rand", "re_arrow2", + "re_byte_size", "re_error", "re_format", "re_format_arrow", @@ -5667,6 +5679,7 @@ dependencies = [ "parking_lot", "rand", "re_arrow2", + "re_byte_size", "re_chunk", "re_format", "re_log", @@ -5689,6 +5702,7 @@ dependencies = [ "egui", "egui_extras", "itertools 0.13.0", + "re_byte_size", "re_chunk_store", "re_format", "re_log_types", @@ -5708,6 +5722,7 @@ dependencies = [ "egui_plot", "itertools 0.13.0", "nohash-hasher", + "re_byte_size", "re_data_source", "re_data_ui", "re_format", @@ -5814,6 +5829,7 @@ dependencies = [ "image", "itertools 0.13.0", "nohash-hasher", + "re_byte_size", "re_capabilities", "re_chunk_store", "re_entity_db", @@ -5897,6 +5913,7 @@ dependencies = [ "parking_lot", "rand", "re_build_info", + "re_byte_size", "re_chunk", "re_chunk_store", "re_format", @@ -6033,6 +6050,7 @@ dependencies = [ "num-traits", "re_arrow2", "re_build_info", + "re_byte_size", "re_format", "re_log", "re_protos", @@ -6133,6 +6151,7 @@ dependencies = [ "paste", "rand", "re_arrow2", + "re_byte_size", "re_chunk", "re_chunk_store", "re_error", @@ -6264,6 +6283,7 @@ dependencies = [ "re_arrow2", "re_build_info", "re_build_tools", + "re_byte_size", "re_chunk", "re_chunk_store", "re_data_loader", @@ -6428,6 +6448,7 @@ dependencies = [ "rayon", "re_arrow2", "re_build_tools", + "re_byte_size", "re_format", "re_log", "re_log_types", @@ -6484,18 +6505,17 @@ dependencies = [ "bytemuck", "criterion", "document-features", - "half", "itertools 0.13.0", "nohash-hasher", "once_cell", "re_arrow2", + "re_byte_size", "re_case", "re_error", "re_string_interner", "re_tracing", "re_tuid", "serde", - "smallvec", "thiserror 1.0.65", ] @@ -7203,6 +7223,7 @@ dependencies = [ "re_analytics", "re_build_info", "re_build_tools", + "re_byte_size", "re_capabilities", "re_chunk", "re_chunk_store", diff --git a/Cargo.toml b/Cargo.toml index 3b001f0d8032..5079054fede6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,7 @@ re_format = { path = "crates/utils/re_format", version = "=0.22.0-alpha.1", defa re_int_histogram = { path = "crates/utils/re_int_histogram", version = "=0.22.0-alpha.1", default-features = false } re_log = { path = "crates/utils/re_log", version = "=0.22.0-alpha.1", default-features = false } re_memory = { path = "crates/utils/re_memory", version = "=0.22.0-alpha.1", default-features = false } +re_byte_size = { path = "crates/utils/re_byte_size", version = "=0.22.0-alpha.1", default-features = false } re_smart_channel = { path = "crates/utils/re_smart_channel", version = "=0.22.0-alpha.1", default-features = false } re_string_interner = { path = "crates/utils/re_string_interner", version = "=0.22.0-alpha.1", default-features = false } re_tracing = { path = "crates/utils/re_tracing", version = "=0.22.0-alpha.1", default-features = false } diff --git a/crates/build/re_types_builder/src/codegen/rust/api.rs b/crates/build/re_types_builder/src/codegen/rust/api.rs index 058dce7b7a89..3c33171b8068 100644 --- a/crates/build/re_types_builder/src/codegen/rust/api.rs +++ b/crates/build/re_types_builder/src/codegen/rust/api.rs @@ -331,7 +331,7 @@ fn quote_struct( }; quote! { - impl ::re_types_core::SizeBytes for #name { + impl ::re_byte_size::SizeBytes for #name { #[inline] fn heap_size_bytes(&self) -> u64 { #heap_size_bytes_impl @@ -443,7 +443,7 @@ fn quote_union( }; quote! { - impl ::re_types_core::SizeBytes for #name { + impl ::re_byte_size::SizeBytes for #name { #[inline] fn heap_size_bytes(&self) -> u64 { #![allow(clippy::match_same_arms)] @@ -630,7 +630,7 @@ fn quote_enum( } } - impl ::re_types_core::SizeBytes for #name { + impl ::re_byte_size::SizeBytes for #name { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_chunk/Cargo.toml b/crates/store/re_chunk/Cargo.toml index 676a0d1ddbab..90e253be49dc 100644 --- a/crates/store/re_chunk/Cargo.toml +++ b/crates/store/re_chunk/Cargo.toml @@ -37,6 +37,7 @@ arrow = ["arrow2/arrow"] [dependencies] # Rerun +re_byte_size.workspace = true re_error.workspace = true re_format.workspace = true re_format_arrow.workspace = true diff --git a/crates/store/re_chunk/src/batcher.rs b/crates/store/re_chunk/src/batcher.rs index cefbaeed9a42..44a9ffe6be70 100644 --- a/crates/store/re_chunk/src/batcher.rs +++ b/crates/store/re_chunk/src/batcher.rs @@ -8,8 +8,9 @@ use arrow2::array::{Array as Arrow2Array, PrimitiveArray as Arrow2PrimitiveArray use crossbeam::channel::{Receiver, Sender}; use nohash_hasher::IntMap; +use re_byte_size::SizeBytes as _; use re_log_types::{EntityPath, ResolvedTimeRange, TimeInt, TimePoint, Timeline}; -use re_types_core::{ComponentDescriptor, SizeBytes as _}; +use re_types_core::ComponentDescriptor; use crate::{chunk::ChunkComponents, Chunk, ChunkId, ChunkResult, RowId, TimeColumn}; @@ -695,7 +696,7 @@ impl PendingRow { } } -impl re_types_core::SizeBytes for PendingRow { +impl re_byte_size::SizeBytes for PendingRow { #[inline] fn heap_size_bytes(&self) -> u64 { let Self { diff --git a/crates/store/re_chunk/src/chunk.rs b/crates/store/re_chunk/src/chunk.rs index 25ace6e31545..ca2605d97dd4 100644 --- a/crates/store/re_chunk/src/chunk.rs +++ b/crates/store/re_chunk/src/chunk.rs @@ -8,14 +8,14 @@ use arrow2::{ }, Either, }; - use itertools::{izip, Itertools}; use nohash_hasher::IntMap; +use re_byte_size::SizeBytes as _; use re_log_types::{EntityPath, ResolvedTimeRange, Time, TimeInt, TimePoint, Timeline}; use re_types_core::{ ComponentDescriptor, ComponentName, DeserializationError, Loggable, LoggableBatch, - SerializationError, SizeBytes, + SerializationError, }; use crate::{ChunkId, RowId}; @@ -1399,7 +1399,7 @@ impl TimeColumn { } } -impl re_types_core::SizeBytes for Chunk { +impl re_byte_size::SizeBytes for Chunk { #[inline] fn heap_size_bytes(&self) -> u64 { let Self { @@ -1428,7 +1428,7 @@ impl re_types_core::SizeBytes for Chunk { } } -impl re_types_core::SizeBytes for TimeColumn { +impl re_byte_size::SizeBytes for TimeColumn { #[inline] fn heap_size_bytes(&self) -> u64 { let Self { diff --git a/crates/store/re_chunk/src/helpers.rs b/crates/store/re_chunk/src/helpers.rs index 4e1ac8ddaf5b..8045e5af5289 100644 --- a/crates/store/re_chunk/src/helpers.rs +++ b/crates/store/re_chunk/src/helpers.rs @@ -4,7 +4,7 @@ use arrow::array::ArrayRef; use arrow2::array::Array as Arrow2Array; use re_log_types::{TimeInt, Timeline}; -use re_types_core::{Component, ComponentName, SizeBytes}; +use re_types_core::{Component, ComponentName}; use crate::{Chunk, ChunkResult, RowId}; @@ -175,7 +175,7 @@ impl std::ops::Deref for UnitChunkShared { } } -impl SizeBytes for UnitChunkShared { +impl re_byte_size::SizeBytes for UnitChunkShared { #[inline] fn heap_size_bytes(&self) -> u64 { Chunk::heap_size_bytes(&self.0) diff --git a/crates/store/re_chunk/src/id.rs b/crates/store/re_chunk/src/id.rs index 1ac286d4e74e..3fe38ba7eb12 100644 --- a/crates/store/re_chunk/src/id.rs +++ b/crates/store/re_chunk/src/id.rs @@ -86,7 +86,7 @@ impl ChunkId { } } -impl re_types_core::SizeBytes for ChunkId { +impl re_byte_size::SizeBytes for ChunkId { #[inline] fn heap_size_bytes(&self) -> u64 { 0 @@ -223,7 +223,7 @@ impl RowId { } } -impl re_types_core::SizeBytes for RowId { +impl re_byte_size::SizeBytes for RowId { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_chunk/src/lib.rs b/crates/store/re_chunk/src/lib.rs index 564885c20101..9ee2ed555e18 100644 --- a/crates/store/re_chunk/src/lib.rs +++ b/crates/store/re_chunk/src/lib.rs @@ -52,6 +52,7 @@ pub mod external { pub use arrow2; pub use nohash_hasher; + pub use re_byte_size; pub use re_log_types; #[cfg(not(target_arch = "wasm32"))] diff --git a/crates/store/re_chunk/src/transport.rs b/crates/store/re_chunk/src/transport.rs index 874ba3034ff9..c7bf9d52559e 100644 --- a/crates/store/re_chunk/src/transport.rs +++ b/crates/store/re_chunk/src/transport.rs @@ -9,11 +9,12 @@ use arrow2::{ Schema as Arrow2Schema, TimeUnit as ArrowTimeUnit, }, }; - use itertools::Itertools; use nohash_hasher::IntMap; + +use re_byte_size::SizeBytes as _; use re_log_types::{EntityPath, Timeline}; -use re_types_core::{Component as _, ComponentDescriptor, Loggable as _, SizeBytes}; +use re_types_core::{Component as _, ComponentDescriptor, Loggable as _}; use crate::{chunk::ChunkComponents, Chunk, ChunkError, ChunkId, ChunkResult, RowId, TimeColumn}; diff --git a/crates/store/re_chunk_store/Cargo.toml b/crates/store/re_chunk_store/Cargo.toml index dde2529fa031..1929c5c73989 100644 --- a/crates/store/re_chunk_store/Cargo.toml +++ b/crates/store/re_chunk_store/Cargo.toml @@ -27,6 +27,7 @@ deadlock_detection = ["parking_lot/deadlock_detection"] [dependencies] # Rerun dependencies: +re_byte_size.workspace = true re_chunk.workspace = true re_format.workspace = true re_log = { workspace = true, features = ["setup"] } diff --git a/crates/store/re_chunk_store/src/gc.rs b/crates/store/re_chunk_store/src/gc.rs index f6f7612cb27f..72fffcb0868a 100644 --- a/crates/store/re_chunk_store/src/gc.rs +++ b/crates/store/re_chunk_store/src/gc.rs @@ -5,11 +5,12 @@ use std::{ use ahash::{HashMap, HashSet}; use nohash_hasher::IntMap; +use re_byte_size::SizeBytes; use web_time::Instant; use re_chunk::{Chunk, ChunkId}; use re_log_types::{EntityPath, ResolvedTimeRange, TimeInt, Timeline}; -use re_types_core::{ComponentName, SizeBytes}; +use re_types_core::ComponentName; use crate::{ store::ChunkIdSetPerTime, ChunkStore, ChunkStoreChunkStats, ChunkStoreDiff, ChunkStoreDiffKind, diff --git a/crates/store/re_chunk_store/src/stats.rs b/crates/store/re_chunk_store/src/stats.rs index 213d946b9b23..2562ebc7acbc 100644 --- a/crates/store/re_chunk_store/src/stats.rs +++ b/crates/store/re_chunk_store/src/stats.rs @@ -1,7 +1,7 @@ use std::sync::{atomic::Ordering, Arc}; +use re_byte_size::SizeBytes; use re_chunk::{Chunk, ComponentName, EntityPath, Timeline}; -use re_types_core::SizeBytes; use crate::ChunkStore; diff --git a/crates/store/re_chunk_store/src/writes.rs b/crates/store/re_chunk_store/src/writes.rs index 28546832796c..19d14ad72b85 100644 --- a/crates/store/re_chunk_store/src/writes.rs +++ b/crates/store/re_chunk_store/src/writes.rs @@ -4,8 +4,8 @@ use ahash::HashMap; use arrow2::array::{Array as _, ListArray as Arrow2ListArray}; use itertools::Itertools as _; +use re_byte_size::SizeBytes; use re_chunk::{Chunk, EntityPath, RowId}; -use re_types_core::SizeBytes; use crate::{ store::ChunkIdSetPerTime, ChunkStore, ChunkStoreChunkStats, ChunkStoreConfig, ChunkStoreDiff, diff --git a/crates/store/re_entity_db/Cargo.toml b/crates/store/re_entity_db/Cargo.toml index 9b2f6e326543..3cbc5cccaa05 100644 --- a/crates/store/re_entity_db/Cargo.toml +++ b/crates/store/re_entity_db/Cargo.toml @@ -28,6 +28,7 @@ serde = ["dep:serde", "re_log_types/serde"] [dependencies] re_build_info.workspace = true +re_byte_size.workspace = true re_chunk = { workspace = true, features = ["serde"] } re_chunk_store.workspace = true re_format.workspace = true diff --git a/crates/store/re_entity_db/src/entity_db.rs b/crates/store/re_entity_db/src/entity_db.rs index 0d2563d557e5..618332b18d40 100644 --- a/crates/store/re_entity_db/src/entity_db.rs +++ b/crates/store/re_entity_db/src/entity_db.rs @@ -761,7 +761,7 @@ impl EntityDb { } } -impl re_types_core::SizeBytes for EntityDb { +impl re_byte_size::SizeBytes for EntityDb { #[inline] fn heap_size_bytes(&self) -> u64 { // TODO(emilk): size of entire EntityDb, including secondary indices etc diff --git a/crates/store/re_log_types/Cargo.toml b/crates/store/re_log_types/Cargo.toml index 58c67788ff93..8e13bf3a3e12 100644 --- a/crates/store/re_log_types/Cargo.toml +++ b/crates/store/re_log_types/Cargo.toml @@ -43,6 +43,7 @@ serde = [ # Rerun re_build_info.workspace = true +re_byte_size.workspace = true re_format.workspace = true re_log.workspace = true re_protos.workspace = true diff --git a/crates/store/re_log_types/src/example_components.rs b/crates/store/re_log_types/src/example_components.rs index 5ee3df3a3a81..849d88385493 100644 --- a/crates/store/re_log_types/src/example_components.rs +++ b/crates/store/re_log_types/src/example_components.rs @@ -2,7 +2,8 @@ use std::sync::Arc; -use re_types_core::{Component, ComponentDescriptor, DeserializationError, Loggable, SizeBytes}; +use re_byte_size::SizeBytes; +use re_types_core::{Component, ComponentDescriptor, DeserializationError, Loggable}; // ---------------------------------------------------------------------------- diff --git a/crates/store/re_log_types/src/hash.rs b/crates/store/re_log_types/src/hash.rs index 93826b76edee..6920b376f4d1 100644 --- a/crates/store/re_log_types/src/hash.rs +++ b/crates/store/re_log_types/src/hash.rs @@ -7,7 +7,7 @@ #[derive(Copy, Clone, Eq, PartialOrd, Ord)] pub struct Hash64(u64); -impl re_types_core::SizeBytes for Hash64 { +impl re_byte_size::SizeBytes for Hash64 { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_log_types/src/path/entity_path.rs b/crates/store/re_log_types/src/path/entity_path.rs index ea412cf364cf..77d2cdc2a9a3 100644 --- a/crates/store/re_log_types/src/path/entity_path.rs +++ b/crates/store/re_log_types/src/path/entity_path.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use ahash::{HashMap, HashSet}; use itertools::Itertools as _; +use re_byte_size::SizeBytes; use re_string_interner::InternedString; -use re_types_core::SizeBytes; use crate::{hash::Hash64, EntityPathPart}; @@ -14,7 +14,7 @@ use crate::{hash::Hash64, EntityPathPart}; #[derive(Copy, Clone, Eq, PartialOrd, Ord)] pub struct EntityPathHash(Hash64); -impl re_types_core::SizeBytes for EntityPathHash { +impl re_byte_size::SizeBytes for EntityPathHash { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_log_types/src/resolved_time_range.rs b/crates/store/re_log_types/src/resolved_time_range.rs index 5cd8af4a561c..56d8fadcae05 100644 --- a/crates/store/re_log_types/src/resolved_time_range.rs +++ b/crates/store/re_log_types/src/resolved_time_range.rs @@ -125,7 +125,7 @@ impl ResolvedTimeRange { } } -impl re_types_core::SizeBytes for ResolvedTimeRange { +impl re_byte_size::SizeBytes for ResolvedTimeRange { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_log_types/src/time_point/mod.rs b/crates/store/re_log_types/src/time_point/mod.rs index dbb5ea5bda21..696da3d8cc42 100644 --- a/crates/store/re_log_types/src/time_point/mod.rs +++ b/crates/store/re_log_types/src/time_point/mod.rs @@ -98,7 +98,7 @@ impl TimePoint { } } -impl re_types_core::SizeBytes for TimePoint { +impl re_byte_size::SizeBytes for TimePoint { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_log_types/src/time_point/time_int.rs b/crates/store/re_log_types/src/time_point/time_int.rs index 46e73dca4721..807869f74aaf 100644 --- a/crates/store/re_log_types/src/time_point/time_int.rs +++ b/crates/store/re_log_types/src/time_point/time_int.rs @@ -12,7 +12,7 @@ pub struct TimeInt(Option); static_assertions::assert_eq_size!(TimeInt, i64); static_assertions::assert_eq_align!(TimeInt, i64); -impl re_types_core::SizeBytes for TimeInt { +impl re_byte_size::SizeBytes for TimeInt { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_log_types/src/time_point/timeline.rs b/crates/store/re_log_types/src/time_point/timeline.rs index da8f723115d9..d428b23d4176 100644 --- a/crates/store/re_log_types/src/time_point/timeline.rs +++ b/crates/store/re_log_types/src/time_point/timeline.rs @@ -125,7 +125,7 @@ impl Timeline { impl nohash_hasher::IsEnabled for Timeline {} -impl re_types_core::SizeBytes for Timeline { +impl re_byte_size::SizeBytes for Timeline { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_query/Cargo.toml b/crates/store/re_query/Cargo.toml index c99ad2a87247..389d3e749ff5 100644 --- a/crates/store/re_query/Cargo.toml +++ b/crates/store/re_query/Cargo.toml @@ -28,6 +28,7 @@ codegen = [] [dependencies] # Rerun dependencies: +re_byte_size.workspace = true re_chunk.workspace = true re_chunk_store.workspace = true re_error.workspace = true diff --git a/crates/store/re_query/src/cache.rs b/crates/store/re_query/src/cache.rs index a6e7edf16492..44444152524c 100644 --- a/crates/store/re_query/src/cache.rs +++ b/crates/store/re_query/src/cache.rs @@ -26,7 +26,7 @@ pub struct QueryCacheKey { pub component_name: ComponentName, } -impl re_types_core::SizeBytes for QueryCacheKey { +impl re_byte_size::SizeBytes for QueryCacheKey { #[inline] fn heap_size_bytes(&self) -> u64 { let Self { diff --git a/crates/store/re_query/src/cache_stats.rs b/crates/store/re_query/src/cache_stats.rs index 7eb8a96c0daa..e34506a815e4 100644 --- a/crates/store/re_query/src/cache_stats.rs +++ b/crates/store/re_query/src/cache_stats.rs @@ -1,6 +1,6 @@ use std::collections::BTreeMap; -use re_types_core::SizeBytes as _; +use re_byte_size::SizeBytes as _; use crate::{QueryCache, QueryCacheKey}; diff --git a/crates/store/re_query/src/latest_at.rs b/crates/store/re_query/src/latest_at.rs index 2bca910b2d12..eb0afd78425d 100644 --- a/crates/store/re_query/src/latest_at.rs +++ b/crates/store/re_query/src/latest_at.rs @@ -8,12 +8,13 @@ use arrow2::array::Array as Arrow2Array; use nohash_hasher::IntMap; use parking_lot::RwLock; +use re_byte_size::SizeBytes; use re_chunk::{Chunk, RowId, UnitChunkShared}; use re_chunk_store::{ChunkStore, LatestAtQuery, TimeInt}; use re_log_types::EntityPath; use re_types_core::{ components::ClearIsRecursive, external::arrow::array::ArrayRef, Component, ComponentDescriptor, - ComponentName, SizeBytes, + ComponentName, }; use crate::{QueryCache, QueryCacheKey, QueryError}; diff --git a/crates/store/re_query/src/range.rs b/crates/store/re_query/src/range.rs index 6680b61c6d98..2b91f1a3a7f1 100644 --- a/crates/store/re_query/src/range.rs +++ b/crates/store/re_query/src/range.rs @@ -4,10 +4,11 @@ use ahash::HashMap; use nohash_hasher::IntMap; use parking_lot::RwLock; +use re_byte_size::SizeBytes; use re_chunk::{Chunk, ChunkId}; use re_chunk_store::{ChunkStore, RangeQuery, TimeInt}; use re_log_types::{EntityPath, ResolvedTimeRange}; -use re_types_core::{ComponentDescriptor, ComponentName, DeserializationError, SizeBytes}; +use re_types_core::{ComponentDescriptor, ComponentName, DeserializationError}; use crate::{QueryCache, QueryCacheKey}; diff --git a/crates/store/re_types/Cargo.toml b/crates/store/re_types/Cargo.toml index 46a740e3d6b6..b6c2250dcad0 100644 --- a/crates/store/re_types/Cargo.toml +++ b/crates/store/re_types/Cargo.toml @@ -52,6 +52,7 @@ testing = [] [dependencies] # Rerun +re_byte_size.workspace = true re_format.workspace = true re_log.workspace = true re_log_types.workspace = true diff --git a/crates/store/re_types/src/archetypes/annotation_context.rs b/crates/store/re_types/src/archetypes/annotation_context.rs index 8612d3af7624..4f75eb79e6f8 100644 --- a/crates/store/re_types/src/archetypes/annotation_context.rs +++ b/crates/store/re_types/src/archetypes/annotation_context.rs @@ -221,7 +221,7 @@ impl AnnotationContext { } } -impl ::re_types_core::SizeBytes for AnnotationContext { +impl ::re_byte_size::SizeBytes for AnnotationContext { #[inline] fn heap_size_bytes(&self) -> u64 { self.context.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/arrows2d.rs b/crates/store/re_types/src/archetypes/arrows2d.rs index 73d077994f4f..65c1454a13b2 100644 --- a/crates/store/re_types/src/archetypes/arrows2d.rs +++ b/crates/store/re_types/src/archetypes/arrows2d.rs @@ -566,7 +566,7 @@ impl Arrows2D { } } -impl ::re_types_core::SizeBytes for Arrows2D { +impl ::re_byte_size::SizeBytes for Arrows2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.vectors.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/arrows3d.rs b/crates/store/re_types/src/archetypes/arrows3d.rs index a6cd1074b5c3..9f4c648b479d 100644 --- a/crates/store/re_types/src/archetypes/arrows3d.rs +++ b/crates/store/re_types/src/archetypes/arrows3d.rs @@ -532,7 +532,7 @@ impl Arrows3D { } } -impl ::re_types_core::SizeBytes for Arrows3D { +impl ::re_byte_size::SizeBytes for Arrows3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.vectors.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/asset3d.rs b/crates/store/re_types/src/archetypes/asset3d.rs index e1381ac13f03..46de56856857 100644 --- a/crates/store/re_types/src/archetypes/asset3d.rs +++ b/crates/store/re_types/src/archetypes/asset3d.rs @@ -325,7 +325,7 @@ impl Asset3D { } } -impl ::re_types_core::SizeBytes for Asset3D { +impl ::re_byte_size::SizeBytes for Asset3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.blob.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/asset_video.rs b/crates/store/re_types/src/archetypes/asset_video.rs index 6d405894be12..3bc3494f7f82 100644 --- a/crates/store/re_types/src/archetypes/asset_video.rs +++ b/crates/store/re_types/src/archetypes/asset_video.rs @@ -332,7 +332,7 @@ impl AssetVideo { } } -impl ::re_types_core::SizeBytes for AssetVideo { +impl ::re_byte_size::SizeBytes for AssetVideo { #[inline] fn heap_size_bytes(&self) -> u64 { self.blob.heap_size_bytes() + self.media_type.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/bar_chart.rs b/crates/store/re_types/src/archetypes/bar_chart.rs index 8f5e2157db79..a0a72808d8f5 100644 --- a/crates/store/re_types/src/archetypes/bar_chart.rs +++ b/crates/store/re_types/src/archetypes/bar_chart.rs @@ -241,7 +241,7 @@ impl BarChart { } } -impl ::re_types_core::SizeBytes for BarChart { +impl ::re_byte_size::SizeBytes for BarChart { #[inline] fn heap_size_bytes(&self) -> u64 { self.values.heap_size_bytes() + self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/boxes2d.rs b/crates/store/re_types/src/archetypes/boxes2d.rs index e63a42357d97..4af433bf4e84 100644 --- a/crates/store/re_types/src/archetypes/boxes2d.rs +++ b/crates/store/re_types/src/archetypes/boxes2d.rs @@ -556,7 +556,7 @@ impl Boxes2D { } } -impl ::re_types_core::SizeBytes for Boxes2D { +impl ::re_byte_size::SizeBytes for Boxes2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.half_sizes.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/boxes3d.rs b/crates/store/re_types/src/archetypes/boxes3d.rs index f0b2d929212e..b9a3773fdb4f 100644 --- a/crates/store/re_types/src/archetypes/boxes3d.rs +++ b/crates/store/re_types/src/archetypes/boxes3d.rs @@ -689,7 +689,7 @@ impl Boxes3D { } } -impl ::re_types_core::SizeBytes for Boxes3D { +impl ::re_byte_size::SizeBytes for Boxes3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.half_sizes.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/capsules3d.rs b/crates/store/re_types/src/archetypes/capsules3d.rs index 7e5cb90368b7..f35d06ba6b40 100644 --- a/crates/store/re_types/src/archetypes/capsules3d.rs +++ b/crates/store/re_types/src/archetypes/capsules3d.rs @@ -639,7 +639,7 @@ impl Capsules3D { } } -impl ::re_types_core::SizeBytes for Capsules3D { +impl ::re_byte_size::SizeBytes for Capsules3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.lengths.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/depth_image.rs b/crates/store/re_types/src/archetypes/depth_image.rs index fcaa8f20b1b7..9ad9d9e9d341 100644 --- a/crates/store/re_types/src/archetypes/depth_image.rs +++ b/crates/store/re_types/src/archetypes/depth_image.rs @@ -538,7 +538,7 @@ impl DepthImage { } } -impl ::re_types_core::SizeBytes for DepthImage { +impl ::re_byte_size::SizeBytes for DepthImage { #[inline] fn heap_size_bytes(&self) -> u64 { self.buffer.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs index 642694071edc..7fd70ca34985 100644 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ b/crates/store/re_types/src/archetypes/disconnected_space.rs @@ -219,7 +219,7 @@ impl DisconnectedSpace { } } -impl ::re_types_core::SizeBytes for DisconnectedSpace { +impl ::re_byte_size::SizeBytes for DisconnectedSpace { #[inline] fn heap_size_bytes(&self) -> u64 { self.disconnected_space.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/ellipsoids3d.rs b/crates/store/re_types/src/archetypes/ellipsoids3d.rs index 034fbb9f6047..f489375d5c7e 100644 --- a/crates/store/re_types/src/archetypes/ellipsoids3d.rs +++ b/crates/store/re_types/src/archetypes/ellipsoids3d.rs @@ -701,7 +701,7 @@ impl Ellipsoids3D { } } -impl ::re_types_core::SizeBytes for Ellipsoids3D { +impl ::re_byte_size::SizeBytes for Ellipsoids3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.half_sizes.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/encoded_image.rs b/crates/store/re_types/src/archetypes/encoded_image.rs index c415be42a437..3d44789d062a 100644 --- a/crates/store/re_types/src/archetypes/encoded_image.rs +++ b/crates/store/re_types/src/archetypes/encoded_image.rs @@ -350,7 +350,7 @@ impl EncodedImage { } } -impl ::re_types_core::SizeBytes for EncodedImage { +impl ::re_byte_size::SizeBytes for EncodedImage { #[inline] fn heap_size_bytes(&self) -> u64 { self.blob.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/geo_line_strings.rs b/crates/store/re_types/src/archetypes/geo_line_strings.rs index 341616ee2eb3..483d08e56823 100644 --- a/crates/store/re_types/src/archetypes/geo_line_strings.rs +++ b/crates/store/re_types/src/archetypes/geo_line_strings.rs @@ -315,7 +315,7 @@ impl GeoLineStrings { } } -impl ::re_types_core::SizeBytes for GeoLineStrings { +impl ::re_byte_size::SizeBytes for GeoLineStrings { #[inline] fn heap_size_bytes(&self) -> u64 { self.line_strings.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/geo_points.rs b/crates/store/re_types/src/archetypes/geo_points.rs index 1051801f5767..1fab69253378 100644 --- a/crates/store/re_types/src/archetypes/geo_points.rs +++ b/crates/store/re_types/src/archetypes/geo_points.rs @@ -359,7 +359,7 @@ impl GeoPoints { } } -impl ::re_types_core::SizeBytes for GeoPoints { +impl ::re_byte_size::SizeBytes for GeoPoints { #[inline] fn heap_size_bytes(&self) -> u64 { self.positions.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/graph_edges.rs b/crates/store/re_types/src/archetypes/graph_edges.rs index 19fa08c8c526..1da88a3858d7 100644 --- a/crates/store/re_types/src/archetypes/graph_edges.rs +++ b/crates/store/re_types/src/archetypes/graph_edges.rs @@ -250,7 +250,7 @@ impl GraphEdges { } } -impl ::re_types_core::SizeBytes for GraphEdges { +impl ::re_byte_size::SizeBytes for GraphEdges { #[inline] fn heap_size_bytes(&self) -> u64 { self.edges.heap_size_bytes() + self.graph_type.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/graph_nodes.rs b/crates/store/re_types/src/archetypes/graph_nodes.rs index 5931330051f3..57fb6e8deb6d 100644 --- a/crates/store/re_types/src/archetypes/graph_nodes.rs +++ b/crates/store/re_types/src/archetypes/graph_nodes.rs @@ -449,7 +449,7 @@ impl GraphNodes { } } -impl ::re_types_core::SizeBytes for GraphNodes { +impl ::re_byte_size::SizeBytes for GraphNodes { #[inline] fn heap_size_bytes(&self) -> u64 { self.node_ids.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/image.rs b/crates/store/re_types/src/archetypes/image.rs index 523f26001142..e13118acd7bf 100644 --- a/crates/store/re_types/src/archetypes/image.rs +++ b/crates/store/re_types/src/archetypes/image.rs @@ -420,7 +420,7 @@ impl Image { } } -impl ::re_types_core::SizeBytes for Image { +impl ::re_byte_size::SizeBytes for Image { #[inline] fn heap_size_bytes(&self) -> u64 { self.buffer.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/instance_poses3d.rs b/crates/store/re_types/src/archetypes/instance_poses3d.rs index fd99a27f18ea..7467c753a2e0 100644 --- a/crates/store/re_types/src/archetypes/instance_poses3d.rs +++ b/crates/store/re_types/src/archetypes/instance_poses3d.rs @@ -460,7 +460,7 @@ impl InstancePoses3D { } } -impl ::re_types_core::SizeBytes for InstancePoses3D { +impl ::re_byte_size::SizeBytes for InstancePoses3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.translations.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/line_strips2d.rs b/crates/store/re_types/src/archetypes/line_strips2d.rs index 657ffd47d1e3..751634cad3aa 100644 --- a/crates/store/re_types/src/archetypes/line_strips2d.rs +++ b/crates/store/re_types/src/archetypes/line_strips2d.rs @@ -544,7 +544,7 @@ impl LineStrips2D { } } -impl ::re_types_core::SizeBytes for LineStrips2D { +impl ::re_byte_size::SizeBytes for LineStrips2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.strips.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/line_strips3d.rs b/crates/store/re_types/src/archetypes/line_strips3d.rs index 3bca90b8753f..271ba62a3ae1 100644 --- a/crates/store/re_types/src/archetypes/line_strips3d.rs +++ b/crates/store/re_types/src/archetypes/line_strips3d.rs @@ -510,7 +510,7 @@ impl LineStrips3D { } } -impl ::re_types_core::SizeBytes for LineStrips3D { +impl ::re_byte_size::SizeBytes for LineStrips3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.strips.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/mesh3d.rs b/crates/store/re_types/src/archetypes/mesh3d.rs index e4a7d8528a09..b9db13fd2c3b 100644 --- a/crates/store/re_types/src/archetypes/mesh3d.rs +++ b/crates/store/re_types/src/archetypes/mesh3d.rs @@ -670,7 +670,7 @@ impl Mesh3D { } } -impl ::re_types_core::SizeBytes for Mesh3D { +impl ::re_byte_size::SizeBytes for Mesh3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.vertex_positions.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/pinhole.rs b/crates/store/re_types/src/archetypes/pinhole.rs index 23dc3ee1c755..faa547daf0e5 100644 --- a/crates/store/re_types/src/archetypes/pinhole.rs +++ b/crates/store/re_types/src/archetypes/pinhole.rs @@ -452,7 +452,7 @@ impl Pinhole { } } -impl ::re_types_core::SizeBytes for Pinhole { +impl ::re_byte_size::SizeBytes for Pinhole { #[inline] fn heap_size_bytes(&self) -> u64 { self.image_from_camera.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/points2d.rs b/crates/store/re_types/src/archetypes/points2d.rs index 8b8cbf318a53..f9fbf0736ae0 100644 --- a/crates/store/re_types/src/archetypes/points2d.rs +++ b/crates/store/re_types/src/archetypes/points2d.rs @@ -618,7 +618,7 @@ impl Points2D { } } -impl ::re_types_core::SizeBytes for Points2D { +impl ::re_byte_size::SizeBytes for Points2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.positions.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/points3d.rs b/crates/store/re_types/src/archetypes/points3d.rs index 0828e9e0eda4..eb73be1becd2 100644 --- a/crates/store/re_types/src/archetypes/points3d.rs +++ b/crates/store/re_types/src/archetypes/points3d.rs @@ -569,7 +569,7 @@ impl Points3D { } } -impl ::re_types_core::SizeBytes for Points3D { +impl ::re_byte_size::SizeBytes for Points3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.positions.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/scalar.rs b/crates/store/re_types/src/archetypes/scalar.rs index 8bebaac4327a..fc33ed040c89 100644 --- a/crates/store/re_types/src/archetypes/scalar.rs +++ b/crates/store/re_types/src/archetypes/scalar.rs @@ -205,7 +205,7 @@ impl Scalar { } } -impl ::re_types_core::SizeBytes for Scalar { +impl ::re_byte_size::SizeBytes for Scalar { #[inline] fn heap_size_bytes(&self) -> u64 { self.scalar.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/segmentation_image.rs b/crates/store/re_types/src/archetypes/segmentation_image.rs index b26145d93c44..bb708752d312 100644 --- a/crates/store/re_types/src/archetypes/segmentation_image.rs +++ b/crates/store/re_types/src/archetypes/segmentation_image.rs @@ -358,7 +358,7 @@ impl SegmentationImage { } } -impl ::re_types_core::SizeBytes for SegmentationImage { +impl ::re_byte_size::SizeBytes for SegmentationImage { #[inline] fn heap_size_bytes(&self) -> u64 { self.buffer.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/series_line.rs b/crates/store/re_types/src/archetypes/series_line.rs index 258b7bd9996c..3762871076f2 100644 --- a/crates/store/re_types/src/archetypes/series_line.rs +++ b/crates/store/re_types/src/archetypes/series_line.rs @@ -373,7 +373,7 @@ impl SeriesLine { } } -impl ::re_types_core::SizeBytes for SeriesLine { +impl ::re_byte_size::SizeBytes for SeriesLine { #[inline] fn heap_size_bytes(&self) -> u64 { self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/series_point.rs b/crates/store/re_types/src/archetypes/series_point.rs index b77a9c91b18b..d835e4fde0c6 100644 --- a/crates/store/re_types/src/archetypes/series_point.rs +++ b/crates/store/re_types/src/archetypes/series_point.rs @@ -366,7 +366,7 @@ impl SeriesPoint { } } -impl ::re_types_core::SizeBytes for SeriesPoint { +impl ::re_byte_size::SizeBytes for SeriesPoint { #[inline] fn heap_size_bytes(&self) -> u64 { self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/tensor.rs b/crates/store/re_types/src/archetypes/tensor.rs index 54abbdffd86c..e233b9e422ed 100644 --- a/crates/store/re_types/src/archetypes/tensor.rs +++ b/crates/store/re_types/src/archetypes/tensor.rs @@ -266,7 +266,7 @@ impl Tensor { } } -impl ::re_types_core::SizeBytes for Tensor { +impl ::re_byte_size::SizeBytes for Tensor { #[inline] fn heap_size_bytes(&self) -> u64 { self.data.heap_size_bytes() + self.value_range.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/text_document.rs b/crates/store/re_types/src/archetypes/text_document.rs index 06d506570baf..dec85a289692 100644 --- a/crates/store/re_types/src/archetypes/text_document.rs +++ b/crates/store/re_types/src/archetypes/text_document.rs @@ -294,7 +294,7 @@ impl TextDocument { } } -impl ::re_types_core::SizeBytes for TextDocument { +impl ::re_byte_size::SizeBytes for TextDocument { #[inline] fn heap_size_bytes(&self) -> u64 { self.text.heap_size_bytes() + self.media_type.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/text_log.rs b/crates/store/re_types/src/archetypes/text_log.rs index c23408094261..83283fde7bc3 100644 --- a/crates/store/re_types/src/archetypes/text_log.rs +++ b/crates/store/re_types/src/archetypes/text_log.rs @@ -301,7 +301,7 @@ impl TextLog { } } -impl ::re_types_core::SizeBytes for TextLog { +impl ::re_byte_size::SizeBytes for TextLog { #[inline] fn heap_size_bytes(&self) -> u64 { self.text.heap_size_bytes() + self.level.heap_size_bytes() + self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/transform3d.rs b/crates/store/re_types/src/archetypes/transform3d.rs index 81eeef4990e0..61d162935f9b 100644 --- a/crates/store/re_types/src/archetypes/transform3d.rs +++ b/crates/store/re_types/src/archetypes/transform3d.rs @@ -595,7 +595,7 @@ impl Transform3D { } } -impl ::re_types_core::SizeBytes for Transform3D { +impl ::re_byte_size::SizeBytes for Transform3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.translation.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/video_frame_reference.rs b/crates/store/re_types/src/archetypes/video_frame_reference.rs index e302867c0531..4078de5748b6 100644 --- a/crates/store/re_types/src/archetypes/video_frame_reference.rs +++ b/crates/store/re_types/src/archetypes/video_frame_reference.rs @@ -348,7 +348,7 @@ impl VideoFrameReference { } } -impl ::re_types_core::SizeBytes for VideoFrameReference { +impl ::re_byte_size::SizeBytes for VideoFrameReference { #[inline] fn heap_size_bytes(&self) -> u64 { self.timestamp.heap_size_bytes() + self.video_reference.heap_size_bytes() diff --git a/crates/store/re_types/src/archetypes/view_coordinates.rs b/crates/store/re_types/src/archetypes/view_coordinates.rs index 4007da4f52f6..886809015878 100644 --- a/crates/store/re_types/src/archetypes/view_coordinates.rs +++ b/crates/store/re_types/src/archetypes/view_coordinates.rs @@ -210,7 +210,7 @@ impl ViewCoordinates { } } -impl ::re_types_core::SizeBytes for ViewCoordinates { +impl ::re_byte_size::SizeBytes for ViewCoordinates { #[inline] fn heap_size_bytes(&self) -> u64 { self.xyz.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/background.rs b/crates/store/re_types/src/blueprint/archetypes/background.rs index 0b56c276a7e5..c3121132fd02 100644 --- a/crates/store/re_types/src/blueprint/archetypes/background.rs +++ b/crates/store/re_types/src/blueprint/archetypes/background.rs @@ -214,7 +214,7 @@ impl Background { } } -impl ::re_types_core::SizeBytes for Background { +impl ::re_byte_size::SizeBytes for Background { #[inline] fn heap_size_bytes(&self) -> u64 { self.kind.heap_size_bytes() + self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/container_blueprint.rs b/crates/store/re_types/src/blueprint/archetypes/container_blueprint.rs index 2971a46e1150..7ee586ef0a22 100644 --- a/crates/store/re_types/src/blueprint/archetypes/container_blueprint.rs +++ b/crates/store/re_types/src/blueprint/archetypes/container_blueprint.rs @@ -545,7 +545,7 @@ impl ContainerBlueprint { } } -impl ::re_types_core::SizeBytes for ContainerBlueprint { +impl ::re_byte_size::SizeBytes for ContainerBlueprint { #[inline] fn heap_size_bytes(&self) -> u64 { self.container_kind.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs index 22044c2a31ed..3655711f06d0 100644 --- a/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs +++ b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs @@ -380,7 +380,7 @@ impl DataframeQuery { } } -impl ::re_types_core::SizeBytes for DataframeQuery { +impl ::re_byte_size::SizeBytes for DataframeQuery { #[inline] fn heap_size_bytes(&self) -> u64 { self.timeline.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/force_center.rs b/crates/store/re_types/src/blueprint/archetypes/force_center.rs index 5f12962b42dc..7ef849a0276f 100644 --- a/crates/store/re_types/src/blueprint/archetypes/force_center.rs +++ b/crates/store/re_types/src/blueprint/archetypes/force_center.rs @@ -232,7 +232,7 @@ impl ForceCenter { } } -impl ::re_types_core::SizeBytes for ForceCenter { +impl ::re_byte_size::SizeBytes for ForceCenter { #[inline] fn heap_size_bytes(&self) -> u64 { self.enabled.heap_size_bytes() + self.strength.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/force_collision_radius.rs b/crates/store/re_types/src/blueprint/archetypes/force_collision_radius.rs index 9f4536a2b750..0b96b70eb130 100644 --- a/crates/store/re_types/src/blueprint/archetypes/force_collision_radius.rs +++ b/crates/store/re_types/src/blueprint/archetypes/force_collision_radius.rs @@ -287,7 +287,7 @@ impl ForceCollisionRadius { } } -impl ::re_types_core::SizeBytes for ForceCollisionRadius { +impl ::re_byte_size::SizeBytes for ForceCollisionRadius { #[inline] fn heap_size_bytes(&self) -> u64 { self.enabled.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/force_link.rs b/crates/store/re_types/src/blueprint/archetypes/force_link.rs index f294b0eb9818..48a74c597ec6 100644 --- a/crates/store/re_types/src/blueprint/archetypes/force_link.rs +++ b/crates/store/re_types/src/blueprint/archetypes/force_link.rs @@ -286,7 +286,7 @@ impl ForceLink { } } -impl ::re_types_core::SizeBytes for ForceLink { +impl ::re_byte_size::SizeBytes for ForceLink { #[inline] fn heap_size_bytes(&self) -> u64 { self.enabled.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/force_many_body.rs b/crates/store/re_types/src/blueprint/archetypes/force_many_body.rs index 026e249436d4..8226d87ffa69 100644 --- a/crates/store/re_types/src/blueprint/archetypes/force_many_body.rs +++ b/crates/store/re_types/src/blueprint/archetypes/force_many_body.rs @@ -240,7 +240,7 @@ impl ForceManyBody { } } -impl ::re_types_core::SizeBytes for ForceManyBody { +impl ::re_byte_size::SizeBytes for ForceManyBody { #[inline] fn heap_size_bytes(&self) -> u64 { self.enabled.heap_size_bytes() + self.strength.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/force_position.rs b/crates/store/re_types/src/blueprint/archetypes/force_position.rs index cc74aa2aabf4..e421bd606517 100644 --- a/crates/store/re_types/src/blueprint/archetypes/force_position.rs +++ b/crates/store/re_types/src/blueprint/archetypes/force_position.rs @@ -278,7 +278,7 @@ impl ForcePosition { } } -impl ::re_types_core::SizeBytes for ForcePosition { +impl ::re_byte_size::SizeBytes for ForcePosition { #[inline] fn heap_size_bytes(&self) -> u64 { self.enabled.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/line_grid3d.rs b/crates/store/re_types/src/blueprint/archetypes/line_grid3d.rs index 3442f7edc628..cc23e64147b5 100644 --- a/crates/store/re_types/src/blueprint/archetypes/line_grid3d.rs +++ b/crates/store/re_types/src/blueprint/archetypes/line_grid3d.rs @@ -387,7 +387,7 @@ impl LineGrid3D { } } -impl ::re_types_core::SizeBytes for LineGrid3D { +impl ::re_byte_size::SizeBytes for LineGrid3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.visible.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/map_background.rs b/crates/store/re_types/src/blueprint/archetypes/map_background.rs index 7efeb6d2a687..2630f1fe41ab 100644 --- a/crates/store/re_types/src/blueprint/archetypes/map_background.rs +++ b/crates/store/re_types/src/blueprint/archetypes/map_background.rs @@ -173,7 +173,7 @@ impl MapBackground { } } -impl ::re_types_core::SizeBytes for MapBackground { +impl ::re_byte_size::SizeBytes for MapBackground { #[inline] fn heap_size_bytes(&self) -> u64 { self.provider.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs b/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs index d4f68720d285..166ff7396461 100644 --- a/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs +++ b/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs @@ -171,7 +171,7 @@ impl MapZoom { } } -impl ::re_types_core::SizeBytes for MapZoom { +impl ::re_byte_size::SizeBytes for MapZoom { #[inline] fn heap_size_bytes(&self) -> u64 { self.zoom.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/near_clip_plane.rs b/crates/store/re_types/src/blueprint/archetypes/near_clip_plane.rs index 9714d55ddff1..e96bce6791e9 100644 --- a/crates/store/re_types/src/blueprint/archetypes/near_clip_plane.rs +++ b/crates/store/re_types/src/blueprint/archetypes/near_clip_plane.rs @@ -173,7 +173,7 @@ impl NearClipPlane { } } -impl ::re_types_core::SizeBytes for NearClipPlane { +impl ::re_byte_size::SizeBytes for NearClipPlane { #[inline] fn heap_size_bytes(&self) -> u64 { self.near_clip_plane.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/panel_blueprint.rs b/crates/store/re_types/src/blueprint/archetypes/panel_blueprint.rs index 7f55137e124f..de6b73607062 100644 --- a/crates/store/re_types/src/blueprint/archetypes/panel_blueprint.rs +++ b/crates/store/re_types/src/blueprint/archetypes/panel_blueprint.rs @@ -178,7 +178,7 @@ impl PanelBlueprint { } } -impl ::re_types_core::SizeBytes for PanelBlueprint { +impl ::re_byte_size::SizeBytes for PanelBlueprint { #[inline] fn heap_size_bytes(&self) -> u64 { self.state.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs b/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs index 7c371c5c9a44..680e02c21dbe 100644 --- a/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs +++ b/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs @@ -236,7 +236,7 @@ impl PlotLegend { } } -impl ::re_types_core::SizeBytes for PlotLegend { +impl ::re_byte_size::SizeBytes for PlotLegend { #[inline] fn heap_size_bytes(&self) -> u64 { self.corner.heap_size_bytes() + self.visible.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs b/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs index a6a75ebc6def..d480f60a0fc6 100644 --- a/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs +++ b/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs @@ -229,7 +229,7 @@ impl ScalarAxis { } } -impl ::re_types_core::SizeBytes for ScalarAxis { +impl ::re_byte_size::SizeBytes for ScalarAxis { #[inline] fn heap_size_bytes(&self) -> u64 { self.range.heap_size_bytes() + self.zoom_lock.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs index 0756e3347a66..3a7629ec4f8e 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs @@ -287,7 +287,7 @@ impl TensorScalarMapping { } } -impl ::re_types_core::SizeBytes for TensorScalarMapping { +impl ::re_byte_size::SizeBytes for TensorScalarMapping { #[inline] fn heap_size_bytes(&self) -> u64 { self.mag_filter.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs index 422cd47a38d7..3caf98b15176 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs @@ -356,7 +356,7 @@ impl TensorSliceSelection { } } -impl ::re_types_core::SizeBytes for TensorSliceSelection { +impl ::re_byte_size::SizeBytes for TensorSliceSelection { #[inline] fn heap_size_bytes(&self) -> u64 { self.width.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs index 8e6bbfd0aa10..88a0f5dd7cc9 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs @@ -178,7 +178,7 @@ impl TensorViewFit { } } -impl ::re_types_core::SizeBytes for TensorViewFit { +impl ::re_byte_size::SizeBytes for TensorViewFit { #[inline] fn heap_size_bytes(&self) -> u64 { self.scaling.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/view_blueprint.rs b/crates/store/re_types/src/blueprint/archetypes/view_blueprint.rs index 2cc4714acc07..9fe71e9de559 100644 --- a/crates/store/re_types/src/blueprint/archetypes/view_blueprint.rs +++ b/crates/store/re_types/src/blueprint/archetypes/view_blueprint.rs @@ -329,7 +329,7 @@ impl ViewBlueprint { } } -impl ::re_types_core::SizeBytes for ViewBlueprint { +impl ::re_byte_size::SizeBytes for ViewBlueprint { #[inline] fn heap_size_bytes(&self) -> u64 { self.class_identifier.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/view_contents.rs b/crates/store/re_types/src/blueprint/archetypes/view_contents.rs index a748140632bd..3d7fc75ac6ba 100644 --- a/crates/store/re_types/src/blueprint/archetypes/view_contents.rs +++ b/crates/store/re_types/src/blueprint/archetypes/view_contents.rs @@ -211,7 +211,7 @@ impl ViewContents { } } -impl ::re_types_core::SizeBytes for ViewContents { +impl ::re_byte_size::SizeBytes for ViewContents { #[inline] fn heap_size_bytes(&self) -> u64 { self.query.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/viewport_blueprint.rs b/crates/store/re_types/src/blueprint/archetypes/viewport_blueprint.rs index 5c75fa92e887..b75f3a80a25a 100644 --- a/crates/store/re_types/src/blueprint/archetypes/viewport_blueprint.rs +++ b/crates/store/re_types/src/blueprint/archetypes/viewport_blueprint.rs @@ -412,7 +412,7 @@ impl ViewportBlueprint { } } -impl ::re_types_core::SizeBytes for ViewportBlueprint { +impl ::re_byte_size::SizeBytes for ViewportBlueprint { #[inline] fn heap_size_bytes(&self) -> u64 { self.root_container.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs b/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs index 8056a916b681..4c7ae351c3f3 100644 --- a/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs +++ b/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs @@ -182,7 +182,7 @@ impl VisibleTimeRanges { } } -impl ::re_types_core::SizeBytes for VisibleTimeRanges { +impl ::re_byte_size::SizeBytes for VisibleTimeRanges { #[inline] fn heap_size_bytes(&self) -> u64 { self.ranges.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs b/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs index e409e5dbd94a..44b203026688 100644 --- a/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs +++ b/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs @@ -179,7 +179,7 @@ impl VisualBounds2D { } } -impl ::re_types_core::SizeBytes for VisualBounds2D { +impl ::re_byte_size::SizeBytes for VisualBounds2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.range.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/active_tab.rs b/crates/store/re_types/src/blueprint/components/active_tab.rs index 36b7359658fc..f9dca46d8890 100644 --- a/crates/store/re_types/src/blueprint/components/active_tab.rs +++ b/crates/store/re_types/src/blueprint/components/active_tab.rs @@ -96,7 +96,7 @@ impl std::ops::DerefMut for ActiveTab { } } -impl ::re_types_core::SizeBytes for ActiveTab { +impl ::re_byte_size::SizeBytes for ActiveTab { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/apply_latest_at.rs b/crates/store/re_types/src/blueprint/components/apply_latest_at.rs index faf8dc094e44..ae3aa97c20dd 100644 --- a/crates/store/re_types/src/blueprint/components/apply_latest_at.rs +++ b/crates/store/re_types/src/blueprint/components/apply_latest_at.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for ApplyLatestAt { } } -impl ::re_types_core::SizeBytes for ApplyLatestAt { +impl ::re_byte_size::SizeBytes for ApplyLatestAt { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/auto_layout.rs b/crates/store/re_types/src/blueprint/components/auto_layout.rs index d4087718ebd8..9a4c2c7ee1fd 100644 --- a/crates/store/re_types/src/blueprint/components/auto_layout.rs +++ b/crates/store/re_types/src/blueprint/components/auto_layout.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for AutoLayout { } } -impl ::re_types_core::SizeBytes for AutoLayout { +impl ::re_byte_size::SizeBytes for AutoLayout { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/auto_views.rs b/crates/store/re_types/src/blueprint/components/auto_views.rs index a25155016fc0..cdad353f80ed 100644 --- a/crates/store/re_types/src/blueprint/components/auto_views.rs +++ b/crates/store/re_types/src/blueprint/components/auto_views.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for AutoViews { } } -impl ::re_types_core::SizeBytes for AutoViews { +impl ::re_byte_size::SizeBytes for AutoViews { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/background_kind.rs b/crates/store/re_types/src/blueprint/components/background_kind.rs index 64bad27240f1..8647bc5025f9 100644 --- a/crates/store/re_types/src/blueprint/components/background_kind.rs +++ b/crates/store/re_types/src/blueprint/components/background_kind.rs @@ -157,7 +157,7 @@ impl ::re_types_core::reflection::Enum for BackgroundKind { } } -impl ::re_types_core::SizeBytes for BackgroundKind { +impl ::re_byte_size::SizeBytes for BackgroundKind { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/column_share.rs b/crates/store/re_types/src/blueprint/components/column_share.rs index 635ede9eaadd..433f48f191f6 100644 --- a/crates/store/re_types/src/blueprint/components/column_share.rs +++ b/crates/store/re_types/src/blueprint/components/column_share.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for ColumnShare { } } -impl ::re_types_core::SizeBytes for ColumnShare { +impl ::re_byte_size::SizeBytes for ColumnShare { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/component_column_selector.rs b/crates/store/re_types/src/blueprint/components/component_column_selector.rs index f76bd4be51a5..7e60aeddd873 100644 --- a/crates/store/re_types/src/blueprint/components/component_column_selector.rs +++ b/crates/store/re_types/src/blueprint/components/component_column_selector.rs @@ -98,7 +98,7 @@ impl std::ops::DerefMut for ComponentColumnSelector { } } -impl ::re_types_core::SizeBytes for ComponentColumnSelector { +impl ::re_byte_size::SizeBytes for ComponentColumnSelector { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/container_kind.rs b/crates/store/re_types/src/blueprint/components/container_kind.rs index 4c3c81c027ae..707e2e063821 100644 --- a/crates/store/re_types/src/blueprint/components/container_kind.rs +++ b/crates/store/re_types/src/blueprint/components/container_kind.rs @@ -155,7 +155,7 @@ impl ::re_types_core::reflection::Enum for ContainerKind { } } -impl ::re_types_core::SizeBytes for ContainerKind { +impl ::re_byte_size::SizeBytes for ContainerKind { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/corner2d.rs b/crates/store/re_types/src/blueprint/components/corner2d.rs index 2df6b4e36c59..d559cf480356 100644 --- a/crates/store/re_types/src/blueprint/components/corner2d.rs +++ b/crates/store/re_types/src/blueprint/components/corner2d.rs @@ -160,7 +160,7 @@ impl ::re_types_core::reflection::Enum for Corner2D { } } -impl ::re_types_core::SizeBytes for Corner2D { +impl ::re_byte_size::SizeBytes for Corner2D { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/enabled.rs b/crates/store/re_types/src/blueprint/components/enabled.rs index dc258abb03d2..2f7772fa7908 100644 --- a/crates/store/re_types/src/blueprint/components/enabled.rs +++ b/crates/store/re_types/src/blueprint/components/enabled.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for Enabled { } } -impl ::re_types_core::SizeBytes for Enabled { +impl ::re_byte_size::SizeBytes for Enabled { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/filter_by_range.rs b/crates/store/re_types/src/blueprint/components/filter_by_range.rs index 5b629bb95e69..a4c1977b1b30 100644 --- a/crates/store/re_types/src/blueprint/components/filter_by_range.rs +++ b/crates/store/re_types/src/blueprint/components/filter_by_range.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for FilterByRange { } } -impl ::re_types_core::SizeBytes for FilterByRange { +impl ::re_byte_size::SizeBytes for FilterByRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs b/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs index 5be06c34de17..bde7ecb1291b 100644 --- a/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs +++ b/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for FilterIsNotNull { } } -impl ::re_types_core::SizeBytes for FilterIsNotNull { +impl ::re_byte_size::SizeBytes for FilterIsNotNull { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/force_distance.rs b/crates/store/re_types/src/blueprint/components/force_distance.rs index 8a70ffc068f7..cfb75888a9ef 100644 --- a/crates/store/re_types/src/blueprint/components/force_distance.rs +++ b/crates/store/re_types/src/blueprint/components/force_distance.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for ForceDistance { } } -impl ::re_types_core::SizeBytes for ForceDistance { +impl ::re_byte_size::SizeBytes for ForceDistance { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/force_iterations.rs b/crates/store/re_types/src/blueprint/components/force_iterations.rs index d91a043a615f..8a375a9165c9 100644 --- a/crates/store/re_types/src/blueprint/components/force_iterations.rs +++ b/crates/store/re_types/src/blueprint/components/force_iterations.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for ForceIterations { } } -impl ::re_types_core::SizeBytes for ForceIterations { +impl ::re_byte_size::SizeBytes for ForceIterations { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/force_strength.rs b/crates/store/re_types/src/blueprint/components/force_strength.rs index d1efe60bbb4f..c11e47292980 100644 --- a/crates/store/re_types/src/blueprint/components/force_strength.rs +++ b/crates/store/re_types/src/blueprint/components/force_strength.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for ForceStrength { } } -impl ::re_types_core::SizeBytes for ForceStrength { +impl ::re_byte_size::SizeBytes for ForceStrength { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/grid_columns.rs b/crates/store/re_types/src/blueprint/components/grid_columns.rs index 6ed979d90197..b37e4332386c 100644 --- a/crates/store/re_types/src/blueprint/components/grid_columns.rs +++ b/crates/store/re_types/src/blueprint/components/grid_columns.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for GridColumns { } } -impl ::re_types_core::SizeBytes for GridColumns { +impl ::re_byte_size::SizeBytes for GridColumns { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/grid_spacing.rs b/crates/store/re_types/src/blueprint/components/grid_spacing.rs index 4015a22ff884..51bfe06e86b9 100644 --- a/crates/store/re_types/src/blueprint/components/grid_spacing.rs +++ b/crates/store/re_types/src/blueprint/components/grid_spacing.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for GridSpacing { } } -impl ::re_types_core::SizeBytes for GridSpacing { +impl ::re_byte_size::SizeBytes for GridSpacing { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/included_content.rs b/crates/store/re_types/src/blueprint/components/included_content.rs index 1cadd10724f0..4e0fa4d15323 100644 --- a/crates/store/re_types/src/blueprint/components/included_content.rs +++ b/crates/store/re_types/src/blueprint/components/included_content.rs @@ -97,7 +97,7 @@ impl std::ops::DerefMut for IncludedContent { } } -impl ::re_types_core::SizeBytes for IncludedContent { +impl ::re_byte_size::SizeBytes for IncludedContent { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/interactive.rs b/crates/store/re_types/src/blueprint/components/interactive.rs index 05e3f7ace7f4..2cca04de6896 100644 --- a/crates/store/re_types/src/blueprint/components/interactive.rs +++ b/crates/store/re_types/src/blueprint/components/interactive.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for Interactive { } } -impl ::re_types_core::SizeBytes for Interactive { +impl ::re_byte_size::SizeBytes for Interactive { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs b/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs index db8c730d2c55..4625f150d0a7 100644 --- a/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs +++ b/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for LockRangeDuringZoom { } } -impl ::re_types_core::SizeBytes for LockRangeDuringZoom { +impl ::re_byte_size::SizeBytes for LockRangeDuringZoom { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/map_provider.rs b/crates/store/re_types/src/blueprint/components/map_provider.rs index 7a8e4216ed51..211036fb4bb5 100644 --- a/crates/store/re_types/src/blueprint/components/map_provider.rs +++ b/crates/store/re_types/src/blueprint/components/map_provider.rs @@ -160,7 +160,7 @@ impl ::re_types_core::reflection::Enum for MapProvider { } } -impl ::re_types_core::SizeBytes for MapProvider { +impl ::re_byte_size::SizeBytes for MapProvider { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/near_clip_plane.rs b/crates/store/re_types/src/blueprint/components/near_clip_plane.rs index b9caf19b944d..02b2ae01e317 100644 --- a/crates/store/re_types/src/blueprint/components/near_clip_plane.rs +++ b/crates/store/re_types/src/blueprint/components/near_clip_plane.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for NearClipPlane { } } -impl ::re_types_core::SizeBytes for NearClipPlane { +impl ::re_byte_size::SizeBytes for NearClipPlane { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/panel_state.rs b/crates/store/re_types/src/blueprint/components/panel_state.rs index 5ed60f06fba7..bccf62cf1aaa 100644 --- a/crates/store/re_types/src/blueprint/components/panel_state.rs +++ b/crates/store/re_types/src/blueprint/components/panel_state.rs @@ -149,7 +149,7 @@ impl ::re_types_core::reflection::Enum for PanelState { } } -impl ::re_types_core::SizeBytes for PanelState { +impl ::re_byte_size::SizeBytes for PanelState { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/query_expression.rs b/crates/store/re_types/src/blueprint/components/query_expression.rs index d3684644b5d4..4c0377d5fff9 100644 --- a/crates/store/re_types/src/blueprint/components/query_expression.rs +++ b/crates/store/re_types/src/blueprint/components/query_expression.rs @@ -101,7 +101,7 @@ impl std::ops::DerefMut for QueryExpression { } } -impl ::re_types_core::SizeBytes for QueryExpression { +impl ::re_byte_size::SizeBytes for QueryExpression { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/root_container.rs b/crates/store/re_types/src/blueprint/components/root_container.rs index be4161f2de22..9b96744c0c31 100644 --- a/crates/store/re_types/src/blueprint/components/root_container.rs +++ b/crates/store/re_types/src/blueprint/components/root_container.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for RootContainer { } } -impl ::re_types_core::SizeBytes for RootContainer { +impl ::re_byte_size::SizeBytes for RootContainer { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/row_share.rs b/crates/store/re_types/src/blueprint/components/row_share.rs index 290ee9d7ce58..3e0530bdaae5 100644 --- a/crates/store/re_types/src/blueprint/components/row_share.rs +++ b/crates/store/re_types/src/blueprint/components/row_share.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for RowShare { } } -impl ::re_types_core::SizeBytes for RowShare { +impl ::re_byte_size::SizeBytes for RowShare { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/selected_columns.rs b/crates/store/re_types/src/blueprint/components/selected_columns.rs index 31d6e0754b29..9e86aeec60f8 100644 --- a/crates/store/re_types/src/blueprint/components/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/components/selected_columns.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for SelectedColumns { } } -impl ::re_types_core::SizeBytes for SelectedColumns { +impl ::re_byte_size::SizeBytes for SelectedColumns { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs b/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs index 914bc4e2eca4..f1288446042f 100644 --- a/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs +++ b/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs @@ -98,7 +98,7 @@ impl std::ops::DerefMut for TensorDimensionIndexSlider { } } -impl ::re_types_core::SizeBytes for TensorDimensionIndexSlider { +impl ::re_byte_size::SizeBytes for TensorDimensionIndexSlider { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/timeline_name.rs b/crates/store/re_types/src/blueprint/components/timeline_name.rs index efc7f680c876..d0b8dae59d82 100644 --- a/crates/store/re_types/src/blueprint/components/timeline_name.rs +++ b/crates/store/re_types/src/blueprint/components/timeline_name.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for TimelineName { } } -impl ::re_types_core::SizeBytes for TimelineName { +impl ::re_byte_size::SizeBytes for TimelineName { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/view_class.rs b/crates/store/re_types/src/blueprint/components/view_class.rs index 4496488e546b..9755d95627c1 100644 --- a/crates/store/re_types/src/blueprint/components/view_class.rs +++ b/crates/store/re_types/src/blueprint/components/view_class.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for ViewClass { } } -impl ::re_types_core::SizeBytes for ViewClass { +impl ::re_byte_size::SizeBytes for ViewClass { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/view_fit.rs b/crates/store/re_types/src/blueprint/components/view_fit.rs index 22d7a8288b1f..fe86ad463f5f 100644 --- a/crates/store/re_types/src/blueprint/components/view_fit.rs +++ b/crates/store/re_types/src/blueprint/components/view_fit.rs @@ -155,7 +155,7 @@ impl ::re_types_core::reflection::Enum for ViewFit { } } -impl ::re_types_core::SizeBytes for ViewFit { +impl ::re_byte_size::SizeBytes for ViewFit { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/components/view_maximized.rs b/crates/store/re_types/src/blueprint/components/view_maximized.rs index 013b81cebc55..e99e14e801a2 100644 --- a/crates/store/re_types/src/blueprint/components/view_maximized.rs +++ b/crates/store/re_types/src/blueprint/components/view_maximized.rs @@ -99,7 +99,7 @@ impl std::ops::DerefMut for ViewMaximized { } } -impl ::re_types_core::SizeBytes for ViewMaximized { +impl ::re_byte_size::SizeBytes for ViewMaximized { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/view_origin.rs b/crates/store/re_types/src/blueprint/components/view_origin.rs index 09d16f92615d..ce9d1e0b7862 100644 --- a/crates/store/re_types/src/blueprint/components/view_origin.rs +++ b/crates/store/re_types/src/blueprint/components/view_origin.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for ViewOrigin { } } -impl ::re_types_core::SizeBytes for ViewOrigin { +impl ::re_byte_size::SizeBytes for ViewOrigin { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs b/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs index be679b705c38..ce2dda50dfde 100644 --- a/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs +++ b/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for ViewerRecommendationHash { } } -impl ::re_types_core::SizeBytes for ViewerRecommendationHash { +impl ::re_byte_size::SizeBytes for ViewerRecommendationHash { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/visible.rs b/crates/store/re_types/src/blueprint/components/visible.rs index c4322a8dbd58..c7e8dfd0db70 100644 --- a/crates/store/re_types/src/blueprint/components/visible.rs +++ b/crates/store/re_types/src/blueprint/components/visible.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for Visible { } } -impl ::re_types_core::SizeBytes for Visible { +impl ::re_byte_size::SizeBytes for Visible { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/visible_time_range.rs b/crates/store/re_types/src/blueprint/components/visible_time_range.rs index 4f9685db7677..fa41651de7db 100644 --- a/crates/store/re_types/src/blueprint/components/visible_time_range.rs +++ b/crates/store/re_types/src/blueprint/components/visible_time_range.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for VisibleTimeRange { } } -impl ::re_types_core::SizeBytes for VisibleTimeRange { +impl ::re_byte_size::SizeBytes for VisibleTimeRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs b/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs index fefb606c8f46..45cb993fc93f 100644 --- a/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs +++ b/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs @@ -95,7 +95,7 @@ impl std::ops::DerefMut for VisualBounds2D { } } -impl ::re_types_core::SizeBytes for VisualBounds2D { +impl ::re_byte_size::SizeBytes for VisualBounds2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/visualizer_overrides.rs b/crates/store/re_types/src/blueprint/components/visualizer_overrides.rs index 99b03d0960a2..bc97f1ad55ee 100644 --- a/crates/store/re_types/src/blueprint/components/visualizer_overrides.rs +++ b/crates/store/re_types/src/blueprint/components/visualizer_overrides.rs @@ -104,7 +104,7 @@ impl std::ops::DerefMut for VisualizerOverrides { } } -impl ::re_types_core::SizeBytes for VisualizerOverrides { +impl ::re_byte_size::SizeBytes for VisualizerOverrides { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/components/zoom_level.rs b/crates/store/re_types/src/blueprint/components/zoom_level.rs index f25a6decb5b2..789f7e90de43 100644 --- a/crates/store/re_types/src/blueprint/components/zoom_level.rs +++ b/crates/store/re_types/src/blueprint/components/zoom_level.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for ZoomLevel { } } -impl ::re_types_core::SizeBytes for ZoomLevel { +impl ::re_byte_size::SizeBytes for ZoomLevel { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs b/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs index dd0694d2ab66..8de128154d3a 100644 --- a/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs +++ b/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs @@ -335,7 +335,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { } } -impl ::re_types_core::SizeBytes for ComponentColumnSelector { +impl ::re_byte_size::SizeBytes for ComponentColumnSelector { #[inline] fn heap_size_bytes(&self) -> u64 { self.entity_path.heap_size_bytes() + self.component.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs b/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs index c74756eaa46e..0b6ab64c32cf 100644 --- a/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs +++ b/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs @@ -225,7 +225,7 @@ impl ::re_types_core::Loggable for FilterByRange { } } -impl ::re_types_core::SizeBytes for FilterByRange { +impl ::re_byte_size::SizeBytes for FilterByRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.start.heap_size_bytes() + self.end.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs b/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs index e747cf1e93f3..903ab5ad0b05 100644 --- a/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs +++ b/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs @@ -215,7 +215,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { } } -impl ::re_types_core::SizeBytes for FilterIsNotNull { +impl ::re_byte_size::SizeBytes for FilterIsNotNull { #[inline] fn heap_size_bytes(&self) -> u64 { self.active.heap_size_bytes() + self.column.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs index 4bb0cec1fea9..8b9c8582fc8c 100644 --- a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs @@ -453,7 +453,7 @@ impl ::re_types_core::Loggable for SelectedColumns { } } -impl ::re_types_core::SizeBytes for SelectedColumns { +impl ::re_byte_size::SizeBytes for SelectedColumns { #[inline] fn heap_size_bytes(&self) -> u64 { self.time_columns.heap_size_bytes() + self.component_columns.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs b/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs index fa525e58dee9..dd1a0e7deb4d 100644 --- a/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs +++ b/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs @@ -181,7 +181,7 @@ impl From for u32 { } } -impl ::re_types_core::SizeBytes for TensorDimensionIndexSlider { +impl ::re_byte_size::SizeBytes for TensorDimensionIndexSlider { #[inline] fn heap_size_bytes(&self) -> u64 { self.dimension.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/datatypes/utf8list.rs b/crates/store/re_types/src/blueprint/datatypes/utf8list.rs index 1e1d612b53c2..4415317faa84 100644 --- a/crates/store/re_types/src/blueprint/datatypes/utf8list.rs +++ b/crates/store/re_types/src/blueprint/datatypes/utf8list.rs @@ -216,7 +216,7 @@ impl From for Vec<::re_types_core::ArrowString> { } } -impl ::re_types_core::SizeBytes for Utf8List { +impl ::re_byte_size::SizeBytes for Utf8List { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/bar_chart_view.rs b/crates/store/re_types/src/blueprint/views/bar_chart_view.rs index 6bee621d477e..312358ad3e76 100644 --- a/crates/store/re_types/src/blueprint/views/bar_chart_view.rs +++ b/crates/store/re_types/src/blueprint/views/bar_chart_view.rs @@ -63,7 +63,7 @@ impl std::ops::DerefMut for BarChartView { } } -impl ::re_types_core::SizeBytes for BarChartView { +impl ::re_byte_size::SizeBytes for BarChartView { #[inline] fn heap_size_bytes(&self) -> u64 { self.plot_legend.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/dataframe_view.rs b/crates/store/re_types/src/blueprint/views/dataframe_view.rs index 0c2cb2b288ba..0ea411a270fa 100644 --- a/crates/store/re_types/src/blueprint/views/dataframe_view.rs +++ b/crates/store/re_types/src/blueprint/views/dataframe_view.rs @@ -63,7 +63,7 @@ impl std::ops::DerefMut for DataframeView { } } -impl ::re_types_core::SizeBytes for DataframeView { +impl ::re_byte_size::SizeBytes for DataframeView { #[inline] fn heap_size_bytes(&self) -> u64 { self.query.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/graph_view.rs b/crates/store/re_types/src/blueprint/views/graph_view.rs index 3ff1d79abf64..84a351f5b8fd 100644 --- a/crates/store/re_types/src/blueprint/views/graph_view.rs +++ b/crates/store/re_types/src/blueprint/views/graph_view.rs @@ -49,7 +49,7 @@ impl ::re_types_core::View for GraphView { } } -impl ::re_types_core::SizeBytes for GraphView { +impl ::re_byte_size::SizeBytes for GraphView { #[inline] fn heap_size_bytes(&self) -> u64 { self.visual_bounds.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/map_view.rs b/crates/store/re_types/src/blueprint/views/map_view.rs index 749234094780..26f7a5a0cba1 100644 --- a/crates/store/re_types/src/blueprint/views/map_view.rs +++ b/crates/store/re_types/src/blueprint/views/map_view.rs @@ -35,7 +35,7 @@ impl ::re_types_core::View for MapView { } } -impl ::re_types_core::SizeBytes for MapView { +impl ::re_byte_size::SizeBytes for MapView { #[inline] fn heap_size_bytes(&self) -> u64 { self.zoom.heap_size_bytes() + self.background.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/spatial2d_view.rs b/crates/store/re_types/src/blueprint/views/spatial2d_view.rs index 68dce6e28e47..bf560a2322df 100644 --- a/crates/store/re_types/src/blueprint/views/spatial2d_view.rs +++ b/crates/store/re_types/src/blueprint/views/spatial2d_view.rs @@ -44,7 +44,7 @@ impl ::re_types_core::View for Spatial2DView { } } -impl ::re_types_core::SizeBytes for Spatial2DView { +impl ::re_byte_size::SizeBytes for Spatial2DView { #[inline] fn heap_size_bytes(&self) -> u64 { self.background.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/spatial3d_view.rs b/crates/store/re_types/src/blueprint/views/spatial3d_view.rs index 8f562935cf37..cd0edb0bd8e1 100644 --- a/crates/store/re_types/src/blueprint/views/spatial3d_view.rs +++ b/crates/store/re_types/src/blueprint/views/spatial3d_view.rs @@ -41,7 +41,7 @@ impl ::re_types_core::View for Spatial3DView { } } -impl ::re_types_core::SizeBytes for Spatial3DView { +impl ::re_byte_size::SizeBytes for Spatial3DView { #[inline] fn heap_size_bytes(&self) -> u64 { self.background.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/tensor_view.rs b/crates/store/re_types/src/blueprint/views/tensor_view.rs index efdf00a55232..7b678bd75989 100644 --- a/crates/store/re_types/src/blueprint/views/tensor_view.rs +++ b/crates/store/re_types/src/blueprint/views/tensor_view.rs @@ -38,7 +38,7 @@ impl ::re_types_core::View for TensorView { } } -impl ::re_types_core::SizeBytes for TensorView { +impl ::re_byte_size::SizeBytes for TensorView { #[inline] fn heap_size_bytes(&self) -> u64 { self.slice_selection.heap_size_bytes() diff --git a/crates/store/re_types/src/blueprint/views/text_document_view.rs b/crates/store/re_types/src/blueprint/views/text_document_view.rs index ef82928a58c9..8b15a4287bb0 100644 --- a/crates/store/re_types/src/blueprint/views/text_document_view.rs +++ b/crates/store/re_types/src/blueprint/views/text_document_view.rs @@ -29,7 +29,7 @@ impl ::re_types_core::View for TextDocumentView { } } -impl ::re_types_core::SizeBytes for TextDocumentView { +impl ::re_byte_size::SizeBytes for TextDocumentView { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/views/text_log_view.rs b/crates/store/re_types/src/blueprint/views/text_log_view.rs index 044b5f916b52..8aca0cd7a5af 100644 --- a/crates/store/re_types/src/blueprint/views/text_log_view.rs +++ b/crates/store/re_types/src/blueprint/views/text_log_view.rs @@ -29,7 +29,7 @@ impl ::re_types_core::View for TextLogView { } } -impl ::re_types_core::SizeBytes for TextLogView { +impl ::re_byte_size::SizeBytes for TextLogView { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/blueprint/views/time_series_view.rs b/crates/store/re_types/src/blueprint/views/time_series_view.rs index fc81295ba79e..425be3792500 100644 --- a/crates/store/re_types/src/blueprint/views/time_series_view.rs +++ b/crates/store/re_types/src/blueprint/views/time_series_view.rs @@ -41,7 +41,7 @@ impl ::re_types_core::View for TimeSeriesView { } } -impl ::re_types_core::SizeBytes for TimeSeriesView { +impl ::re_byte_size::SizeBytes for TimeSeriesView { #[inline] fn heap_size_bytes(&self) -> u64 { self.axis_y.heap_size_bytes() diff --git a/crates/store/re_types/src/components/aggregation_policy.rs b/crates/store/re_types/src/components/aggregation_policy.rs index df61f0eea61c..f5f9027fc021 100644 --- a/crates/store/re_types/src/components/aggregation_policy.rs +++ b/crates/store/re_types/src/components/aggregation_policy.rs @@ -184,7 +184,7 @@ impl ::re_types_core::reflection::Enum for AggregationPolicy { } } -impl ::re_types_core::SizeBytes for AggregationPolicy { +impl ::re_byte_size::SizeBytes for AggregationPolicy { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/albedo_factor.rs b/crates/store/re_types/src/components/albedo_factor.rs index 916352c94bd3..12566a78ff1c 100644 --- a/crates/store/re_types/src/components/albedo_factor.rs +++ b/crates/store/re_types/src/components/albedo_factor.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for AlbedoFactor { } } -impl ::re_types_core::SizeBytes for AlbedoFactor { +impl ::re_byte_size::SizeBytes for AlbedoFactor { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/annotation_context.rs b/crates/store/re_types/src/components/annotation_context.rs index c24f64f2d2fd..80db053df701 100644 --- a/crates/store/re_types/src/components/annotation_context.rs +++ b/crates/store/re_types/src/components/annotation_context.rs @@ -179,7 +179,7 @@ impl, T: IntoIterator u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/axis_length.rs b/crates/store/re_types/src/components/axis_length.rs index c9c9b7780f14..5f806721ab4d 100644 --- a/crates/store/re_types/src/components/axis_length.rs +++ b/crates/store/re_types/src/components/axis_length.rs @@ -101,7 +101,7 @@ impl std::ops::DerefMut for AxisLength { } } -impl ::re_types_core::SizeBytes for AxisLength { +impl ::re_byte_size::SizeBytes for AxisLength { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/blob.rs b/crates/store/re_types/src/components/blob.rs index d504c0b61537..7cd2dea43574 100644 --- a/crates/store/re_types/src/components/blob.rs +++ b/crates/store/re_types/src/components/blob.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for Blob { } } -impl ::re_types_core::SizeBytes for Blob { +impl ::re_byte_size::SizeBytes for Blob { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/class_id.rs b/crates/store/re_types/src/components/class_id.rs index 3d566e2b07d7..58d82df85d7d 100644 --- a/crates/store/re_types/src/components/class_id.rs +++ b/crates/store/re_types/src/components/class_id.rs @@ -105,7 +105,7 @@ impl std::ops::DerefMut for ClassId { } } -impl ::re_types_core::SizeBytes for ClassId { +impl ::re_byte_size::SizeBytes for ClassId { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/color.rs b/crates/store/re_types/src/components/color.rs index a7a7c34e5ed9..c1fb73f74545 100644 --- a/crates/store/re_types/src/components/color.rs +++ b/crates/store/re_types/src/components/color.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for Color { } } -impl ::re_types_core::SizeBytes for Color { +impl ::re_byte_size::SizeBytes for Color { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/colormap.rs b/crates/store/re_types/src/components/colormap.rs index fca2eccdf2d5..06be429c0f40 100644 --- a/crates/store/re_types/src/components/colormap.rs +++ b/crates/store/re_types/src/components/colormap.rs @@ -222,7 +222,7 @@ impl ::re_types_core::reflection::Enum for Colormap { } } -impl ::re_types_core::SizeBytes for Colormap { +impl ::re_byte_size::SizeBytes for Colormap { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/depth_meter.rs b/crates/store/re_types/src/components/depth_meter.rs index 45706c7b4932..7a00e812f60a 100644 --- a/crates/store/re_types/src/components/depth_meter.rs +++ b/crates/store/re_types/src/components/depth_meter.rs @@ -107,7 +107,7 @@ impl std::ops::DerefMut for DepthMeter { } } -impl ::re_types_core::SizeBytes for DepthMeter { +impl ::re_byte_size::SizeBytes for DepthMeter { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs index cec09ea9d318..3a688c9c5a67 100644 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ b/crates/store/re_types/src/components/disconnected_space.rs @@ -105,7 +105,7 @@ impl std::ops::DerefMut for DisconnectedSpace { } } -impl ::re_types_core::SizeBytes for DisconnectedSpace { +impl ::re_byte_size::SizeBytes for DisconnectedSpace { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/draw_order.rs b/crates/store/re_types/src/components/draw_order.rs index 3e745d780a41..94a681802812 100644 --- a/crates/store/re_types/src/components/draw_order.rs +++ b/crates/store/re_types/src/components/draw_order.rs @@ -106,7 +106,7 @@ impl std::ops::DerefMut for DrawOrder { } } -impl ::re_types_core::SizeBytes for DrawOrder { +impl ::re_byte_size::SizeBytes for DrawOrder { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/entity_path.rs b/crates/store/re_types/src/components/entity_path.rs index 4c1b63c5fac6..e6a8b3542415 100644 --- a/crates/store/re_types/src/components/entity_path.rs +++ b/crates/store/re_types/src/components/entity_path.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for EntityPath { } } -impl ::re_types_core::SizeBytes for EntityPath { +impl ::re_byte_size::SizeBytes for EntityPath { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/fill_mode.rs b/crates/store/re_types/src/components/fill_mode.rs index 62626d83d9ed..4c04b9d41705 100644 --- a/crates/store/re_types/src/components/fill_mode.rs +++ b/crates/store/re_types/src/components/fill_mode.rs @@ -167,7 +167,7 @@ impl ::re_types_core::reflection::Enum for FillMode { } } -impl ::re_types_core::SizeBytes for FillMode { +impl ::re_byte_size::SizeBytes for FillMode { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/fill_ratio.rs b/crates/store/re_types/src/components/fill_ratio.rs index 00232aacb8be..bce5ddd70c22 100644 --- a/crates/store/re_types/src/components/fill_ratio.rs +++ b/crates/store/re_types/src/components/fill_ratio.rs @@ -105,7 +105,7 @@ impl std::ops::DerefMut for FillRatio { } } -impl ::re_types_core::SizeBytes for FillRatio { +impl ::re_byte_size::SizeBytes for FillRatio { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/gamma_correction.rs b/crates/store/re_types/src/components/gamma_correction.rs index 2237888deb1f..305ea10ef765 100644 --- a/crates/store/re_types/src/components/gamma_correction.rs +++ b/crates/store/re_types/src/components/gamma_correction.rs @@ -106,7 +106,7 @@ impl std::ops::DerefMut for GammaCorrection { } } -impl ::re_types_core::SizeBytes for GammaCorrection { +impl ::re_byte_size::SizeBytes for GammaCorrection { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/geo_line_string.rs b/crates/store/re_types/src/components/geo_line_string.rs index 09348a64d66f..3c3283cc1e21 100644 --- a/crates/store/re_types/src/components/geo_line_string.rs +++ b/crates/store/re_types/src/components/geo_line_string.rs @@ -251,7 +251,7 @@ impl, T: IntoIterator> From for G } } -impl ::re_types_core::SizeBytes for GeoLineString { +impl ::re_byte_size::SizeBytes for GeoLineString { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/graph_edge.rs b/crates/store/re_types/src/components/graph_edge.rs index 2fb1838a1d5f..282bf47a34ee 100644 --- a/crates/store/re_types/src/components/graph_edge.rs +++ b/crates/store/re_types/src/components/graph_edge.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for GraphEdge { } } -impl ::re_types_core::SizeBytes for GraphEdge { +impl ::re_byte_size::SizeBytes for GraphEdge { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/graph_node.rs b/crates/store/re_types/src/components/graph_node.rs index 89480d1e0983..7e3896b7db1b 100644 --- a/crates/store/re_types/src/components/graph_node.rs +++ b/crates/store/re_types/src/components/graph_node.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for GraphNode { } } -impl ::re_types_core::SizeBytes for GraphNode { +impl ::re_byte_size::SizeBytes for GraphNode { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/graph_type.rs b/crates/store/re_types/src/components/graph_type.rs index 6436a08dc0f9..27bee22f474e 100644 --- a/crates/store/re_types/src/components/graph_type.rs +++ b/crates/store/re_types/src/components/graph_type.rs @@ -143,7 +143,7 @@ impl ::re_types_core::reflection::Enum for GraphType { } } -impl ::re_types_core::SizeBytes for GraphType { +impl ::re_byte_size::SizeBytes for GraphType { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/half_size2d.rs b/crates/store/re_types/src/components/half_size2d.rs index 14d5cb88b206..1e664d0e277c 100644 --- a/crates/store/re_types/src/components/half_size2d.rs +++ b/crates/store/re_types/src/components/half_size2d.rs @@ -105,7 +105,7 @@ impl std::ops::DerefMut for HalfSize2D { } } -impl ::re_types_core::SizeBytes for HalfSize2D { +impl ::re_byte_size::SizeBytes for HalfSize2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/half_size3d.rs b/crates/store/re_types/src/components/half_size3d.rs index 998bf7e53ed7..2882097adea8 100644 --- a/crates/store/re_types/src/components/half_size3d.rs +++ b/crates/store/re_types/src/components/half_size3d.rs @@ -105,7 +105,7 @@ impl std::ops::DerefMut for HalfSize3D { } } -impl ::re_types_core::SizeBytes for HalfSize3D { +impl ::re_byte_size::SizeBytes for HalfSize3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/image_buffer.rs b/crates/store/re_types/src/components/image_buffer.rs index 9d1e41bd2f56..fd3c3443ef97 100644 --- a/crates/store/re_types/src/components/image_buffer.rs +++ b/crates/store/re_types/src/components/image_buffer.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for ImageBuffer { } } -impl ::re_types_core::SizeBytes for ImageBuffer { +impl ::re_byte_size::SizeBytes for ImageBuffer { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/image_format.rs b/crates/store/re_types/src/components/image_format.rs index 2d591a3903d9..708502ec38a0 100644 --- a/crates/store/re_types/src/components/image_format.rs +++ b/crates/store/re_types/src/components/image_format.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for ImageFormat { } } -impl ::re_types_core::SizeBytes for ImageFormat { +impl ::re_byte_size::SizeBytes for ImageFormat { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/image_plane_distance.rs b/crates/store/re_types/src/components/image_plane_distance.rs index 0ff93ed36d56..92033f9629a4 100644 --- a/crates/store/re_types/src/components/image_plane_distance.rs +++ b/crates/store/re_types/src/components/image_plane_distance.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for ImagePlaneDistance { } } -impl ::re_types_core::SizeBytes for ImagePlaneDistance { +impl ::re_byte_size::SizeBytes for ImagePlaneDistance { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/keypoint_id.rs b/crates/store/re_types/src/components/keypoint_id.rs index b8d74796b611..96fe828f6511 100644 --- a/crates/store/re_types/src/components/keypoint_id.rs +++ b/crates/store/re_types/src/components/keypoint_id.rs @@ -117,7 +117,7 @@ impl std::ops::DerefMut for KeypointId { } } -impl ::re_types_core::SizeBytes for KeypointId { +impl ::re_byte_size::SizeBytes for KeypointId { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/lat_lon.rs b/crates/store/re_types/src/components/lat_lon.rs index 3368b23b8b5e..f96d9a2c2bd7 100644 --- a/crates/store/re_types/src/components/lat_lon.rs +++ b/crates/store/re_types/src/components/lat_lon.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for LatLon { } } -impl ::re_types_core::SizeBytes for LatLon { +impl ::re_byte_size::SizeBytes for LatLon { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/length.rs b/crates/store/re_types/src/components/length.rs index 5ca84903e046..ebf8e91dea65 100644 --- a/crates/store/re_types/src/components/length.rs +++ b/crates/store/re_types/src/components/length.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for Length { } } -impl ::re_types_core::SizeBytes for Length { +impl ::re_byte_size::SizeBytes for Length { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/line_strip2d.rs b/crates/store/re_types/src/components/line_strip2d.rs index fcac594ffd8e..8b110c7e4a95 100644 --- a/crates/store/re_types/src/components/line_strip2d.rs +++ b/crates/store/re_types/src/components/line_strip2d.rs @@ -260,7 +260,7 @@ impl, T: IntoIterator> From for Li } } -impl ::re_types_core::SizeBytes for LineStrip2D { +impl ::re_byte_size::SizeBytes for LineStrip2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/line_strip3d.rs b/crates/store/re_types/src/components/line_strip3d.rs index 97e579575bc7..202f521e8ca9 100644 --- a/crates/store/re_types/src/components/line_strip3d.rs +++ b/crates/store/re_types/src/components/line_strip3d.rs @@ -260,7 +260,7 @@ impl, T: IntoIterator> From for Li } } -impl ::re_types_core::SizeBytes for LineStrip3D { +impl ::re_byte_size::SizeBytes for LineStrip3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/magnification_filter.rs b/crates/store/re_types/src/components/magnification_filter.rs index ae48e1ac332c..db126ad5f176 100644 --- a/crates/store/re_types/src/components/magnification_filter.rs +++ b/crates/store/re_types/src/components/magnification_filter.rs @@ -152,7 +152,7 @@ impl ::re_types_core::reflection::Enum for MagnificationFilter { } } -impl ::re_types_core::SizeBytes for MagnificationFilter { +impl ::re_byte_size::SizeBytes for MagnificationFilter { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/marker_shape.rs b/crates/store/re_types/src/components/marker_shape.rs index 2a85ca01bf3f..d30468c65085 100644 --- a/crates/store/re_types/src/components/marker_shape.rs +++ b/crates/store/re_types/src/components/marker_shape.rs @@ -202,7 +202,7 @@ impl ::re_types_core::reflection::Enum for MarkerShape { } } -impl ::re_types_core::SizeBytes for MarkerShape { +impl ::re_byte_size::SizeBytes for MarkerShape { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/marker_size.rs b/crates/store/re_types/src/components/marker_size.rs index a426cc42a194..6d35507047a0 100644 --- a/crates/store/re_types/src/components/marker_size.rs +++ b/crates/store/re_types/src/components/marker_size.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for MarkerSize { } } -impl ::re_types_core::SizeBytes for MarkerSize { +impl ::re_byte_size::SizeBytes for MarkerSize { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/media_type.rs b/crates/store/re_types/src/components/media_type.rs index d8fb05969340..06e687390227 100644 --- a/crates/store/re_types/src/components/media_type.rs +++ b/crates/store/re_types/src/components/media_type.rs @@ -95,7 +95,7 @@ impl std::ops::DerefMut for MediaType { } } -impl ::re_types_core::SizeBytes for MediaType { +impl ::re_byte_size::SizeBytes for MediaType { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/name.rs b/crates/store/re_types/src/components/name.rs index c6c0241188a8..d2ea107e7f2c 100644 --- a/crates/store/re_types/src/components/name.rs +++ b/crates/store/re_types/src/components/name.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for Name { } } -impl ::re_types_core::SizeBytes for Name { +impl ::re_byte_size::SizeBytes for Name { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/opacity.rs b/crates/store/re_types/src/components/opacity.rs index 822156726101..e2345b355e56 100644 --- a/crates/store/re_types/src/components/opacity.rs +++ b/crates/store/re_types/src/components/opacity.rs @@ -103,7 +103,7 @@ impl std::ops::DerefMut for Opacity { } } -impl ::re_types_core::SizeBytes for Opacity { +impl ::re_byte_size::SizeBytes for Opacity { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pinhole_projection.rs b/crates/store/re_types/src/components/pinhole_projection.rs index 61e2bb43aa1d..5f987182e76c 100644 --- a/crates/store/re_types/src/components/pinhole_projection.rs +++ b/crates/store/re_types/src/components/pinhole_projection.rs @@ -109,7 +109,7 @@ impl std::ops::DerefMut for PinholeProjection { } } -impl ::re_types_core::SizeBytes for PinholeProjection { +impl ::re_byte_size::SizeBytes for PinholeProjection { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/plane3d.rs b/crates/store/re_types/src/components/plane3d.rs index 3db060645004..8ce5db2f0939 100644 --- a/crates/store/re_types/src/components/plane3d.rs +++ b/crates/store/re_types/src/components/plane3d.rs @@ -108,7 +108,7 @@ impl std::ops::DerefMut for Plane3D { } } -impl ::re_types_core::SizeBytes for Plane3D { +impl ::re_byte_size::SizeBytes for Plane3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs index 3aa09bef378b..0b4d96963497 100644 --- a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for PoseRotationAxisAngle { } } -impl ::re_types_core::SizeBytes for PoseRotationAxisAngle { +impl ::re_byte_size::SizeBytes for PoseRotationAxisAngle { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pose_rotation_quat.rs b/crates/store/re_types/src/components/pose_rotation_quat.rs index 964700df594d..472ad4318ed2 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat.rs @@ -104,7 +104,7 @@ impl std::ops::DerefMut for PoseRotationQuat { } } -impl ::re_types_core::SizeBytes for PoseRotationQuat { +impl ::re_byte_size::SizeBytes for PoseRotationQuat { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pose_scale3d.rs b/crates/store/re_types/src/components/pose_scale3d.rs index 3ef25810010c..63b9d5aefa57 100644 --- a/crates/store/re_types/src/components/pose_scale3d.rs +++ b/crates/store/re_types/src/components/pose_scale3d.rs @@ -104,7 +104,7 @@ impl std::ops::DerefMut for PoseScale3D { } } -impl ::re_types_core::SizeBytes for PoseScale3D { +impl ::re_byte_size::SizeBytes for PoseScale3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pose_transform_mat3x3.rs b/crates/store/re_types/src/components/pose_transform_mat3x3.rs index 2c2f3b9295f8..fb2e7f8dc6f3 100644 --- a/crates/store/re_types/src/components/pose_transform_mat3x3.rs +++ b/crates/store/re_types/src/components/pose_transform_mat3x3.rs @@ -112,7 +112,7 @@ impl std::ops::DerefMut for PoseTransformMat3x3 { } } -impl ::re_types_core::SizeBytes for PoseTransformMat3x3 { +impl ::re_byte_size::SizeBytes for PoseTransformMat3x3 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/pose_translation3d.rs b/crates/store/re_types/src/components/pose_translation3d.rs index efde8a24c595..98a41e42768c 100644 --- a/crates/store/re_types/src/components/pose_translation3d.rs +++ b/crates/store/re_types/src/components/pose_translation3d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for PoseTranslation3D { } } -impl ::re_types_core::SizeBytes for PoseTranslation3D { +impl ::re_byte_size::SizeBytes for PoseTranslation3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/position2d.rs b/crates/store/re_types/src/components/position2d.rs index 94790a01a4f3..901b61bdc089 100644 --- a/crates/store/re_types/src/components/position2d.rs +++ b/crates/store/re_types/src/components/position2d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Position2D { } } -impl ::re_types_core::SizeBytes for Position2D { +impl ::re_byte_size::SizeBytes for Position2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/position3d.rs b/crates/store/re_types/src/components/position3d.rs index 6b89098bfa51..d97127ce4d3e 100644 --- a/crates/store/re_types/src/components/position3d.rs +++ b/crates/store/re_types/src/components/position3d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Position3D { } } -impl ::re_types_core::SizeBytes for Position3D { +impl ::re_byte_size::SizeBytes for Position3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/radius.rs b/crates/store/re_types/src/components/radius.rs index 06b071e198ff..f5b9cee6fbe2 100644 --- a/crates/store/re_types/src/components/radius.rs +++ b/crates/store/re_types/src/components/radius.rs @@ -107,7 +107,7 @@ impl std::ops::DerefMut for Radius { } } -impl ::re_types_core::SizeBytes for Radius { +impl ::re_byte_size::SizeBytes for Radius { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/range1d.rs b/crates/store/re_types/src/components/range1d.rs index 0936cd7685de..8147c35517ce 100644 --- a/crates/store/re_types/src/components/range1d.rs +++ b/crates/store/re_types/src/components/range1d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Range1D { } } -impl ::re_types_core::SizeBytes for Range1D { +impl ::re_byte_size::SizeBytes for Range1D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/recording_uri.rs b/crates/store/re_types/src/components/recording_uri.rs index 4dd097489830..3da69bc2104f 100644 --- a/crates/store/re_types/src/components/recording_uri.rs +++ b/crates/store/re_types/src/components/recording_uri.rs @@ -91,7 +91,7 @@ impl std::ops::DerefMut for RecordingUri { } } -impl ::re_types_core::SizeBytes for RecordingUri { +impl ::re_byte_size::SizeBytes for RecordingUri { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/resolution.rs b/crates/store/re_types/src/components/resolution.rs index 4ac815733c70..9e57bd2c778e 100644 --- a/crates/store/re_types/src/components/resolution.rs +++ b/crates/store/re_types/src/components/resolution.rs @@ -101,7 +101,7 @@ impl std::ops::DerefMut for Resolution { } } -impl ::re_types_core::SizeBytes for Resolution { +impl ::re_byte_size::SizeBytes for Resolution { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/rotation_axis_angle.rs b/crates/store/re_types/src/components/rotation_axis_angle.rs index 21dafdc16441..f5e061f14fd1 100644 --- a/crates/store/re_types/src/components/rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/rotation_axis_angle.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for RotationAxisAngle { } } -impl ::re_types_core::SizeBytes for RotationAxisAngle { +impl ::re_byte_size::SizeBytes for RotationAxisAngle { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/rotation_quat.rs b/crates/store/re_types/src/components/rotation_quat.rs index 0ee536178c0b..de4b197aba42 100644 --- a/crates/store/re_types/src/components/rotation_quat.rs +++ b/crates/store/re_types/src/components/rotation_quat.rs @@ -104,7 +104,7 @@ impl std::ops::DerefMut for RotationQuat { } } -impl ::re_types_core::SizeBytes for RotationQuat { +impl ::re_byte_size::SizeBytes for RotationQuat { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/scalar.rs b/crates/store/re_types/src/components/scalar.rs index 97e1f3e9384e..199dd2184afe 100644 --- a/crates/store/re_types/src/components/scalar.rs +++ b/crates/store/re_types/src/components/scalar.rs @@ -102,7 +102,7 @@ impl std::ops::DerefMut for Scalar { } } -impl ::re_types_core::SizeBytes for Scalar { +impl ::re_byte_size::SizeBytes for Scalar { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/scale3d.rs b/crates/store/re_types/src/components/scale3d.rs index 064c4051c1b5..a85daa64bd8a 100644 --- a/crates/store/re_types/src/components/scale3d.rs +++ b/crates/store/re_types/src/components/scale3d.rs @@ -104,7 +104,7 @@ impl std::ops::DerefMut for Scale3D { } } -impl ::re_types_core::SizeBytes for Scale3D { +impl ::re_byte_size::SizeBytes for Scale3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/show_labels.rs b/crates/store/re_types/src/components/show_labels.rs index 949c39f8967c..483b30d233a6 100644 --- a/crates/store/re_types/src/components/show_labels.rs +++ b/crates/store/re_types/src/components/show_labels.rs @@ -98,7 +98,7 @@ impl std::ops::DerefMut for ShowLabels { } } -impl ::re_types_core::SizeBytes for ShowLabels { +impl ::re_byte_size::SizeBytes for ShowLabels { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/stroke_width.rs b/crates/store/re_types/src/components/stroke_width.rs index 08093d9fab09..ffb236f3828d 100644 --- a/crates/store/re_types/src/components/stroke_width.rs +++ b/crates/store/re_types/src/components/stroke_width.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for StrokeWidth { } } -impl ::re_types_core::SizeBytes for StrokeWidth { +impl ::re_byte_size::SizeBytes for StrokeWidth { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/tensor_data.rs b/crates/store/re_types/src/components/tensor_data.rs index 63d7604643e6..e53747d26b4e 100644 --- a/crates/store/re_types/src/components/tensor_data.rs +++ b/crates/store/re_types/src/components/tensor_data.rs @@ -99,7 +99,7 @@ impl std::ops::DerefMut for TensorData { } } -impl ::re_types_core::SizeBytes for TensorData { +impl ::re_byte_size::SizeBytes for TensorData { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/tensor_dimension_index_selection.rs b/crates/store/re_types/src/components/tensor_dimension_index_selection.rs index 6efd104a5685..dcd249d2f180 100644 --- a/crates/store/re_types/src/components/tensor_dimension_index_selection.rs +++ b/crates/store/re_types/src/components/tensor_dimension_index_selection.rs @@ -98,7 +98,7 @@ impl std::ops::DerefMut for TensorDimensionIndexSelection { } } -impl ::re_types_core::SizeBytes for TensorDimensionIndexSelection { +impl ::re_byte_size::SizeBytes for TensorDimensionIndexSelection { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/tensor_height_dimension.rs b/crates/store/re_types/src/components/tensor_height_dimension.rs index e6d43551fb98..389db3841d7b 100644 --- a/crates/store/re_types/src/components/tensor_height_dimension.rs +++ b/crates/store/re_types/src/components/tensor_height_dimension.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for TensorHeightDimension { } } -impl ::re_types_core::SizeBytes for TensorHeightDimension { +impl ::re_byte_size::SizeBytes for TensorHeightDimension { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/tensor_width_dimension.rs b/crates/store/re_types/src/components/tensor_width_dimension.rs index 1731d8d77924..ecf58d7f135b 100644 --- a/crates/store/re_types/src/components/tensor_width_dimension.rs +++ b/crates/store/re_types/src/components/tensor_width_dimension.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for TensorWidthDimension { } } -impl ::re_types_core::SizeBytes for TensorWidthDimension { +impl ::re_byte_size::SizeBytes for TensorWidthDimension { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/texcoord2d.rs b/crates/store/re_types/src/components/texcoord2d.rs index ff48187042d3..499430d3a922 100644 --- a/crates/store/re_types/src/components/texcoord2d.rs +++ b/crates/store/re_types/src/components/texcoord2d.rs @@ -115,7 +115,7 @@ impl std::ops::DerefMut for Texcoord2D { } } -impl ::re_types_core::SizeBytes for Texcoord2D { +impl ::re_byte_size::SizeBytes for Texcoord2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/text.rs b/crates/store/re_types/src/components/text.rs index eba8cd4c5525..fb0fab1fcc7e 100644 --- a/crates/store/re_types/src/components/text.rs +++ b/crates/store/re_types/src/components/text.rs @@ -92,7 +92,7 @@ impl std::ops::DerefMut for Text { } } -impl ::re_types_core::SizeBytes for Text { +impl ::re_byte_size::SizeBytes for Text { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/text_log_level.rs b/crates/store/re_types/src/components/text_log_level.rs index 991a59b9bb7c..b91cb78d5169 100644 --- a/crates/store/re_types/src/components/text_log_level.rs +++ b/crates/store/re_types/src/components/text_log_level.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for TextLogLevel { } } -impl ::re_types_core::SizeBytes for TextLogLevel { +impl ::re_byte_size::SizeBytes for TextLogLevel { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/transform_mat3x3.rs b/crates/store/re_types/src/components/transform_mat3x3.rs index fc9671de6afc..b6559ba91912 100644 --- a/crates/store/re_types/src/components/transform_mat3x3.rs +++ b/crates/store/re_types/src/components/transform_mat3x3.rs @@ -112,7 +112,7 @@ impl std::ops::DerefMut for TransformMat3x3 { } } -impl ::re_types_core::SizeBytes for TransformMat3x3 { +impl ::re_byte_size::SizeBytes for TransformMat3x3 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/transform_relation.rs b/crates/store/re_types/src/components/transform_relation.rs index 4fcd383ef19d..36f678577e28 100644 --- a/crates/store/re_types/src/components/transform_relation.rs +++ b/crates/store/re_types/src/components/transform_relation.rs @@ -155,7 +155,7 @@ impl ::re_types_core::reflection::Enum for TransformRelation { } } -impl ::re_types_core::SizeBytes for TransformRelation { +impl ::re_byte_size::SizeBytes for TransformRelation { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/components/translation3d.rs b/crates/store/re_types/src/components/translation3d.rs index d7875c9c1724..b7325e859d8f 100644 --- a/crates/store/re_types/src/components/translation3d.rs +++ b/crates/store/re_types/src/components/translation3d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Translation3D { } } -impl ::re_types_core::SizeBytes for Translation3D { +impl ::re_byte_size::SizeBytes for Translation3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/triangle_indices.rs b/crates/store/re_types/src/components/triangle_indices.rs index 1fb197e8c6c0..cc752a9cbc76 100644 --- a/crates/store/re_types/src/components/triangle_indices.rs +++ b/crates/store/re_types/src/components/triangle_indices.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for TriangleIndices { } } -impl ::re_types_core::SizeBytes for TriangleIndices { +impl ::re_byte_size::SizeBytes for TriangleIndices { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/value_range.rs b/crates/store/re_types/src/components/value_range.rs index 9bcd6f464a69..1a7aa1933fd3 100644 --- a/crates/store/re_types/src/components/value_range.rs +++ b/crates/store/re_types/src/components/value_range.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for ValueRange { } } -impl ::re_types_core::SizeBytes for ValueRange { +impl ::re_byte_size::SizeBytes for ValueRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/vector2d.rs b/crates/store/re_types/src/components/vector2d.rs index cdefaf8cc172..26995d32da3d 100644 --- a/crates/store/re_types/src/components/vector2d.rs +++ b/crates/store/re_types/src/components/vector2d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Vector2D { } } -impl ::re_types_core::SizeBytes for Vector2D { +impl ::re_byte_size::SizeBytes for Vector2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/vector3d.rs b/crates/store/re_types/src/components/vector3d.rs index be25aefef481..ea69fe11b9f3 100644 --- a/crates/store/re_types/src/components/vector3d.rs +++ b/crates/store/re_types/src/components/vector3d.rs @@ -100,7 +100,7 @@ impl std::ops::DerefMut for Vector3D { } } -impl ::re_types_core::SizeBytes for Vector3D { +impl ::re_byte_size::SizeBytes for Vector3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/video_timestamp.rs b/crates/store/re_types/src/components/video_timestamp.rs index 4cfdc64bf217..71cb109d9775 100644 --- a/crates/store/re_types/src/components/video_timestamp.rs +++ b/crates/store/re_types/src/components/video_timestamp.rs @@ -101,7 +101,7 @@ impl std::ops::DerefMut for VideoTimestamp { } } -impl ::re_types_core::SizeBytes for VideoTimestamp { +impl ::re_byte_size::SizeBytes for VideoTimestamp { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/components/view_coordinates.rs b/crates/store/re_types/src/components/view_coordinates.rs index dd66f8d5f498..d9223f3eddc2 100644 --- a/crates/store/re_types/src/components/view_coordinates.rs +++ b/crates/store/re_types/src/components/view_coordinates.rs @@ -120,7 +120,7 @@ impl std::ops::DerefMut for ViewCoordinates { } } -impl ::re_types_core::SizeBytes for ViewCoordinates { +impl ::re_byte_size::SizeBytes for ViewCoordinates { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/angle.rs b/crates/store/re_types/src/datatypes/angle.rs index b74b624fb9f9..f734b63d6bd5 100644 --- a/crates/store/re_types/src/datatypes/angle.rs +++ b/crates/store/re_types/src/datatypes/angle.rs @@ -150,7 +150,7 @@ impl From for f32 { } } -impl ::re_types_core::SizeBytes for Angle { +impl ::re_byte_size::SizeBytes for Angle { #[inline] fn heap_size_bytes(&self) -> u64 { self.radians.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/annotation_info.rs b/crates/store/re_types/src/datatypes/annotation_info.rs index 2c40d6bf2938..d9355f461a9d 100644 --- a/crates/store/re_types/src/datatypes/annotation_info.rs +++ b/crates/store/re_types/src/datatypes/annotation_info.rs @@ -310,7 +310,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { } } -impl ::re_types_core::SizeBytes for AnnotationInfo { +impl ::re_byte_size::SizeBytes for AnnotationInfo { #[inline] fn heap_size_bytes(&self) -> u64 { self.id.heap_size_bytes() + self.label.heap_size_bytes() + self.color.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/blob.rs b/crates/store/re_types/src/datatypes/blob.rs index 06e08627da94..c20d338e68c4 100644 --- a/crates/store/re_types/src/datatypes/blob.rs +++ b/crates/store/re_types/src/datatypes/blob.rs @@ -178,7 +178,7 @@ impl From for ::re_types_core::ArrowBuffer { } } -impl ::re_types_core::SizeBytes for Blob { +impl ::re_byte_size::SizeBytes for Blob { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/channel_datatype.rs b/crates/store/re_types/src/datatypes/channel_datatype.rs index 0dc6a7829caf..207871944166 100644 --- a/crates/store/re_types/src/datatypes/channel_datatype.rs +++ b/crates/store/re_types/src/datatypes/channel_datatype.rs @@ -204,7 +204,7 @@ impl ::re_types_core::reflection::Enum for ChannelDatatype { } } -impl ::re_types_core::SizeBytes for ChannelDatatype { +impl ::re_byte_size::SizeBytes for ChannelDatatype { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/datatypes/class_description.rs b/crates/store/re_types/src/datatypes/class_description.rs index b6827410d9b8..48eac2f213b7 100644 --- a/crates/store/re_types/src/datatypes/class_description.rs +++ b/crates/store/re_types/src/datatypes/class_description.rs @@ -455,7 +455,7 @@ impl ::re_types_core::Loggable for ClassDescription { } } -impl ::re_types_core::SizeBytes for ClassDescription { +impl ::re_byte_size::SizeBytes for ClassDescription { #[inline] fn heap_size_bytes(&self) -> u64 { self.info.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/class_description_map_elem.rs b/crates/store/re_types/src/datatypes/class_description_map_elem.rs index 075f3b22301f..c66f96064582 100644 --- a/crates/store/re_types/src/datatypes/class_description_map_elem.rs +++ b/crates/store/re_types/src/datatypes/class_description_map_elem.rs @@ -225,7 +225,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { } } -impl ::re_types_core::SizeBytes for ClassDescriptionMapElem { +impl ::re_byte_size::SizeBytes for ClassDescriptionMapElem { #[inline] fn heap_size_bytes(&self) -> u64 { self.class_id.heap_size_bytes() + self.class_description.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/class_id.rs b/crates/store/re_types/src/datatypes/class_id.rs index 304ace03f214..3bfe186fb5ab 100644 --- a/crates/store/re_types/src/datatypes/class_id.rs +++ b/crates/store/re_types/src/datatypes/class_id.rs @@ -158,7 +158,7 @@ impl From for u16 { } } -impl ::re_types_core::SizeBytes for ClassId { +impl ::re_byte_size::SizeBytes for ClassId { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/color_model.rs b/crates/store/re_types/src/datatypes/color_model.rs index d7d6414e32da..0822d0214d89 100644 --- a/crates/store/re_types/src/datatypes/color_model.rs +++ b/crates/store/re_types/src/datatypes/color_model.rs @@ -160,7 +160,7 @@ impl ::re_types_core::reflection::Enum for ColorModel { } } -impl ::re_types_core::SizeBytes for ColorModel { +impl ::re_byte_size::SizeBytes for ColorModel { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/datatypes/dvec2d.rs b/crates/store/re_types/src/datatypes/dvec2d.rs index f5d8d0040a22..829ad356ec12 100644 --- a/crates/store/re_types/src/datatypes/dvec2d.rs +++ b/crates/store/re_types/src/datatypes/dvec2d.rs @@ -231,7 +231,7 @@ impl From for [f64; 2usize] { } } -impl ::re_types_core::SizeBytes for DVec2D { +impl ::re_byte_size::SizeBytes for DVec2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/image_format.rs b/crates/store/re_types/src/datatypes/image_format.rs index 1ca28125ab11..da5eaf6ba88c 100644 --- a/crates/store/re_types/src/datatypes/image_format.rs +++ b/crates/store/re_types/src/datatypes/image_format.rs @@ -365,7 +365,7 @@ impl ::re_types_core::Loggable for ImageFormat { } } -impl ::re_types_core::SizeBytes for ImageFormat { +impl ::re_byte_size::SizeBytes for ImageFormat { #[inline] fn heap_size_bytes(&self) -> u64 { self.width.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/keypoint_id.rs b/crates/store/re_types/src/datatypes/keypoint_id.rs index 9923b7950756..965a41afff8e 100644 --- a/crates/store/re_types/src/datatypes/keypoint_id.rs +++ b/crates/store/re_types/src/datatypes/keypoint_id.rs @@ -160,7 +160,7 @@ impl From for u16 { } } -impl ::re_types_core::SizeBytes for KeypointId { +impl ::re_byte_size::SizeBytes for KeypointId { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/keypoint_pair.rs b/crates/store/re_types/src/datatypes/keypoint_pair.rs index d487773cfe2b..af5e6bec63ed 100644 --- a/crates/store/re_types/src/datatypes/keypoint_pair.rs +++ b/crates/store/re_types/src/datatypes/keypoint_pair.rs @@ -234,7 +234,7 @@ impl ::re_types_core::Loggable for KeypointPair { } } -impl ::re_types_core::SizeBytes for KeypointPair { +impl ::re_byte_size::SizeBytes for KeypointPair { #[inline] fn heap_size_bytes(&self) -> u64 { self.keypoint0.heap_size_bytes() + self.keypoint1.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/mat3x3.rs b/crates/store/re_types/src/datatypes/mat3x3.rs index 920ad38a6f7d..91bc806fb4b4 100644 --- a/crates/store/re_types/src/datatypes/mat3x3.rs +++ b/crates/store/re_types/src/datatypes/mat3x3.rs @@ -243,7 +243,7 @@ impl From for [f32; 9usize] { } } -impl ::re_types_core::SizeBytes for Mat3x3 { +impl ::re_byte_size::SizeBytes for Mat3x3 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/mat4x4.rs b/crates/store/re_types/src/datatypes/mat4x4.rs index 45da55ee1117..3dac7affbd42 100644 --- a/crates/store/re_types/src/datatypes/mat4x4.rs +++ b/crates/store/re_types/src/datatypes/mat4x4.rs @@ -243,7 +243,7 @@ impl From for [f32; 16usize] { } } -impl ::re_types_core::SizeBytes for Mat4x4 { +impl ::re_byte_size::SizeBytes for Mat4x4 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/pixel_format.rs b/crates/store/re_types/src/datatypes/pixel_format.rs index 0b7c9aa8301e..241bf6467740 100644 --- a/crates/store/re_types/src/datatypes/pixel_format.rs +++ b/crates/store/re_types/src/datatypes/pixel_format.rs @@ -285,7 +285,7 @@ impl ::re_types_core::reflection::Enum for PixelFormat { } } -impl ::re_types_core::SizeBytes for PixelFormat { +impl ::re_byte_size::SizeBytes for PixelFormat { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/datatypes/plane3d.rs b/crates/store/re_types/src/datatypes/plane3d.rs index 7607453c2349..7ff625b8ffe2 100644 --- a/crates/store/re_types/src/datatypes/plane3d.rs +++ b/crates/store/re_types/src/datatypes/plane3d.rs @@ -239,7 +239,7 @@ impl From for [f32; 4usize] { } } -impl ::re_types_core::SizeBytes for Plane3D { +impl ::re_byte_size::SizeBytes for Plane3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/quaternion.rs b/crates/store/re_types/src/datatypes/quaternion.rs index dde74d4cd6d8..6c3272d3f7b9 100644 --- a/crates/store/re_types/src/datatypes/quaternion.rs +++ b/crates/store/re_types/src/datatypes/quaternion.rs @@ -234,7 +234,7 @@ impl From for [f32; 4usize] { } } -impl ::re_types_core::SizeBytes for Quaternion { +impl ::re_byte_size::SizeBytes for Quaternion { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/range1d.rs b/crates/store/re_types/src/datatypes/range1d.rs index 991fa76b5501..e30aea9ec759 100644 --- a/crates/store/re_types/src/datatypes/range1d.rs +++ b/crates/store/re_types/src/datatypes/range1d.rs @@ -231,7 +231,7 @@ impl From for [f64; 2usize] { } } -impl ::re_types_core::SizeBytes for Range1D { +impl ::re_byte_size::SizeBytes for Range1D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/range2d.rs b/crates/store/re_types/src/datatypes/range2d.rs index 5451895c339b..a8ce00b90d1b 100644 --- a/crates/store/re_types/src/datatypes/range2d.rs +++ b/crates/store/re_types/src/datatypes/range2d.rs @@ -389,7 +389,7 @@ impl ::re_types_core::Loggable for Range2D { } } -impl ::re_types_core::SizeBytes for Range2D { +impl ::re_byte_size::SizeBytes for Range2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.x_range.heap_size_bytes() + self.y_range.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/rgba32.rs b/crates/store/re_types/src/datatypes/rgba32.rs index 8fb26c31b5b6..1c24e06ce8ef 100644 --- a/crates/store/re_types/src/datatypes/rgba32.rs +++ b/crates/store/re_types/src/datatypes/rgba32.rs @@ -148,7 +148,7 @@ impl From for u32 { } } -impl ::re_types_core::SizeBytes for Rgba32 { +impl ::re_byte_size::SizeBytes for Rgba32 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs index 59218e9ced58..c65f22a8881d 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs @@ -302,7 +302,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { } } -impl ::re_types_core::SizeBytes for RotationAxisAngle { +impl ::re_byte_size::SizeBytes for RotationAxisAngle { #[inline] fn heap_size_bytes(&self) -> u64 { self.axis.heap_size_bytes() + self.angle.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/tensor_buffer.rs b/crates/store/re_types/src/datatypes/tensor_buffer.rs index cf2df863a568..969bf4185a49 100644 --- a/crates/store/re_types/src/datatypes/tensor_buffer.rs +++ b/crates/store/re_types/src/datatypes/tensor_buffer.rs @@ -1725,7 +1725,7 @@ impl ::re_types_core::Loggable for TensorBuffer { } } -impl ::re_types_core::SizeBytes for TensorBuffer { +impl ::re_byte_size::SizeBytes for TensorBuffer { #[inline] fn heap_size_bytes(&self) -> u64 { #![allow(clippy::match_same_arms)] diff --git a/crates/store/re_types/src/datatypes/tensor_data.rs b/crates/store/re_types/src/datatypes/tensor_data.rs index 4d75cc0c12e3..b82c64eb3bcd 100644 --- a/crates/store/re_types/src/datatypes/tensor_data.rs +++ b/crates/store/re_types/src/datatypes/tensor_data.rs @@ -490,7 +490,7 @@ impl ::re_types_core::Loggable for TensorData { } } -impl ::re_types_core::SizeBytes for TensorData { +impl ::re_byte_size::SizeBytes for TensorData { #[inline] fn heap_size_bytes(&self) -> u64 { self.shape.heap_size_bytes() + self.names.heap_size_bytes() + self.buffer.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs b/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs index 179947448fcb..06da490978e7 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs @@ -222,7 +222,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { } } -impl ::re_types_core::SizeBytes for TensorDimensionIndexSelection { +impl ::re_byte_size::SizeBytes for TensorDimensionIndexSelection { #[inline] fn heap_size_bytes(&self) -> u64 { self.dimension.heap_size_bytes() + self.index.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs b/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs index cbf750d55342..dbea1d4084e1 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs @@ -217,7 +217,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { } } -impl ::re_types_core::SizeBytes for TensorDimensionSelection { +impl ::re_byte_size::SizeBytes for TensorDimensionSelection { #[inline] fn heap_size_bytes(&self) -> u64 { self.dimension.heap_size_bytes() + self.invert.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/utf8pair.rs b/crates/store/re_types/src/datatypes/utf8pair.rs index 2eec236d7687..697733297983 100644 --- a/crates/store/re_types/src/datatypes/utf8pair.rs +++ b/crates/store/re_types/src/datatypes/utf8pair.rs @@ -300,7 +300,7 @@ impl ::re_types_core::Loggable for Utf8Pair { } } -impl ::re_types_core::SizeBytes for Utf8Pair { +impl ::re_byte_size::SizeBytes for Utf8Pair { #[inline] fn heap_size_bytes(&self) -> u64 { self.first.heap_size_bytes() + self.second.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/uuid.rs b/crates/store/re_types/src/datatypes/uuid.rs index 56c95a6893b2..90d4e293bd88 100644 --- a/crates/store/re_types/src/datatypes/uuid.rs +++ b/crates/store/re_types/src/datatypes/uuid.rs @@ -238,7 +238,7 @@ impl From for [u8; 16usize] { } } -impl ::re_types_core::SizeBytes for Uuid { +impl ::re_byte_size::SizeBytes for Uuid { #[inline] fn heap_size_bytes(&self) -> u64 { self.bytes.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/uvec2d.rs b/crates/store/re_types/src/datatypes/uvec2d.rs index 73027ab3b0e3..b5610eebd77a 100644 --- a/crates/store/re_types/src/datatypes/uvec2d.rs +++ b/crates/store/re_types/src/datatypes/uvec2d.rs @@ -231,7 +231,7 @@ impl From for [u32; 2usize] { } } -impl ::re_types_core::SizeBytes for UVec2D { +impl ::re_byte_size::SizeBytes for UVec2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/uvec3d.rs b/crates/store/re_types/src/datatypes/uvec3d.rs index c2d0688212c7..0913b1ce9403 100644 --- a/crates/store/re_types/src/datatypes/uvec3d.rs +++ b/crates/store/re_types/src/datatypes/uvec3d.rs @@ -231,7 +231,7 @@ impl From for [u32; 3usize] { } } -impl ::re_types_core::SizeBytes for UVec3D { +impl ::re_byte_size::SizeBytes for UVec3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/uvec4d.rs b/crates/store/re_types/src/datatypes/uvec4d.rs index 1f081982fec9..66316f5a4112 100644 --- a/crates/store/re_types/src/datatypes/uvec4d.rs +++ b/crates/store/re_types/src/datatypes/uvec4d.rs @@ -231,7 +231,7 @@ impl From for [u32; 4usize] { } } -impl ::re_types_core::SizeBytes for UVec4D { +impl ::re_byte_size::SizeBytes for UVec4D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/vec2d.rs b/crates/store/re_types/src/datatypes/vec2d.rs index a50e5b92d935..2efd1694dd50 100644 --- a/crates/store/re_types/src/datatypes/vec2d.rs +++ b/crates/store/re_types/src/datatypes/vec2d.rs @@ -231,7 +231,7 @@ impl From for [f32; 2usize] { } } -impl ::re_types_core::SizeBytes for Vec2D { +impl ::re_byte_size::SizeBytes for Vec2D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/vec3d.rs b/crates/store/re_types/src/datatypes/vec3d.rs index 62f096d2e016..e25df1bc99b4 100644 --- a/crates/store/re_types/src/datatypes/vec3d.rs +++ b/crates/store/re_types/src/datatypes/vec3d.rs @@ -231,7 +231,7 @@ impl From for [f32; 3usize] { } } -impl ::re_types_core::SizeBytes for Vec3D { +impl ::re_byte_size::SizeBytes for Vec3D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/vec4d.rs b/crates/store/re_types/src/datatypes/vec4d.rs index cf04d4da7c20..6c27893d6a7e 100644 --- a/crates/store/re_types/src/datatypes/vec4d.rs +++ b/crates/store/re_types/src/datatypes/vec4d.rs @@ -231,7 +231,7 @@ impl From for [f32; 4usize] { } } -impl ::re_types_core::SizeBytes for Vec4D { +impl ::re_byte_size::SizeBytes for Vec4D { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/video_timestamp.rs b/crates/store/re_types/src/datatypes/video_timestamp.rs index b572e278c1cc..566a4b140d91 100644 --- a/crates/store/re_types/src/datatypes/video_timestamp.rs +++ b/crates/store/re_types/src/datatypes/video_timestamp.rs @@ -148,7 +148,7 @@ impl From for i64 { } } -impl ::re_types_core::SizeBytes for VideoTimestamp { +impl ::re_byte_size::SizeBytes for VideoTimestamp { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/datatypes/view_coordinates.rs b/crates/store/re_types/src/datatypes/view_coordinates.rs index c290c685fc2b..142109ff373e 100644 --- a/crates/store/re_types/src/datatypes/view_coordinates.rs +++ b/crates/store/re_types/src/datatypes/view_coordinates.rs @@ -251,7 +251,7 @@ impl From for [u8; 3usize] { } } -impl ::re_types_core::SizeBytes for ViewCoordinates { +impl ::re_byte_size::SizeBytes for ViewCoordinates { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs index 8eed4f39795a..e7d01dd7bdc4 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs @@ -952,7 +952,7 @@ impl AffixFuzzer1 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer1 { +impl ::re_byte_size::SizeBytes for AffixFuzzer1 { #[inline] fn heap_size_bytes(&self) -> u64 { self.fuzz1001.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs index 28cb64bfebc6..b0616444125c 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs @@ -822,7 +822,7 @@ impl AffixFuzzer2 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer2 { +impl ::re_byte_size::SizeBytes for AffixFuzzer2 { #[inline] fn heap_size_bytes(&self) -> u64 { self.fuzz1101.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs index 643d315ff076..53eef9ac7012 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs @@ -929,7 +929,7 @@ impl AffixFuzzer3 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer3 { +impl ::re_byte_size::SizeBytes for AffixFuzzer3 { #[inline] fn heap_size_bytes(&self) -> u64 { self.fuzz2001.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs index e3f2d70e7783..bd411f580fca 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs @@ -983,7 +983,7 @@ impl AffixFuzzer4 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer4 { +impl ::re_byte_size::SizeBytes for AffixFuzzer4 { #[inline] fn heap_size_bytes(&self) -> u64 { self.fuzz2101.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer1.rs b/crates/store/re_types/src/testing/components/affix_fuzzer1.rs index 967ddc99930a..e79e819642d1 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer1.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer1 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer1 { +impl ::re_byte_size::SizeBytes for AffixFuzzer1 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs index 739d7de755cc..aab96f36261f 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs @@ -171,7 +171,7 @@ impl std::ops::DerefMut for AffixFuzzer10 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer10 { +impl ::re_byte_size::SizeBytes for AffixFuzzer10 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer11.rs b/crates/store/re_types/src/testing/components/affix_fuzzer11.rs index 142b2b88218f..be9d6fd364f4 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer11.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer11.rs @@ -199,7 +199,7 @@ impl std::ops::DerefMut for AffixFuzzer11 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer11 { +impl ::re_byte_size::SizeBytes for AffixFuzzer11 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs index e3f13d3a9d4b..cd951d328af3 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs @@ -241,7 +241,7 @@ impl std::ops::DerefMut for AffixFuzzer12 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer12 { +impl ::re_byte_size::SizeBytes for AffixFuzzer12 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs index 9118de31e42a..7d2864b90119 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs @@ -241,7 +241,7 @@ impl std::ops::DerefMut for AffixFuzzer13 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer13 { +impl ::re_byte_size::SizeBytes for AffixFuzzer13 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer14.rs b/crates/store/re_types/src/testing/components/affix_fuzzer14.rs index 9e3e6dd8afdd..e594a1b56f28 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer14.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer14.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer14 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer14 { +impl ::re_byte_size::SizeBytes for AffixFuzzer14 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer15.rs b/crates/store/re_types/src/testing/components/affix_fuzzer15.rs index 674d8a6eb4cd..dea464edf057 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer15.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer15.rs @@ -147,7 +147,7 @@ impl std::ops::DerefMut for AffixFuzzer15 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer15 { +impl ::re_byte_size::SizeBytes for AffixFuzzer15 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer16.rs b/crates/store/re_types/src/testing/components/affix_fuzzer16.rs index 605c7831b803..17ea4f0a2439 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer16.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer16.rs @@ -171,7 +171,7 @@ impl, T: IntoIterator } } -impl ::re_types_core::SizeBytes for AffixFuzzer16 { +impl ::re_byte_size::SizeBytes for AffixFuzzer16 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer17.rs b/crates/store/re_types/src/testing/components/affix_fuzzer17.rs index 5c3584825e37..01785040e053 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer17.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer17.rs @@ -171,7 +171,7 @@ impl, T: IntoIterator } } -impl ::re_types_core::SizeBytes for AffixFuzzer17 { +impl ::re_byte_size::SizeBytes for AffixFuzzer17 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer18.rs b/crates/store/re_types/src/testing/components/affix_fuzzer18.rs index 0ee06f26d382..1ff54d4283a2 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer18.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer18.rs @@ -171,7 +171,7 @@ impl, T: IntoIterator } } -impl ::re_types_core::SizeBytes for AffixFuzzer18 { +impl ::re_byte_size::SizeBytes for AffixFuzzer18 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer19.rs b/crates/store/re_types/src/testing/components/affix_fuzzer19.rs index 1a5b51bc9069..3c420ca8ad4e 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer19.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer19.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer19 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer19 { +impl ::re_byte_size::SizeBytes for AffixFuzzer19 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer2.rs b/crates/store/re_types/src/testing/components/affix_fuzzer2.rs index 32e9c765e816..bdffe830be6a 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer2.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer2 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer2 { +impl ::re_byte_size::SizeBytes for AffixFuzzer2 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer20.rs b/crates/store/re_types/src/testing/components/affix_fuzzer20.rs index 03d4e6af555b..1834ea677a5c 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer20.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer20 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer20 { +impl ::re_byte_size::SizeBytes for AffixFuzzer20 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer21.rs b/crates/store/re_types/src/testing/components/affix_fuzzer21.rs index 1455cba6c48a..23e9ed8570a1 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer21.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer21 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer21 { +impl ::re_byte_size::SizeBytes for AffixFuzzer21 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer22.rs b/crates/store/re_types/src/testing/components/affix_fuzzer22.rs index 7e74d392baaf..df21c991ddf8 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer22.rs @@ -127,7 +127,7 @@ impl std::ops::DerefMut for AffixFuzzer22 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer22 { +impl ::re_byte_size::SizeBytes for AffixFuzzer22 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer23.rs b/crates/store/re_types/src/testing/components/affix_fuzzer23.rs index 9ece4182d69c..11deefca4235 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer23.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer23.rs @@ -131,7 +131,7 @@ impl std::ops::DerefMut for AffixFuzzer23 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer23 { +impl ::re_byte_size::SizeBytes for AffixFuzzer23 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer3.rs b/crates/store/re_types/src/testing/components/affix_fuzzer3.rs index 3dc4948654ae..8ee77d150818 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer3.rs @@ -90,7 +90,7 @@ impl std::ops::DerefMut for AffixFuzzer3 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer3 { +impl ::re_byte_size::SizeBytes for AffixFuzzer3 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer4.rs b/crates/store/re_types/src/testing/components/affix_fuzzer4.rs index 0759fa56d94f..fa4e37a359f4 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer4.rs @@ -158,7 +158,7 @@ impl std::ops::DerefMut for AffixFuzzer4 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer4 { +impl ::re_byte_size::SizeBytes for AffixFuzzer4 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer5.rs b/crates/store/re_types/src/testing/components/affix_fuzzer5.rs index d86667953fd2..ac54a75b99ac 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer5.rs @@ -158,7 +158,7 @@ impl std::ops::DerefMut for AffixFuzzer5 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer5 { +impl ::re_byte_size::SizeBytes for AffixFuzzer5 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer6.rs b/crates/store/re_types/src/testing/components/affix_fuzzer6.rs index 119e829355e7..0ef3c818dcff 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer6.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer6.rs @@ -158,7 +158,7 @@ impl std::ops::DerefMut for AffixFuzzer6 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer6 { +impl ::re_byte_size::SizeBytes for AffixFuzzer6 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer7.rs b/crates/store/re_types/src/testing/components/affix_fuzzer7.rs index 74fa0a201a01..0c5ad27bf2c6 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer7.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer7.rs @@ -169,7 +169,7 @@ impl, T: IntoIterator } } -impl ::re_types_core::SizeBytes for AffixFuzzer7 { +impl ::re_byte_size::SizeBytes for AffixFuzzer7 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer8.rs b/crates/store/re_types/src/testing/components/affix_fuzzer8.rs index 9bbec3a8735f..ba60138bdc3a 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer8.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer8.rs @@ -132,7 +132,7 @@ impl std::ops::DerefMut for AffixFuzzer8 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer8 { +impl ::re_byte_size::SizeBytes for AffixFuzzer8 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs index a5d0d98442cd..04501462b78c 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs @@ -171,7 +171,7 @@ impl std::ops::DerefMut for AffixFuzzer9 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer9 { +impl ::re_byte_size::SizeBytes for AffixFuzzer9 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs index 4cec3891a667..01fb9cba7b26 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs @@ -1069,7 +1069,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer1 { +impl ::re_byte_size::SizeBytes for AffixFuzzer1 { #[inline] fn heap_size_bytes(&self) -> u64 { self.single_float_optional.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs index 07e674e03429..a0c510288c6e 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs @@ -109,7 +109,7 @@ impl From for Option { } } -impl ::re_types_core::SizeBytes for AffixFuzzer2 { +impl ::re_byte_size::SizeBytes for AffixFuzzer2 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs index 36adf314259f..7db553025d94 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs @@ -272,7 +272,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer20 { +impl ::re_byte_size::SizeBytes for AffixFuzzer20 { #[inline] fn heap_size_bytes(&self) -> u64 { self.p.heap_size_bytes() + self.s.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs index aa6cac91defd..851c579b5bc3 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs @@ -300,7 +300,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer21 { +impl ::re_byte_size::SizeBytes for AffixFuzzer21 { #[inline] fn heap_size_bytes(&self) -> u64 { self.single_half.heap_size_bytes() + self.many_halves.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs index 1edab45a0dd6..3482fc1ffba4 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs @@ -268,7 +268,7 @@ impl From for [u8; 4usize] { } } -impl ::re_types_core::SizeBytes for AffixFuzzer22 { +impl ::re_byte_size::SizeBytes for AffixFuzzer22 { #[inline] fn heap_size_bytes(&self) -> u64 { self.fixed_sized_native.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs index b43ce063aba7..b41e7a386323 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs @@ -554,7 +554,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer3 { +impl ::re_byte_size::SizeBytes for AffixFuzzer3 { #[inline] fn heap_size_bytes(&self) -> u64 { #![allow(clippy::match_same_arms)] diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs index bc763821d865..a879342c4e4b 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs @@ -367,7 +367,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer4 { +impl ::re_byte_size::SizeBytes for AffixFuzzer4 { #[inline] fn heap_size_bytes(&self) -> u64 { #![allow(clippy::match_same_arms)] diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs index 7eff68520d75..95623ef02530 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs @@ -186,7 +186,7 @@ impl std::ops::DerefMut for AffixFuzzer5 { } } -impl ::re_types_core::SizeBytes for AffixFuzzer5 { +impl ::re_byte_size::SizeBytes for AffixFuzzer5 { #[inline] fn heap_size_bytes(&self) -> u64 { self.single_optional_union.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/enum_test.rs b/crates/store/re_types/src/testing/datatypes/enum_test.rs index b0cab6ff3021..4eb6a39dbc43 100644 --- a/crates/store/re_types/src/testing/datatypes/enum_test.rs +++ b/crates/store/re_types/src/testing/datatypes/enum_test.rs @@ -167,7 +167,7 @@ impl ::re_types_core::reflection::Enum for EnumTest { } } -impl ::re_types_core::SizeBytes for EnumTest { +impl ::re_byte_size::SizeBytes for EnumTest { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs b/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs index 596b7a54dc9a..2cf2dc3b3930 100644 --- a/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs +++ b/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs @@ -175,7 +175,7 @@ impl From for f32 { } } -impl ::re_types_core::SizeBytes for FlattenedScalar { +impl ::re_byte_size::SizeBytes for FlattenedScalar { #[inline] fn heap_size_bytes(&self) -> u64 { self.value.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/multi_enum.rs b/crates/store/re_types/src/testing/datatypes/multi_enum.rs index 0551435fa8da..682f9fb50147 100644 --- a/crates/store/re_types/src/testing/datatypes/multi_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/multi_enum.rs @@ -204,7 +204,7 @@ impl ::re_types_core::Loggable for MultiEnum { } } -impl ::re_types_core::SizeBytes for MultiEnum { +impl ::re_byte_size::SizeBytes for MultiEnum { #[inline] fn heap_size_bytes(&self) -> u64 { self.value1.heap_size_bytes() + self.value2.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/primitive_component.rs b/crates/store/re_types/src/testing/datatypes/primitive_component.rs index 2271cc2e2c7c..fba864edf08c 100644 --- a/crates/store/re_types/src/testing/datatypes/primitive_component.rs +++ b/crates/store/re_types/src/testing/datatypes/primitive_component.rs @@ -142,7 +142,7 @@ impl From for u32 { } } -impl ::re_types_core::SizeBytes for PrimitiveComponent { +impl ::re_byte_size::SizeBytes for PrimitiveComponent { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/string_component.rs b/crates/store/re_types/src/testing/datatypes/string_component.rs index 735ff75abb84..f2a4dec25b7a 100644 --- a/crates/store/re_types/src/testing/datatypes/string_component.rs +++ b/crates/store/re_types/src/testing/datatypes/string_component.rs @@ -149,7 +149,7 @@ impl From for ::re_types_core::ArrowString { } } -impl ::re_types_core::SizeBytes for StringComponent { +impl ::re_byte_size::SizeBytes for StringComponent { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types/src/testing/datatypes/valued_enum.rs b/crates/store/re_types/src/testing/datatypes/valued_enum.rs index 90aeab7fbdb4..552bc6f849e3 100644 --- a/crates/store/re_types/src/testing/datatypes/valued_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/valued_enum.rs @@ -147,7 +147,7 @@ impl ::re_types_core::reflection::Enum for ValuedEnum { } } -impl ::re_types_core::SizeBytes for ValuedEnum { +impl ::re_byte_size::SizeBytes for ValuedEnum { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types_core/Cargo.toml b/crates/store/re_types_core/Cargo.toml index 71b15bcd42a9..93b4cfc65bac 100644 --- a/crates/store/re_types_core/Cargo.toml +++ b/crates/store/re_types_core/Cargo.toml @@ -36,6 +36,7 @@ serde = ["dep:serde", "re_string_interner/serde"] # Rerun re_case.workspace = true re_error.workspace = true +re_byte_size.workspace = true re_string_interner.workspace = true re_tracing.workspace = true re_tuid.workspace = true @@ -52,11 +53,9 @@ arrow2 = { workspace = true, features = [ backtrace.workspace = true bytemuck.workspace = true document-features.workspace = true -half.workspace = true itertools.workspace = true nohash-hasher.workspace = true once_cell.workspace = true -smallvec.workspace = true thiserror.workspace = true # Optional dependencies diff --git a/crates/store/re_types_core/src/archetype.rs b/crates/store/re_types_core/src/archetype.rs index 601684ef68fb..525cc3b8f731 100644 --- a/crates/store/re_types_core/src/archetype.rs +++ b/crates/store/re_types_core/src/archetype.rs @@ -210,7 +210,7 @@ impl ArchetypeName { } } -impl crate::SizeBytes for ArchetypeName { +impl re_byte_size::SizeBytes for ArchetypeName { #[inline] fn heap_size_bytes(&self) -> u64 { 0 @@ -224,7 +224,7 @@ re_string_interner::declare_new_type!( pub struct ArchetypeFieldName; ); -impl crate::SizeBytes for ArchetypeFieldName { +impl re_byte_size::SizeBytes for ArchetypeFieldName { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types_core/src/archetypes/clear.rs b/crates/store/re_types_core/src/archetypes/clear.rs index 019572ddf0ae..1a93036595bf 100644 --- a/crates/store/re_types_core/src/archetypes/clear.rs +++ b/crates/store/re_types_core/src/archetypes/clear.rs @@ -224,7 +224,7 @@ impl Clear { } } -impl crate::SizeBytes for Clear { +impl ::re_byte_size::SizeBytes for Clear { #[inline] fn heap_size_bytes(&self) -> u64 { self.is_recursive.heap_size_bytes() diff --git a/crates/store/re_types_core/src/arrow_buffer.rs b/crates/store/re_types_core/src/arrow_buffer.rs index a07e47ca2e88..042e239464a1 100644 --- a/crates/store/re_types_core/src/arrow_buffer.rs +++ b/crates/store/re_types_core/src/arrow_buffer.rs @@ -1,4 +1,5 @@ use arrow::datatypes::ArrowNativeType; +use re_byte_size::SizeBytes; /// Convenience-wrapper around an [`arrow::buffer::ScalarBuffer`] that is known to contain a /// a primitive type. @@ -17,7 +18,7 @@ impl Default for ArrowBuffer { } } -impl crate::SizeBytes for ArrowBuffer { +impl SizeBytes for ArrowBuffer { #[inline] fn heap_size_bytes(&self) -> u64 { std::mem::size_of_val(self.as_slice()) as _ diff --git a/crates/store/re_types_core/src/arrow_string.rs b/crates/store/re_types_core/src/arrow_string.rs index 8376167d8deb..426202108100 100644 --- a/crates/store/re_types_core/src/arrow_string.rs +++ b/crates/store/re_types_core/src/arrow_string.rs @@ -11,7 +11,7 @@ use arrow2::buffer::Buffer; #[derive(Clone, Debug, Default)] pub struct ArrowString(Buffer); -impl crate::SizeBytes for ArrowString { +impl re_byte_size::SizeBytes for ArrowString { #[inline] fn heap_size_bytes(&self) -> u64 { let Self(buf) = self; diff --git a/crates/store/re_types_core/src/component_descriptor.rs b/crates/store/re_types_core/src/component_descriptor.rs index 0d0d10c6cf45..cf19c2d437e4 100644 --- a/crates/store/re_types_core/src/component_descriptor.rs +++ b/crates/store/re_types_core/src/component_descriptor.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use crate::{ArchetypeFieldName, ArchetypeName, ComponentName, SizeBytes}; +use crate::{ArchetypeFieldName, ArchetypeName, ComponentName}; /// A [`ComponentDescriptor`] fully describes the semantics of a column of data. /// @@ -117,7 +117,7 @@ impl ComponentDescriptor { } } -impl SizeBytes for ComponentDescriptor { +impl re_byte_size::SizeBytes for ComponentDescriptor { #[inline] fn heap_size_bytes(&self) -> u64 { let Self { diff --git a/crates/store/re_types_core/src/components/clear_is_recursive.rs b/crates/store/re_types_core/src/components/clear_is_recursive.rs index 1f14d48d8a12..383c43d26a00 100644 --- a/crates/store/re_types_core/src/components/clear_is_recursive.rs +++ b/crates/store/re_types_core/src/components/clear_is_recursive.rs @@ -94,7 +94,7 @@ impl std::ops::DerefMut for ClearIsRecursive { } } -impl crate::SizeBytes for ClearIsRecursive { +impl ::re_byte_size::SizeBytes for ClearIsRecursive { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/bool.rs b/crates/store/re_types_core/src/datatypes/bool.rs index 1d9abe40b882..84ee298a244f 100644 --- a/crates/store/re_types_core/src/datatypes/bool.rs +++ b/crates/store/re_types_core/src/datatypes/bool.rs @@ -110,7 +110,7 @@ impl From for bool { } } -impl crate::SizeBytes for Bool { +impl ::re_byte_size::SizeBytes for Bool { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/entity_path.rs b/crates/store/re_types_core/src/datatypes/entity_path.rs index 52690454d531..90a9829726b4 100644 --- a/crates/store/re_types_core/src/datatypes/entity_path.rs +++ b/crates/store/re_types_core/src/datatypes/entity_path.rs @@ -149,7 +149,7 @@ impl From for crate::ArrowString { } } -impl crate::SizeBytes for EntityPath { +impl ::re_byte_size::SizeBytes for EntityPath { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/float32.rs b/crates/store/re_types_core/src/datatypes/float32.rs index 194c3fd0fe1d..25dd8b95bd21 100644 --- a/crates/store/re_types_core/src/datatypes/float32.rs +++ b/crates/store/re_types_core/src/datatypes/float32.rs @@ -143,7 +143,7 @@ impl From for f32 { } } -impl crate::SizeBytes for Float32 { +impl ::re_byte_size::SizeBytes for Float32 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/float64.rs b/crates/store/re_types_core/src/datatypes/float64.rs index c83beb229b67..142918745bb5 100644 --- a/crates/store/re_types_core/src/datatypes/float64.rs +++ b/crates/store/re_types_core/src/datatypes/float64.rs @@ -143,7 +143,7 @@ impl From for f64 { } } -impl crate::SizeBytes for Float64 { +impl ::re_byte_size::SizeBytes for Float64 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/time_int.rs b/crates/store/re_types_core/src/datatypes/time_int.rs index 9235eff61fe6..b64e38c6f3ef 100644 --- a/crates/store/re_types_core/src/datatypes/time_int.rs +++ b/crates/store/re_types_core/src/datatypes/time_int.rs @@ -142,7 +142,7 @@ impl From for i64 { } } -impl crate::SizeBytes for TimeInt { +impl ::re_byte_size::SizeBytes for TimeInt { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/time_range.rs b/crates/store/re_types_core/src/datatypes/time_range.rs index 770c206fea6e..ca6c88f96fe0 100644 --- a/crates/store/re_types_core/src/datatypes/time_range.rs +++ b/crates/store/re_types_core/src/datatypes/time_range.rs @@ -206,7 +206,7 @@ impl crate::Loggable for TimeRange { } } -impl crate::SizeBytes for TimeRange { +impl ::re_byte_size::SizeBytes for TimeRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.start.heap_size_bytes() + self.end.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/time_range_boundary.rs b/crates/store/re_types_core/src/datatypes/time_range_boundary.rs index 92b12ba1ca91..b4e405c8ce8f 100644 --- a/crates/store/re_types_core/src/datatypes/time_range_boundary.rs +++ b/crates/store/re_types_core/src/datatypes/time_range_boundary.rs @@ -333,7 +333,7 @@ impl crate::Loggable for TimeRangeBoundary { } } -impl crate::SizeBytes for TimeRangeBoundary { +impl ::re_byte_size::SizeBytes for TimeRangeBoundary { #[inline] fn heap_size_bytes(&self) -> u64 { #![allow(clippy::match_same_arms)] diff --git a/crates/store/re_types_core/src/datatypes/uint16.rs b/crates/store/re_types_core/src/datatypes/uint16.rs index 5320d9777e41..8994515dec97 100644 --- a/crates/store/re_types_core/src/datatypes/uint16.rs +++ b/crates/store/re_types_core/src/datatypes/uint16.rs @@ -142,7 +142,7 @@ impl From for u16 { } } -impl crate::SizeBytes for UInt16 { +impl ::re_byte_size::SizeBytes for UInt16 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/uint32.rs b/crates/store/re_types_core/src/datatypes/uint32.rs index 0c11c36b0c8b..391c65290a7b 100644 --- a/crates/store/re_types_core/src/datatypes/uint32.rs +++ b/crates/store/re_types_core/src/datatypes/uint32.rs @@ -142,7 +142,7 @@ impl From for u32 { } } -impl crate::SizeBytes for UInt32 { +impl ::re_byte_size::SizeBytes for UInt32 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/uint64.rs b/crates/store/re_types_core/src/datatypes/uint64.rs index 4a78e89ee499..bfd61034cec9 100644 --- a/crates/store/re_types_core/src/datatypes/uint64.rs +++ b/crates/store/re_types_core/src/datatypes/uint64.rs @@ -142,7 +142,7 @@ impl From for u64 { } } -impl crate::SizeBytes for UInt64 { +impl ::re_byte_size::SizeBytes for UInt64 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/utf8.rs b/crates/store/re_types_core/src/datatypes/utf8.rs index 79e3fe46b16e..cb8600b68f1b 100644 --- a/crates/store/re_types_core/src/datatypes/utf8.rs +++ b/crates/store/re_types_core/src/datatypes/utf8.rs @@ -149,7 +149,7 @@ impl From for crate::ArrowString { } } -impl crate::SizeBytes for Utf8 { +impl ::re_byte_size::SizeBytes for Utf8 { #[inline] fn heap_size_bytes(&self) -> u64 { self.0.heap_size_bytes() diff --git a/crates/store/re_types_core/src/datatypes/visible_time_range.rs b/crates/store/re_types_core/src/datatypes/visible_time_range.rs index 91e470e85a07..a93fd89771cb 100644 --- a/crates/store/re_types_core/src/datatypes/visible_time_range.rs +++ b/crates/store/re_types_core/src/datatypes/visible_time_range.rs @@ -260,7 +260,7 @@ impl crate::Loggable for VisibleTimeRange { } } -impl crate::SizeBytes for VisibleTimeRange { +impl ::re_byte_size::SizeBytes for VisibleTimeRange { #[inline] fn heap_size_bytes(&self) -> u64 { self.timeline.heap_size_bytes() + self.range.heap_size_bytes() diff --git a/crates/store/re_types_core/src/lib.rs b/crates/store/re_types_core/src/lib.rs index 77ded5215d26..52fb0659c524 100644 --- a/crates/store/re_types_core/src/lib.rs +++ b/crates/store/re_types_core/src/lib.rs @@ -246,7 +246,6 @@ mod loggable; mod loggable_batch; pub mod reflection; mod result; -mod size_bytes; mod tuid; mod view; @@ -269,7 +268,6 @@ pub use self::{ DeserializationError, DeserializationResult, ResultExt, SerializationError, SerializationResult, _Backtrace, }, - size_bytes::SizeBytes, view::{View, ViewClassIdentifier}, }; diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index 0da30c5acc11..5ab91d59a8bd 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -2,9 +2,9 @@ use std::borrow::Cow; use nohash_hasher::IntSet; -use crate::{ - result::_Backtrace, ComponentDescriptor, DeserializationResult, SerializationResult, SizeBytes, -}; +use re_byte_size::SizeBytes; + +use crate::{result::_Backtrace, ComponentDescriptor, DeserializationResult, SerializationResult}; #[allow(unused_imports)] // used in docstrings use crate::{Archetype, ComponentBatch, LoggableBatch}; @@ -295,7 +295,7 @@ impl ComponentName { // --- -impl crate::SizeBytes for ComponentName { +impl re_byte_size::SizeBytes for ComponentName { #[inline] fn heap_size_bytes(&self) -> u64 { 0 @@ -337,7 +337,7 @@ impl DatatypeName { } } -impl crate::SizeBytes for DatatypeName { +impl re_byte_size::SizeBytes for DatatypeName { #[inline] fn heap_size_bytes(&self) -> u64 { 0 diff --git a/crates/store/re_types_core/src/size_bytes/mod.rs b/crates/store/re_types_core/src/size_bytes/mod.rs deleted file mode 100644 index a746ada41f39..000000000000 --- a/crates/store/re_types_core/src/size_bytes/mod.rs +++ /dev/null @@ -1,270 +0,0 @@ -mod arrow2_sizes; -mod arrow_sizes; - -use std::collections::{BTreeMap, BTreeSet, HashMap, VecDeque}; -use std::sync::Arc; - -use smallvec::SmallVec; - -// --- - -/// Approximations of stack and heap size for both internal and external types. -/// -/// Motly used for statistics and triggering events such as garbage collection. -pub trait SizeBytes { - /// Returns the total size of `self` in bytes, accounting for both stack and heap space. - #[inline] - fn total_size_bytes(&self) -> u64 { - self.stack_size_bytes() + self.heap_size_bytes() - } - - /// Returns the total size of `self` on the stack, in bytes. - /// - /// Defaults to `std::mem::size_of_val(self)`. - #[inline] - fn stack_size_bytes(&self) -> u64 { - std::mem::size_of_val(self) as _ - } - - /// Returns the total size of `self` on the heap, in bytes. - fn heap_size_bytes(&self) -> u64; - - /// Is `Self` just plain old data? - /// - /// If `true`, this will make most blanket implementations of `SizeBytes` much faster (e.g. `Vec`). - #[inline] - fn is_pod() -> bool { - false - } -} - -// TODO(rust-lang/rust#31844): This isn't happening without specialization. -// impl SizeBytes for T where T: bytemuck::Pod { … } - -// --- Std --- - -impl SizeBytes for String { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.as_bytes().len() as u64 - } -} - -impl SizeBytes for BTreeMap { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - let keys_size_bytes = if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.keys().map(SizeBytes::total_size_bytes).sum::() - }; - - let values_size_bytes = if V::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.values().map(SizeBytes::total_size_bytes).sum::() - }; - - keys_size_bytes + values_size_bytes - } -} - -impl SizeBytes for BTreeSet { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for HashMap { - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - - let keys_size_bytes = if K::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.keys().map(SizeBytes::total_size_bytes).sum::() - }; - - let values_size_bytes = if V::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.values().map(SizeBytes::total_size_bytes).sum::() - }; - - keys_size_bytes + values_size_bytes - } -} - -// NOTE: Do _not_ implement `SizeBytes` for slices: we cannot know whether they point to the stack -// or the heap! - -impl SizeBytes for [T; N] { - #[inline] - fn heap_size_bytes(&self) -> u64 { - if T::is_pod() { - 0 // it's a const-sized array - } else { - self.iter().map(SizeBytes::heap_size_bytes).sum::() - } - } -} - -impl SizeBytes for Vec { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for VecDeque { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } -} - -impl SizeBytes for SmallVec<[T; N]> { - /// Does not take capacity into account. - #[inline] - fn heap_size_bytes(&self) -> u64 { - if self.len() <= N { - // The `SmallVec` is still smaller than the threshold so no heap data has been - // allocated yet, beyond the heap data each element might have. - - if T::is_pod() { - 0 // early-out - } else { - self.iter().map(SizeBytes::heap_size_bytes).sum::() - } - } else { - // NOTE: It's all on the heap at this point. - if T::is_pod() { - (self.len() * std::mem::size_of::()) as _ - } else { - self.iter().map(SizeBytes::total_size_bytes).sum::() - } - } - } -} - -impl SizeBytes for Option { - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.as_ref().map_or(0, SizeBytes::heap_size_bytes) - } -} - -impl SizeBytes for Arc { - #[inline] - fn heap_size_bytes(&self) -> u64 { - 0 // assume it's amortized - } -} - -impl SizeBytes for Box { - #[inline] - fn heap_size_bytes(&self) -> u64 { - T::total_size_bytes(&**self) - } -} - -// TODO(rust-lang/rust#31844): `impl SizeBytesExt for T {}` would be nice but -// violates orphan rules. -macro_rules! impl_size_bytes_pod { - ($ty:ty) => { - impl SizeBytes for $ty { - #[inline] - fn heap_size_bytes(&self) -> u64 { - 0 - } - - #[inline] - fn is_pod() -> bool { - true - } - } - }; - ($ty:ty, $($rest:ty),+) => { - impl_size_bytes_pod!($ty); impl_size_bytes_pod!($($rest),+); - }; -} - -impl_size_bytes_pod!(u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, bool, f32, f64); -impl_size_bytes_pod!(half::f16); - -impl SizeBytes for (T, U) -where - T: SizeBytes, - U: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b) = self; - a.heap_size_bytes() + b.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() - } -} - -impl SizeBytes for (T, U, V) -where - T: SizeBytes, - U: SizeBytes, - V: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b, c) = self; - a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() && V::is_pod() - } -} - -impl SizeBytes for (T, U, V, W) -where - T: SizeBytes, - U: SizeBytes, - V: SizeBytes, - W: SizeBytes, -{ - #[inline] - fn heap_size_bytes(&self) -> u64 { - let (a, b, c, d) = self; - a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + d.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - T::is_pod() && U::is_pod() && V::is_pod() && W::is_pod() - } -} diff --git a/crates/store/re_types_core/src/tuid.rs b/crates/store/re_types_core/src/tuid.rs index 92f017297e27..c175d56696d2 100644 --- a/crates/store/re_types_core/src/tuid.rs +++ b/crates/store/re_types_core/src/tuid.rs @@ -1,6 +1,5 @@ use std::sync::Arc; -use crate::{DeserializationError, Loggable, SizeBytes}; use arrow2::{ array::{StructArray, UInt64Array}, datatypes::{DataType, Field}, @@ -8,14 +7,9 @@ use arrow2::{ use re_tuid::Tuid; -// --- +use crate::{DeserializationError, Loggable}; -impl SizeBytes for Tuid { - #[inline] - fn heap_size_bytes(&self) -> u64 { - Self::heap_size_bytes(self) - } -} +// --- impl Loggable for Tuid { #[inline] diff --git a/crates/top/re_sdk/Cargo.toml b/crates/top/re_sdk/Cargo.toml index d1855b4d14e9..35f9b2f7cc7a 100644 --- a/crates/top/re_sdk/Cargo.toml +++ b/crates/top/re_sdk/Cargo.toml @@ -50,6 +50,7 @@ web_viewer = [ [dependencies] re_build_info.workspace = true +re_byte_size.workspace = true re_chunk.workspace = true re_log_encoding = { workspace = true, features = ["encoder"] } re_log_types.workspace = true diff --git a/crates/top/re_sdk/src/lib.rs b/crates/top/re_sdk/src/lib.rs index 2ef51e0e1dd7..642e844ae903 100644 --- a/crates/top/re_sdk/src/lib.rs +++ b/crates/top/re_sdk/src/lib.rs @@ -94,9 +94,11 @@ pub use re_types_core::{ Archetype, ArchetypeName, AsComponents, Component, ComponentBatch, ComponentBatchCow, ComponentBatchCowWithDescriptor, ComponentDescriptor, ComponentName, DatatypeName, DeserializationError, DeserializationResult, GenericIndicatorComponent, Loggable, - LoggableBatch, NamedIndicatorComponent, SerializationError, SerializationResult, SizeBytes, + LoggableBatch, NamedIndicatorComponent, SerializationError, SerializationResult, }; +pub use re_byte_size::SizeBytes; + #[cfg(feature = "data_loaders")] pub use re_data_loader::{DataLoader, DataLoaderError, DataLoaderSettings, LoadedData}; diff --git a/crates/top/rerun/Cargo.toml b/crates/top/rerun/Cargo.toml index 7c3aa2e113d7..5b4ee234beb2 100644 --- a/crates/top/rerun/Cargo.toml +++ b/crates/top/rerun/Cargo.toml @@ -124,6 +124,7 @@ web_viewer = ["server", "dep:re_web_viewer_server", "re_sdk?/web_viewer"] [dependencies] re_build_info.workspace = true +re_byte_size.workspace = true re_capabilities.workspace = true re_chunk.workspace = true re_crash_handler.workspace = true diff --git a/crates/top/rerun/src/commands/rrd/print.rs b/crates/top/rerun/src/commands/rrd/print.rs index f5145f62fb20..d0ef673f9058 100644 --- a/crates/top/rerun/src/commands/rrd/print.rs +++ b/crates/top/rerun/src/commands/rrd/print.rs @@ -1,9 +1,9 @@ use anyhow::Context; use itertools::Itertools; +use re_byte_size::SizeBytes as _; use re_log_types::{LogMsg, SetStoreInfo}; use re_sdk::log::Chunk; -use re_types::SizeBytes as _; use crate::commands::read_rrd_streams_from_file_or_stdin; diff --git a/crates/utils/re_byte_size/Cargo.toml b/crates/utils/re_byte_size/Cargo.toml new file mode 100644 index 000000000000..6cf0e1858b4b --- /dev/null +++ b/crates/utils/re_byte_size/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "re_byte_size" +authors.workspace = true +description = "Calculate the heap-allocated size of values at runtime." +edition.workspace = true +homepage.workspace = true +include.workspace = true +license.workspace = true +publish = true +readme = "README.md" +repository.workspace = true +rust-version.workspace = true +version.workspace = true + +[lints] +workspace = true + +[package.metadata.docs.rs] +all-features = true + + +[features] + + +[dependencies] +# TODO(emilk): make some of these opt-in +arrow.workspace = true +arrow2.workspace = true +half.workspace = true +smallvec.workspace = true +re_tuid.workspace = true # TODO(emilk): maybe re_tuid should depend on re_byte_size instead? diff --git a/crates/utils/re_byte_size/README.md b/crates/utils/re_byte_size/README.md new file mode 100644 index 000000000000..f162264ac63f --- /dev/null +++ b/crates/utils/re_byte_size/README.md @@ -0,0 +1,10 @@ +# re_byte_size + +Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. + +[![Latest version](https://img.shields.io/crates/v/re_byte_size.svg)](https://crates.io/crates/re_byte_size?speculative-link) +[![Documentation](https://docs.rs/re_byte_size/badge.svg)](https://docs.rs/re_byte_size?speculative-link) +![MIT](https://img.shields.io/badge/license-MIT-blue.svg) +![Apache](https://img.shields.io/badge/license-Apache-blue.svg) + +Calculate the heap-allocated size of values at runtime. diff --git a/crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs b/crates/utils/re_byte_size/src/arrow2_sizes.rs similarity index 99% rename from crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs rename to crates/utils/re_byte_size/src/arrow2_sizes.rs index 5a4b5f3a1b15..ddac7760dc41 100644 --- a/crates/store/re_types_core/src/size_bytes/arrow2_sizes.rs +++ b/crates/utils/re_byte_size/src/arrow2_sizes.rs @@ -93,6 +93,8 @@ fn validity_size(validity: Option<&Bitmap>) -> usize { /// /// FFI buffers are included in this estimation. fn estimated_bytes_size(array: &dyn Array) -> usize { + #![allow(clippy::unwrap_used)] // We check the type first + // NOTE: `.len()` is the number of elements in an arrow2 buffer // no matter WHAT the documentation says. // See https://github.com/jorgecarleitao/arrow2/issues/1430 diff --git a/crates/store/re_types_core/src/size_bytes/arrow_sizes.rs b/crates/utils/re_byte_size/src/arrow_sizes.rs similarity index 100% rename from crates/store/re_types_core/src/size_bytes/arrow_sizes.rs rename to crates/utils/re_byte_size/src/arrow_sizes.rs diff --git a/crates/utils/re_byte_size/src/lib.rs b/crates/utils/re_byte_size/src/lib.rs new file mode 100644 index 000000000000..3459d5d21b5b --- /dev/null +++ b/crates/utils/re_byte_size/src/lib.rs @@ -0,0 +1,47 @@ +//! Calculate the heap-allocated size of values at runtime. + +mod arrow2_sizes; +mod arrow_sizes; +mod primitive_sizes; +mod smallvec_sizes; +mod std_sizes; +mod tuple_sizes; + +// --- + +/// Approximations of stack and heap size for both internal and external types. +/// +/// Motly used for statistics and triggering events such as garbage collection. +pub trait SizeBytes { + /// Returns the total size of `self` in bytes, accounting for both stack and heap space. + #[inline] + fn total_size_bytes(&self) -> u64 { + self.stack_size_bytes() + self.heap_size_bytes() + } + + /// Returns the total size of `self` on the stack, in bytes. + /// + /// Defaults to `std::mem::size_of_val(self)`. + #[inline] + fn stack_size_bytes(&self) -> u64 { + std::mem::size_of_val(self) as _ + } + + /// Returns the total size of `self` on the heap, in bytes. + fn heap_size_bytes(&self) -> u64; + + /// Is `Self` just plain old data? + /// + /// If `true`, this will make most blanket implementations of `SizeBytes` much faster (e.g. `Vec`). + #[inline] + fn is_pod() -> bool { + false + } +} + +impl SizeBytes for re_tuid::Tuid { + #[inline] + fn heap_size_bytes(&self) -> u64 { + 0 + } +} diff --git a/crates/utils/re_byte_size/src/primitive_sizes.rs b/crates/utils/re_byte_size/src/primitive_sizes.rs new file mode 100644 index 000000000000..d66b5e5fc57c --- /dev/null +++ b/crates/utils/re_byte_size/src/primitive_sizes.rs @@ -0,0 +1,28 @@ +use crate::SizeBytes; + +// TODO(rust-lang/rust#31844): This isn't happening without specialization. +// impl SizeBytes for T where T: bytemuck::Pod { … } + +// TODO(rust-lang/rust#31844): `impl SizeBytesExt for T {}` would be nice but +// violates orphan rules. +macro_rules! impl_size_bytes_pod { + ($ty:ty) => { + impl SizeBytes for $ty { + #[inline] + fn heap_size_bytes(&self) -> u64 { + 0 + } + + #[inline] + fn is_pod() -> bool { + true + } + } + }; + ($ty:ty, $($rest:ty),+) => { + impl_size_bytes_pod!($ty); impl_size_bytes_pod!($($rest),+); + }; +} + +impl_size_bytes_pod!(u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, bool, f32, f64); +impl_size_bytes_pod!(half::f16); diff --git a/crates/utils/re_byte_size/src/smallvec_sizes.rs b/crates/utils/re_byte_size/src/smallvec_sizes.rs new file mode 100644 index 000000000000..468b52d6457f --- /dev/null +++ b/crates/utils/re_byte_size/src/smallvec_sizes.rs @@ -0,0 +1,27 @@ +use smallvec::SmallVec; + +use crate::SizeBytes; + +impl SizeBytes for SmallVec<[T; N]> { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + if self.len() <= N { + // The `SmallVec` is still smaller than the threshold so no heap data has been + // allocated yet, beyond the heap data each element might have. + + if T::is_pod() { + 0 // early-out + } else { + self.iter().map(SizeBytes::heap_size_bytes).sum::() + } + } else { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } + } +} diff --git a/crates/utils/re_byte_size/src/std_sizes.rs b/crates/utils/re_byte_size/src/std_sizes.rs new file mode 100644 index 000000000000..063a2bbfbb6b --- /dev/null +++ b/crates/utils/re_byte_size/src/std_sizes.rs @@ -0,0 +1,132 @@ +//! Implement [`SizeBytes`] for things in the standard library. + +use std::{ + collections::{BTreeMap, BTreeSet, HashMap, VecDeque}, + sync::Arc, +}; + +use crate::SizeBytes; + +impl SizeBytes for String { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.as_bytes().len() as u64 + } +} + +impl SizeBytes for BTreeMap { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + let keys_size_bytes = if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.keys().map(SizeBytes::total_size_bytes).sum::() + }; + + let values_size_bytes = if V::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.values().map(SizeBytes::total_size_bytes).sum::() + }; + + keys_size_bytes + values_size_bytes + } +} + +impl SizeBytes for BTreeSet { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for HashMap { + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + + let keys_size_bytes = if K::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.keys().map(SizeBytes::total_size_bytes).sum::() + }; + + let values_size_bytes = if V::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.values().map(SizeBytes::total_size_bytes).sum::() + }; + + keys_size_bytes + values_size_bytes + } +} + +// NOTE: Do _not_ implement `SizeBytes` for slices: we cannot know whether they point to the stack +// or the heap! + +impl SizeBytes for [T; N] { + #[inline] + fn heap_size_bytes(&self) -> u64 { + if T::is_pod() { + 0 // it's a const-sized array + } else { + self.iter().map(SizeBytes::heap_size_bytes).sum::() + } + } +} + +impl SizeBytes for Vec { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for VecDeque { + /// Does not take capacity into account. + #[inline] + fn heap_size_bytes(&self) -> u64 { + // NOTE: It's all on the heap at this point. + if T::is_pod() { + (self.len() * std::mem::size_of::()) as _ + } else { + self.iter().map(SizeBytes::total_size_bytes).sum::() + } + } +} + +impl SizeBytes for Option { + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.as_ref().map_or(0, SizeBytes::heap_size_bytes) + } +} + +impl SizeBytes for Arc { + #[inline] + fn heap_size_bytes(&self) -> u64 { + 0 // assume it's amortized + } +} + +impl SizeBytes for Box { + #[inline] + fn heap_size_bytes(&self) -> u64 { + T::total_size_bytes(&**self) + } +} diff --git a/crates/utils/re_byte_size/src/tuple_sizes.rs b/crates/utils/re_byte_size/src/tuple_sizes.rs new file mode 100644 index 000000000000..3476bccfdbc8 --- /dev/null +++ b/crates/utils/re_byte_size/src/tuple_sizes.rs @@ -0,0 +1,55 @@ +use crate::SizeBytes; + +impl SizeBytes for (T, U) +where + T: SizeBytes, + U: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b) = self; + a.heap_size_bytes() + b.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() + } +} + +impl SizeBytes for (T, U, V) +where + T: SizeBytes, + U: SizeBytes, + V: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b, c) = self; + a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() && V::is_pod() + } +} + +impl SizeBytes for (T, U, V, W) +where + T: SizeBytes, + U: SizeBytes, + V: SizeBytes, + W: SizeBytes, +{ + #[inline] + fn heap_size_bytes(&self) -> u64 { + let (a, b, c, d) = self; + a.heap_size_bytes() + b.heap_size_bytes() + c.heap_size_bytes() + d.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + T::is_pod() && U::is_pod() && V::is_pod() && W::is_pod() + } +} diff --git a/crates/utils/re_tuid/src/lib.rs b/crates/utils/re_tuid/src/lib.rs index b95d8bd9fec9..5a19ef51df71 100644 --- a/crates/utils/re_tuid/src/lib.rs +++ b/crates/utils/re_tuid/src/lib.rs @@ -24,16 +24,6 @@ impl Tuid { /// as a hack so that we can compactly format them when printing Arrow data to the terminal. /// Check out `re_format_arrow` for context. pub const NAME: &'static str = "rerun.datatypes.TUID"; - - /// Returns the total size of `self` on the heap, in bytes. - /// - /// NOTE: This crate cannot depend on `re_types_core`, therefore the actual implementation of - /// `SizeBytes for Tuid` lives in `re_types_core` and calls this method. - #[inline] - pub fn heap_size_bytes(&self) -> u64 { - let Self { time_ns: _, inc: _ } = self; - 0 - } } impl std::fmt::Display for Tuid { diff --git a/crates/viewer/re_chunk_store_ui/Cargo.toml b/crates/viewer/re_chunk_store_ui/Cargo.toml index 89b5bc61f0ec..36b820ea6e96 100644 --- a/crates/viewer/re_chunk_store_ui/Cargo.toml +++ b/crates/viewer/re_chunk_store_ui/Cargo.toml @@ -19,6 +19,7 @@ workspace = true all-features = true [dependencies] +re_byte_size.workspace = true re_chunk_store.workspace = true re_format.workspace = true re_log_types.workspace = true diff --git a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs index f3ee0ef8abd3..ec575ac9fcb1 100644 --- a/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/arrow_ui.rs @@ -1,8 +1,8 @@ use itertools::Itertools; +use re_byte_size::SizeBytes as _; use re_chunk_store::external::arrow2; use re_chunk_store::external::arrow2::array::Utf8Array; -use re_types::SizeBytes as _; use re_ui::UiExt; // Note: this is copied and heavily modified from `re_data_ui`. We don't want to unify them because diff --git a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs index d7283f48a6a5..95172867413a 100644 --- a/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs +++ b/crates/viewer/re_chunk_store_ui/src/chunk_ui.rs @@ -4,9 +4,9 @@ use std::sync::Arc; use egui_extras::{Column, TableRow}; use itertools::Itertools; +use re_byte_size::SizeBytes; use re_chunk_store::external::re_chunk::{Arrow2Array, TransportChunk}; use re_chunk_store::Chunk; -use re_log_types::external::re_types_core::SizeBytes; use re_log_types::{TimeZone, Timeline}; use re_types::datatypes::TimeInt; use re_ui::{list_item, UiExt}; diff --git a/crates/viewer/re_component_ui/Cargo.toml b/crates/viewer/re_component_ui/Cargo.toml index 42db39072dab..3bf6e52532fe 100644 --- a/crates/viewer/re_component_ui/Cargo.toml +++ b/crates/viewer/re_component_ui/Cargo.toml @@ -19,8 +19,9 @@ workspace = true all-features = true [dependencies] -re_data_ui.workspace = true # Needed for `item_ui`. +re_byte_size.workspace = true re_data_source.workspace = true +re_data_ui.workspace = true # Needed for `item_ui`. re_format.workspace = true re_log.workspace = true re_log_types.workspace = true diff --git a/crates/viewer/re_component_ui/src/fallback_ui.rs b/crates/viewer/re_component_ui/src/fallback_ui.rs index 73ddab380bea..31b6c27ff1bd 100644 --- a/crates/viewer/re_component_ui/src/fallback_ui.rs +++ b/crates/viewer/re_component_ui/src/fallback_ui.rs @@ -31,7 +31,7 @@ fn arrow_ui(ui: &mut egui::Ui, ui_layout: UiLayout, array: &dyn arrow::array::Ar } fn arrow2_ui(ui: &mut egui::Ui, ui_layout: UiLayout, array: &dyn arrow2::array::Array) { - use re_types::SizeBytes as _; + use re_byte_size::SizeBytes as _; // Special-treat text. // Note: we match on the raw data here, so this works for any component containing text. diff --git a/crates/viewer/re_data_ui/Cargo.toml b/crates/viewer/re_data_ui/Cargo.toml index 5cec64d98580..0ffb3549fc3c 100644 --- a/crates/viewer/re_data_ui/Cargo.toml +++ b/crates/viewer/re_data_ui/Cargo.toml @@ -19,6 +19,7 @@ workspace = true all-features = true [dependencies] +re_byte_size.workspace = true re_capabilities = { workspace = true, features = ["egui"] } re_chunk_store.workspace = true re_entity_db.workspace = true diff --git a/crates/viewer/re_data_ui/src/entity_db.rs b/crates/viewer/re_data_ui/src/entity_db.rs index 5d2a5e33fe52..ffa031e62744 100644 --- a/crates/viewer/re_data_ui/src/entity_db.rs +++ b/crates/viewer/re_data_ui/src/entity_db.rs @@ -1,7 +1,7 @@ +use re_byte_size::SizeBytes; use re_chunk_store::ChunkStoreConfig; use re_entity_db::EntityDb; use re_log_types::StoreKind; -use re_types::SizeBytes; use re_ui::UiExt as _; use re_viewer_context::{UiLayout, ViewerContext}; diff --git a/crates/viewer/re_data_ui/src/item_ui.rs b/crates/viewer/re_data_ui/src/item_ui.rs index 6526276ab9ec..1005e60fb5ae 100644 --- a/crates/viewer/re_data_ui/src/item_ui.rs +++ b/crates/viewer/re_data_ui/src/item_ui.rs @@ -732,7 +732,7 @@ pub fn entity_db_button_ui( entity_db: &re_entity_db::EntityDb, include_app_id: bool, ) { - use re_types_core::SizeBytes as _; + use re_byte_size::SizeBytes as _; use re_viewer_context::{SystemCommand, SystemCommandSender as _}; let app_id_prefix = if include_app_id { diff --git a/crates/viewer/re_ui/src/arrow_ui.rs b/crates/viewer/re_ui/src/arrow_ui.rs new file mode 100644 index 000000000000..10398d6e771b --- /dev/null +++ b/crates/viewer/re_ui/src/arrow_ui.rs @@ -0,0 +1,79 @@ +use itertools::Itertools as _; + +use crate::UiExt as _; +use re_byte_size::SizeBytes as _; + +use arrow2::array::Utf8Array; + +pub(crate) fn arrow_ui(ui: &mut egui::Ui, array: &dyn arrow2::array::Array) { + ui.scope(|ui| { + ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Truncate); + + // Special-treat text. + // Note: we match on the raw data here, so this works for any component containing text. + if let Some(utf8) = array.as_any().downcast_ref::>() { + if utf8.len() == 1 { + let string = utf8.value(0); + ui.monospace(string); + return; + } + } + if let Some(utf8) = array.as_any().downcast_ref::>() { + if utf8.len() == 1 { + let string = utf8.value(0); + ui.monospace(string); + return; + } + } + + let num_bytes = array.total_size_bytes(); + if num_bytes < 3000 { + if array.is_empty() { + ui.monospace("[]"); + return; + } + + let instance_count = array.len(); + let display = arrow2::array::get_display(array, "null"); + + if instance_count == 1 { + let mut string = String::new(); + match display(&mut string, 0) { + Ok(_) => ui.monospace(&string), + Err(err) => ui.error_with_details_on_hover(err.to_string()), + }; + return; + } else { + ui.label(format!("{instance_count} items")) + .on_hover_ui(|ui| { + ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Wrap); + ui.monospace(format!( + "[{}]", + (0..instance_count) + .filter_map(|index| { + let mut s = String::new(); + //TODO(ab): should we care about errors here? + display(&mut s, index).ok().map(|_| s) + }) + .join(", ") + )); + }); + } + + return; + } + + // Fallback: + let bytes = re_format::format_bytes(num_bytes as _); + + let data_type_formatted = format!("{:?}", array.data_type()); + + if data_type_formatted.len() < 20 { + // e.g. "4.2 KiB of Float32" + ui.label(format!("{bytes} of {data_type_formatted}")); + } else { + // Huge datatype, probably a union horror show + ui.label(format!("{bytes} of data")); + } + }); +} diff --git a/examples/rust/extend_viewer_ui/src/main.rs b/examples/rust/extend_viewer_ui/src/main.rs index 7c8cb9918133..dbd3d8ece57c 100644 --- a/examples/rust/extend_viewer_ui/src/main.rs +++ b/examples/rust/extend_viewer_ui/src/main.rs @@ -1,7 +1,8 @@ //! This example shows how to wrap the Rerun Viewer in your own GUI. use re_viewer::external::{ - arrow2, eframe, egui, re_chunk_store, re_entity_db, re_log, re_log_types, re_memory, re_types, + arrow2, eframe, egui, re_byte_size, re_chunk_store, re_entity_db, re_log, re_log_types, + re_memory, re_types, }; // By using `re_memory::AccountingAllocator` Rerun can keep track of exactly how much memory it is using, @@ -178,7 +179,7 @@ fn component_ui( } fn format_arrow2(value: &dyn arrow2::array::Array) -> String { - use re_types::SizeBytes as _; + use re_byte_size::SizeBytes as _; let bytes = value.total_size_bytes(); if bytes < 256 { From 8731f3435fb92d9a2fca10ea8e26ea05f2702e7f Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 20 Dec 2024 10:29:55 +0100 Subject: [PATCH 10/11] Remove deprecated `DisconnectedSpace` archetype & component (#8545) ### Related * Fixes https://github.com/rerun-io/rerun/issues/6817 * because, well, it got removed ### What As planned, removed `DisconnectedSpace` which was deprecated in 0.21 This makes `SpatialTopology` & `TransformContext` a little bit simpler, one thing less to take into account. Further simplifications should be possible now, but one thing at a time. --------- Co-authored-by: Clement Rey --- Cargo.lock | 10 - .../re_types/definitions/rerun/archetypes.fbs | 1 - .../rerun/archetypes/disconnected_space.fbs | 18 -- .../re_types/definitions/rerun/components.fbs | 1 - .../rerun/components/disconnected_space.fbs | 24 -- .../re_types/src/archetypes/.gitattributes | 1 - .../src/archetypes/disconnected_space.rs | 232 ------------------ crates/store/re_types/src/archetypes/mod.rs | 4 - .../re_types/src/components/.gitattributes | 1 - .../src/components/disconnected_space.rs | 118 --------- .../src/components/disconnected_space_ext.rs | 10 - crates/store/re_types/src/components/mod.rs | 5 - crates/store/re_types/src/reflection/mod.rs | 23 -- .../tests/types/disconnected_space.rs | 61 ----- crates/store/re_types/tests/types/main.rs | 1 - .../src/contexts/transform_context.rs | 28 +-- .../re_view_spatial/src/spatial_topology.rs | 90 +------ .../src/transform_component_tracker.rs | 13 - crates/viewer/re_view_spatial/src/view_2d.rs | 18 +- crates/viewer/re_view_spatial/src/view_3d.rs | 4 +- .../content/concepts/spaces-and-transforms.md | 1 - .../reference/migration/migration-0-13.md | 4 +- .../reference/migration/migration-0-22.md | 18 ++ .../reference/migration/migration-0-9.md | 4 +- docs/content/reference/types/archetypes.md | 1 - .../reference/types/archetypes/.gitattributes | 1 - .../types/archetypes/disconnected_space.md | 43 ---- docs/content/reference/types/components.md | 1 - .../reference/types/components/.gitattributes | 1 - .../types/components/disconnected_space.md | 33 --- .../content/reference/types/datatypes/bool.md | 1 - .../reference/types/views/spatial2d_view.md | 1 - .../reference/types/views/spatial3d_view.md | 1 - docs/snippets/INDEX.md | 3 - .../all/archetypes/disconnected_space.cpp | 19 -- .../all/archetypes/disconnected_space.py | 13 - .../all/archetypes/disconnected_space.rs | 28 --- rerun_cpp/src/rerun/archetypes.hpp | 1 - rerun_cpp/src/rerun/archetypes/.gitattributes | 2 - .../rerun/archetypes/disconnected_space.cpp | 45 ---- .../rerun/archetypes/disconnected_space.hpp | 91 ------- rerun_cpp/src/rerun/components.hpp | 1 - rerun_cpp/src/rerun/components/.gitattributes | 1 - .../rerun/components/disconnected_space.hpp | 92 ------- .../tests/archetypes/disconnected_space.cpp | 19 -- rerun_py/docs/gen_common_index.py | 1 - rerun_py/rerun_sdk/rerun/__init__.py | 1 - .../rerun_sdk/rerun/archetypes/.gitattributes | 1 - .../rerun_sdk/rerun/archetypes/__init__.py | 2 - .../rerun/archetypes/disconnected_space.py | 83 ------- .../archetypes/disconnected_space_ext.py | 28 --- .../rerun_sdk/rerun/components/.gitattributes | 1 - .../rerun_sdk/rerun/components/__init__.py | 3 - .../rerun/components/disconnected_space.py | 44 ---- .../components/disconnected_space_ext.py | 24 -- .../roundtrips/disconnected_space/main.cpp | 14 -- .../check_all_components_ui.py | 1 - .../roundtrips/disconnected_space/main.py | 25 -- tests/python/test_api/test_api.py | 5 +- .../roundtrips/disconnected_space/Cargo.toml | 17 -- .../roundtrips/disconnected_space/src/main.rs | 31 --- 61 files changed, 47 insertions(+), 1322 deletions(-) delete mode 100644 crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs delete mode 100644 crates/store/re_types/definitions/rerun/components/disconnected_space.fbs delete mode 100644 crates/store/re_types/src/archetypes/disconnected_space.rs delete mode 100644 crates/store/re_types/src/components/disconnected_space.rs delete mode 100644 crates/store/re_types/src/components/disconnected_space_ext.rs delete mode 100644 crates/store/re_types/tests/types/disconnected_space.rs create mode 100644 docs/content/reference/migration/migration-0-22.md delete mode 100644 docs/content/reference/types/archetypes/disconnected_space.md delete mode 100644 docs/content/reference/types/components/disconnected_space.md delete mode 100644 docs/snippets/all/archetypes/disconnected_space.cpp delete mode 100644 docs/snippets/all/archetypes/disconnected_space.py delete mode 100644 docs/snippets/all/archetypes/disconnected_space.rs delete mode 100644 rerun_cpp/src/rerun/archetypes/disconnected_space.cpp delete mode 100644 rerun_cpp/src/rerun/archetypes/disconnected_space.hpp delete mode 100644 rerun_cpp/src/rerun/components/disconnected_space.hpp delete mode 100644 rerun_cpp/tests/archetypes/disconnected_space.cpp delete mode 100644 rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py delete mode 100644 rerun_py/rerun_sdk/rerun/archetypes/disconnected_space_ext.py delete mode 100644 rerun_py/rerun_sdk/rerun/components/disconnected_space.py delete mode 100644 rerun_py/rerun_sdk/rerun/components/disconnected_space_ext.py delete mode 100644 tests/cpp/roundtrips/disconnected_space/main.cpp delete mode 100644 tests/python/roundtrips/disconnected_space/main.py delete mode 100644 tests/rust/roundtrips/disconnected_space/Cargo.toml delete mode 100644 tests/rust/roundtrips/disconnected_space/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index cc5951d3b51d..8103ce57341b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7483,16 +7483,6 @@ dependencies = [ "rerun", ] -[[package]] -name = "roundtrip_disconnected_space" -version = "0.22.0-alpha.1+dev" -dependencies = [ - "anyhow", - "clap", - "re_log", - "rerun", -] - [[package]] name = "roundtrip_image" version = "0.22.0-alpha.1+dev" diff --git a/crates/store/re_types/definitions/rerun/archetypes.fbs b/crates/store/re_types/definitions/rerun/archetypes.fbs index e2e78c427d09..4218e5391e58 100644 --- a/crates/store/re_types/definitions/rerun/archetypes.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes.fbs @@ -11,7 +11,6 @@ include "./archetypes/boxes3d.fbs"; include "./archetypes/capsules3d.fbs"; include "./archetypes/clear.fbs"; include "./archetypes/depth_image.fbs"; -include "./archetypes/disconnected_space.fbs"; include "./archetypes/ellipsoids3d.fbs"; include "./archetypes/encoded_image.fbs"; include "./archetypes/geo_line_strings.fbs"; diff --git a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs deleted file mode 100644 index 319658c4c319..000000000000 --- a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs +++ /dev/null @@ -1,18 +0,0 @@ -namespace rerun.archetypes; - -/// Spatially disconnect this entity from its parent. -/// -/// Specifies that the entity path at which this is logged is spatially disconnected from its parent, -/// making it impossible to transform the entity path into its parent's space and vice versa. -/// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -/// This is useful for specifying that a subgraph is independent of the rest of the scene. -/// -/// \example archetypes/disconnected_space title="Disconnected space" image="https://static.rerun.io/disconnected_space/709041fc304b50c74db773b780e32294fe90c95f/1200w.png" -table DisconnectedSpace ( - "attr.rerun.deprecated": "Use [archetypes.Transform3D] with an invalid transform instead", - "attr.rust.derive": "Copy, PartialEq, Eq", - "attr.docs.view_types": "Spatial2DView, Spatial3DView" -) { - /// Whether the entity path at which this is logged is disconnected from its parent. - disconnected_space: rerun.components.DisconnectedSpace ("attr.rerun.component_required", order: 1000); -} diff --git a/crates/store/re_types/definitions/rerun/components.fbs b/crates/store/re_types/definitions/rerun/components.fbs index 4dc580313dc2..c08679c587bc 100644 --- a/crates/store/re_types/definitions/rerun/components.fbs +++ b/crates/store/re_types/definitions/rerun/components.fbs @@ -10,7 +10,6 @@ include "./components/clear_is_recursive.fbs"; include "./components/color.fbs"; include "./components/colormap.fbs"; include "./components/depth_meter.fbs"; -include "./components/disconnected_space.fbs"; include "./components/draw_order.fbs"; include "./components/entity_path.fbs"; include "./components/fill_mode.fbs"; diff --git a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs deleted file mode 100644 index 900ed7a3b4b7..000000000000 --- a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs +++ /dev/null @@ -1,24 +0,0 @@ - -namespace rerun.components; - -// --- - -/// Spatially disconnect this entity from its parent. -/// -/// Specifies that the entity path at which this is logged is spatially disconnected from its parent, -/// making it impossible to transform the entity path into its parent's space and vice versa. -/// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -/// This is useful for specifying that a subgraph is independent of the rest of the scene. -struct DisconnectedSpace ( - "attr.rerun.deprecated": "Use [archetypes.Transform3D] with an invalid transform instead.", - "attr.python.aliases": "bool", - "attr.python.array_aliases": "bool, npt.NDArray[np.bool_]", - "attr.rust.derive": "Copy, PartialEq, Eq" -) { - /// Whether the entity path at which this is logged is disconnected from its parent. - /// - /// Set to true to disconnect the entity from its parent. - /// Set to false to disable the effects of this component - /// TODO(#7121): Once a space is disconnected, it can't be re-connected again. - is_disconnected: rerun.datatypes.Bool (order: 100); -} diff --git a/crates/store/re_types/src/archetypes/.gitattributes b/crates/store/re_types/src/archetypes/.gitattributes index 47e1b0870bce..bfc149358a06 100644 --- a/crates/store/re_types/src/archetypes/.gitattributes +++ b/crates/store/re_types/src/archetypes/.gitattributes @@ -11,7 +11,6 @@ boxes2d.rs linguist-generated=true boxes3d.rs linguist-generated=true capsules3d.rs linguist-generated=true depth_image.rs linguist-generated=true -disconnected_space.rs linguist-generated=true ellipsoids3d.rs linguist-generated=true encoded_image.rs linguist-generated=true geo_line_strings.rs linguist-generated=true diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs deleted file mode 100644 index 7fd70ca34985..000000000000 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ /dev/null @@ -1,232 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs -// Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". - -#![allow(unused_imports)] -#![allow(unused_parens)] -#![allow(clippy::clone_on_copy)] -#![allow(clippy::cloned_instead_of_copied)] -#![allow(clippy::map_flatten)] -#![allow(clippy::needless_question_mark)] -#![allow(clippy::new_without_default)] -#![allow(clippy::redundant_closure)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::too_many_lines)] -#![allow(deprecated)] - -use ::re_types_core::external::arrow2; -use ::re_types_core::SerializationResult; -use ::re_types_core::{ComponentBatch, ComponentBatchCowWithDescriptor}; -use ::re_types_core::{ComponentDescriptor, ComponentName}; -use ::re_types_core::{DeserializationError, DeserializationResult}; - -/// **Archetype**: Spatially disconnect this entity from its parent. -/// -/// Specifies that the entity path at which this is logged is spatially disconnected from its parent, -/// making it impossible to transform the entity path into its parent's space and vice versa. -/// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -/// This is useful for specifying that a subgraph is independent of the rest of the scene. -/// -/// ## Example -/// -/// ### Disconnected space -/// ```ignore -/// // `DisconnectedSpace` is deprecated and will be removed in the future. -/// // Use an invalid transform (e.g. zeroed out 3x3 matrix) instead. -/// #![allow(deprecated)] -/// -/// fn main() -> Result<(), Box> { -/// let rec = rerun::RecordingStreamBuilder::new("rerun_example_disconnected_space").spawn()?; -/// -/// // These two points can be projected into the same space.. -/// rec.log( -/// "world/room1/point", -/// &rerun::Points3D::new([(0.0, 0.0, 0.0)]), -/// )?; -/// rec.log( -/// "world/room2/point", -/// &rerun::Points3D::new([(1.0, 1.0, 1.0)]), -/// )?; -/// -/// // ..but this one lives in a completely separate space! -/// rec.log("world/wormhole", &rerun::DisconnectedSpace::new(true))?; -/// rec.log( -/// "world/wormhole/point", -/// &rerun::Points3D::new([(2.0, 2.0, 2.0)]), -/// )?; -/// -/// Ok(()) -/// } -/// ``` -///
-/// -/// -/// -/// -/// -/// -/// -///
-#[derive(Clone, Debug, Copy, PartialEq, Eq)] -#[deprecated(note = "Use [archetypes.Transform3D] with an invalid transform instead")] -pub struct DisconnectedSpace { - /// Whether the entity path at which this is logged is disconnected from its parent. - pub disconnected_space: crate::components::DisconnectedSpace, -} - -static REQUIRED_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 1usize]> = - once_cell::sync::Lazy::new(|| { - [ComponentDescriptor { - archetype_name: Some("rerun.archetypes.DisconnectedSpace".into()), - component_name: "rerun.components.DisconnectedSpace".into(), - archetype_field_name: Some("disconnected_space".into()), - }] - }); - -static RECOMMENDED_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 1usize]> = - once_cell::sync::Lazy::new(|| { - [ComponentDescriptor { - archetype_name: Some("rerun.archetypes.DisconnectedSpace".into()), - component_name: "rerun.components.DisconnectedSpaceIndicator".into(), - archetype_field_name: None, - }] - }); - -static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 0usize]> = - once_cell::sync::Lazy::new(|| []); - -static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 2usize]> = - once_cell::sync::Lazy::new(|| { - [ - ComponentDescriptor { - archetype_name: Some("rerun.archetypes.DisconnectedSpace".into()), - component_name: "rerun.components.DisconnectedSpace".into(), - archetype_field_name: Some("disconnected_space".into()), - }, - ComponentDescriptor { - archetype_name: Some("rerun.archetypes.DisconnectedSpace".into()), - component_name: "rerun.components.DisconnectedSpaceIndicator".into(), - archetype_field_name: None, - }, - ] - }); - -impl DisconnectedSpace { - /// The total number of components in the archetype: 1 required, 1 recommended, 0 optional - pub const NUM_COMPONENTS: usize = 2usize; -} - -/// Indicator component for the [`DisconnectedSpace`] [`::re_types_core::Archetype`] -pub type DisconnectedSpaceIndicator = ::re_types_core::GenericIndicatorComponent; - -impl ::re_types_core::Archetype for DisconnectedSpace { - type Indicator = DisconnectedSpaceIndicator; - - #[inline] - fn name() -> ::re_types_core::ArchetypeName { - "rerun.archetypes.DisconnectedSpace".into() - } - - #[inline] - fn display_name() -> &'static str { - "Disconnected space" - } - - #[inline] - fn indicator() -> ComponentBatchCowWithDescriptor<'static> { - static INDICATOR: DisconnectedSpaceIndicator = DisconnectedSpaceIndicator::DEFAULT; - ComponentBatchCowWithDescriptor::new(&INDICATOR as &dyn ::re_types_core::ComponentBatch) - } - - #[inline] - fn required_components() -> ::std::borrow::Cow<'static, [ComponentDescriptor]> { - REQUIRED_COMPONENTS.as_slice().into() - } - - #[inline] - fn recommended_components() -> ::std::borrow::Cow<'static, [ComponentDescriptor]> { - RECOMMENDED_COMPONENTS.as_slice().into() - } - - #[inline] - fn optional_components() -> ::std::borrow::Cow<'static, [ComponentDescriptor]> { - OPTIONAL_COMPONENTS.as_slice().into() - } - - #[inline] - fn all_components() -> ::std::borrow::Cow<'static, [ComponentDescriptor]> { - ALL_COMPONENTS.as_slice().into() - } - - #[inline] - fn from_arrow2_components( - arrow_data: impl IntoIterator)>, - ) -> DeserializationResult { - re_tracing::profile_function!(); - use ::re_types_core::{Loggable as _, ResultExt as _}; - let arrays_by_name: ::std::collections::HashMap<_, _> = arrow_data - .into_iter() - .map(|(name, array)| (name.full_name(), array)) - .collect(); - let disconnected_space = { - let array = arrays_by_name - .get("rerun.components.DisconnectedSpace") - .ok_or_else(DeserializationError::missing_data) - .with_context("rerun.archetypes.DisconnectedSpace#disconnected_space")?; - ::from_arrow2_opt(&**array) - .with_context("rerun.archetypes.DisconnectedSpace#disconnected_space")? - .into_iter() - .next() - .flatten() - .ok_or_else(DeserializationError::missing_data) - .with_context("rerun.archetypes.DisconnectedSpace#disconnected_space")? - }; - Ok(Self { disconnected_space }) - } -} - -impl ::re_types_core::AsComponents for DisconnectedSpace { - fn as_component_batches(&self) -> Vec> { - re_tracing::profile_function!(); - use ::re_types_core::Archetype as _; - [ - Some(Self::indicator()), - (Some(&self.disconnected_space as &dyn ComponentBatch)).map(|batch| { - ::re_types_core::ComponentBatchCowWithDescriptor { - batch: batch.into(), - descriptor_override: Some(ComponentDescriptor { - archetype_name: Some("rerun.archetypes.DisconnectedSpace".into()), - archetype_field_name: Some(("disconnected_space").into()), - component_name: ("rerun.components.DisconnectedSpace").into(), - }), - } - }), - ] - .into_iter() - .flatten() - .collect() - } -} - -impl ::re_types_core::ArchetypeReflectionMarker for DisconnectedSpace {} - -impl DisconnectedSpace { - /// Create a new `DisconnectedSpace`. - #[inline] - pub fn new(disconnected_space: impl Into) -> Self { - Self { - disconnected_space: disconnected_space.into(), - } - } -} - -impl ::re_byte_size::SizeBytes for DisconnectedSpace { - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.disconnected_space.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - ::is_pod() - } -} diff --git a/crates/store/re_types/src/archetypes/mod.rs b/crates/store/re_types/src/archetypes/mod.rs index 2915cf90a60a..a7cc1e85a402 100644 --- a/crates/store/re_types/src/archetypes/mod.rs +++ b/crates/store/re_types/src/archetypes/mod.rs @@ -18,7 +18,6 @@ mod capsules3d; mod capsules3d_ext; mod depth_image; mod depth_image_ext; -mod disconnected_space; mod ellipsoids3d; mod ellipsoids3d_ext; mod encoded_image; @@ -92,6 +91,3 @@ pub use self::text_log::TextLog; pub use self::transform3d::Transform3D; pub use self::video_frame_reference::VideoFrameReference; pub use self::view_coordinates::ViewCoordinates; - -#[allow(deprecated)] -pub use self::disconnected_space::DisconnectedSpace; diff --git a/crates/store/re_types/src/components/.gitattributes b/crates/store/re_types/src/components/.gitattributes index 3cf54dbb31cb..f6c27200d3ff 100644 --- a/crates/store/re_types/src/components/.gitattributes +++ b/crates/store/re_types/src/components/.gitattributes @@ -10,7 +10,6 @@ class_id.rs linguist-generated=true color.rs linguist-generated=true colormap.rs linguist-generated=true depth_meter.rs linguist-generated=true -disconnected_space.rs linguist-generated=true draw_order.rs linguist-generated=true entity_path.rs linguist-generated=true fill_mode.rs linguist-generated=true diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs deleted file mode 100644 index 3a688c9c5a67..000000000000 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ /dev/null @@ -1,118 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs -// Based on "crates/store/re_types/definitions/rerun/components/disconnected_space.fbs". - -#![allow(unused_imports)] -#![allow(unused_parens)] -#![allow(clippy::clone_on_copy)] -#![allow(clippy::cloned_instead_of_copied)] -#![allow(clippy::map_flatten)] -#![allow(clippy::needless_question_mark)] -#![allow(clippy::new_without_default)] -#![allow(clippy::redundant_closure)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::too_many_lines)] -#![allow(deprecated)] - -use ::re_types_core::external::arrow2; -use ::re_types_core::SerializationResult; -use ::re_types_core::{ComponentBatch, ComponentBatchCowWithDescriptor}; -use ::re_types_core::{ComponentDescriptor, ComponentName}; -use ::re_types_core::{DeserializationError, DeserializationResult}; - -/// **Component**: Spatially disconnect this entity from its parent. -/// -/// Specifies that the entity path at which this is logged is spatially disconnected from its parent, -/// making it impossible to transform the entity path into its parent's space and vice versa. -/// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -/// This is useful for specifying that a subgraph is independent of the rest of the scene. -#[derive(Clone, Debug, Copy, PartialEq, Eq)] -#[deprecated(note = "Use [archetypes.Transform3D] with an invalid transform instead.")] -pub struct DisconnectedSpace( - /// Whether the entity path at which this is logged is disconnected from its parent. - /// - /// Set to true to disconnect the entity from its parent. - /// Set to false to disable the effects of this component - /// TODO(#7121): Once a space is disconnected, it can't be re-connected again. - pub crate::datatypes::Bool, -); - -impl ::re_types_core::Component for DisconnectedSpace { - #[inline] - fn descriptor() -> ComponentDescriptor { - ComponentDescriptor::new("rerun.components.DisconnectedSpace") - } -} - -::re_types_core::macros::impl_into_cow!(DisconnectedSpace); - -impl ::re_types_core::Loggable for DisconnectedSpace { - #[inline] - fn arrow_datatype() -> arrow::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() - } - - fn to_arrow_opt<'a>( - data: impl IntoIterator>>>, - ) -> SerializationResult - where - Self: Clone + 'a, - { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { - datum.map(|datum| match datum.into() { - ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), - ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), - }) - })) - } - - fn from_arrow2_opt( - arrow_data: &dyn arrow2::array::Array, - ) -> DeserializationResult>> - where - Self: Sized, - { - crate::datatypes::Bool::from_arrow2_opt(arrow_data) - .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) - } -} - -impl> From for DisconnectedSpace { - fn from(v: T) -> Self { - Self(v.into()) - } -} - -impl std::borrow::Borrow for DisconnectedSpace { - #[inline] - fn borrow(&self) -> &crate::datatypes::Bool { - &self.0 - } -} - -impl std::ops::Deref for DisconnectedSpace { - type Target = crate::datatypes::Bool; - - #[inline] - fn deref(&self) -> &crate::datatypes::Bool { - &self.0 - } -} - -impl std::ops::DerefMut for DisconnectedSpace { - #[inline] - fn deref_mut(&mut self) -> &mut crate::datatypes::Bool { - &mut self.0 - } -} - -impl ::re_byte_size::SizeBytes for DisconnectedSpace { - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.0.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - ::is_pod() - } -} diff --git a/crates/store/re_types/src/components/disconnected_space_ext.rs b/crates/store/re_types/src/components/disconnected_space_ext.rs deleted file mode 100644 index 189b5015d0a4..000000000000 --- a/crates/store/re_types/src/components/disconnected_space_ext.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(deprecated)] - -use super::DisconnectedSpace; - -impl Default for DisconnectedSpace { - #[inline] - fn default() -> Self { - Self(true.into()) - } -} diff --git a/crates/store/re_types/src/components/mod.rs b/crates/store/re_types/src/components/mod.rs index 8e327e644274..d1a4df006de3 100644 --- a/crates/store/re_types/src/components/mod.rs +++ b/crates/store/re_types/src/components/mod.rs @@ -15,8 +15,6 @@ mod colormap; mod colormap_ext; mod depth_meter; mod depth_meter_ext; -mod disconnected_space; -mod disconnected_space_ext; mod draw_order; mod draw_order_ext; mod entity_path; @@ -198,6 +196,3 @@ pub use self::vector2d::Vector2D; pub use self::vector3d::Vector3D; pub use self::video_timestamp::VideoTimestamp; pub use self::view_coordinates::ViewCoordinates; - -#[allow(deprecated)] -pub use self::disconnected_space::DisconnectedSpace; diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index 7318042dcd70..31cc885c6114 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -429,14 +429,6 @@ fn generate_component_reflection() -> Result::name(), - ComponentReflection { - docstring_md: "Spatially disconnect this entity from its parent.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nIt *only* applies to views that work with spatial transformations, i.e. 2D & 3D views.\nThis is useful for specifying that a subgraph is independent of the rest of the scene.", - custom_placeholder: Some(DisconnectedSpace::default().to_arrow()?), - datatype: DisconnectedSpace::arrow2_datatype(), - }, - ), ( ::name(), ComponentReflection { @@ -1263,21 +1255,6 @@ fn generate_archetype_reflection() -> ArchetypeReflectionMap { ], }, ), - ( - ArchetypeName::new("rerun.archetypes.DisconnectedSpace"), - ArchetypeReflection { - display_name: "Disconnected space", - scope: None, - view_types: &["Spatial2DView", "Spatial3DView"], - fields: vec![ - ArchetypeFieldReflection { name : "disconnected_space", display_name - : "Disconnected space", component_name : - "rerun.components.DisconnectedSpace".into(), docstring_md : - "Whether the entity path at which this is logged is disconnected from its parent.", - is_required : true, }, - ], - }, - ), ( ArchetypeName::new("rerun.archetypes.Ellipsoids3D"), ArchetypeReflection { diff --git a/crates/store/re_types/tests/types/disconnected_space.rs b/crates/store/re_types/tests/types/disconnected_space.rs deleted file mode 100644 index 94934f4f1b68..000000000000 --- a/crates/store/re_types/tests/types/disconnected_space.rs +++ /dev/null @@ -1,61 +0,0 @@ -#![allow(deprecated)] - -use std::collections::HashMap; - -use re_types::{archetypes::DisconnectedSpace, Archetype as _, AsComponents as _}; - -use crate::util; - -#[test] -fn roundtrip() { - let all_expected = [ - DisconnectedSpace { - disconnected_space: true.into(), - }, // - DisconnectedSpace { - disconnected_space: false.into(), - }, - ]; - - let all_arch = [ - DisconnectedSpace::new(true), // - DisconnectedSpace::new(false), // - ]; - - let expected_extensions: HashMap<_, _> = [ - ( - "disconnected_space", - vec!["rerun.components.DisconnectedSpace"], - ), // - ( - "disconnected_space", - vec!["rerun.components.DisconnectedSpace"], - ), // - ] - .into(); - - for (expected, arch) in all_expected.into_iter().zip(all_arch) { - similar_asserts::assert_eq!(expected, arch); - - eprintln!("arch = {arch:#?}"); - let serialized = arch.to_arrow2().unwrap(); - for (field, array) in &serialized { - // NOTE: Keep those around please, very useful when debugging. - // eprintln!("field = {field:#?}"); - // eprintln!("array = {array:#?}"); - eprintln!("{} = {array:#?}", field.name); - - // TODO(cmc): Re-enable extensions and these assertions once `arrow2-convert` - // has been fully replaced. - if false { - util::assert_extensions( - &**array, - expected_extensions[field.name.as_str()].as_slice(), - ); - } - } - - let deserialized = DisconnectedSpace::from_arrow2(serialized).unwrap(); - similar_asserts::assert_eq!(expected, deserialized); - } -} diff --git a/crates/store/re_types/tests/types/main.rs b/crates/store/re_types/tests/types/main.rs index bc40b1618a5e..72da61cedb86 100644 --- a/crates/store/re_types/tests/types/main.rs +++ b/crates/store/re_types/tests/types/main.rs @@ -13,7 +13,6 @@ mod box2d; mod box3d; mod clear; mod depth_image; -mod disconnected_space; mod line_strips2d; mod line_strips3d; mod mesh3d; diff --git a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs index b533536755a7..4e7cbc27eb5c 100644 --- a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs +++ b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs @@ -6,7 +6,7 @@ use re_entity_db::{EntityDb, EntityPath, EntityTree}; use re_types::{ archetypes::{InstancePoses3D, Pinhole, Transform3D}, components::{ - self, ImagePlaneDistance, PinholeProjection, PoseRotationAxisAngle, PoseRotationQuat, + ImagePlaneDistance, PinholeProjection, PoseRotationAxisAngle, PoseRotationQuat, PoseScale3D, PoseTransformMat3x3, PoseTranslation3D, RotationAxisAngle, RotationQuat, Scale3D, TransformMat3x3, TransformRelation, Translation3D, ViewCoordinates, }, @@ -111,9 +111,6 @@ impl TransformInfo { enum UnreachableTransformReason { /// More than one pinhole camera between this and the reference space. NestedPinholeCameras, - - /// Unknown transform between this and the reference space. - DisconnectedSpace, } /// Provides transforms from an entity to a chosen reference space for all elements in the scene @@ -169,8 +166,6 @@ impl ViewContextSystem for TransformContext { .map(|descr| descr.component_name) .collect(), std::iter::once(PinholeProjection::name()).collect(), - #[allow(deprecated)] // `DisconnectedSpace` is on the way out. - std::iter::once(components::DisconnectedSpace::name()).collect(), ] } @@ -821,24 +816,5 @@ fn transforms_at( } } - // If there is any other transform, we ignore `DisconnectedSpace`. - let no_other_transforms = transforms_at_entity - .parent_from_entity_tree_transform - .is_none() - && transforms_at_entity.entity_from_instance_poses.is_empty() - && transforms_at_entity - .instance_from_pinhole_image_plane - .is_none(); - - #[allow(deprecated)] // `DisconnectedSpace` is on the way out. - if no_other_transforms - && potential_transform_components.disconnected_space - && entity_db - .latest_at_component::(entity_path, query) - .map_or(false, |(_index, res)| **res) - { - Err(UnreachableTransformReason::DisconnectedSpace) - } else { - Ok(transforms_at_entity) - } + Ok(transforms_at_entity) } diff --git a/crates/viewer/re_view_spatial/src/spatial_topology.rs b/crates/viewer/re_view_spatial/src/spatial_topology.rs index e33c8ce6ae33..e279a025c9d1 100644 --- a/crates/viewer/re_view_spatial/src/spatial_topology.rs +++ b/crates/viewer/re_view_spatial/src/spatial_topology.rs @@ -1,6 +1,3 @@ -// `DisconnectedSpace` is still around, but to be removed. -#![allow(deprecated)] - use once_cell::sync::OnceCell; use ahash::HashMap; @@ -11,23 +8,14 @@ use re_chunk_store::{ }; use re_log_types::{EntityPath, EntityPathHash, StoreId}; use re_types::{ - components::{DisconnectedSpace, PinholeProjection, ViewCoordinates}, + components::{PinholeProjection, ViewCoordinates}, Component, }; bitflags::bitflags! { #[derive(PartialEq, Eq, Debug, Copy, Clone)] pub struct SubSpaceConnectionFlags: u8 { - const Disconnected = 0b0000001; - const Pinhole = 0b0000010; - } -} - -impl SubSpaceConnectionFlags { - /// Pinhole flag but not disconnected - #[inline] - pub fn is_connected_pinhole(&self) -> bool { - self.contains(Self::Pinhole) && !self.contains(Self::Disconnected) + const Pinhole = 0b0000001; } } @@ -39,9 +27,9 @@ bitflags::bitflags! { } } -/// Spatial subspace within we typically expect a homogeneous dimensionality without any projections & disconnects. +/// Spatial subspace within we typically expect a homogeneous dimensionality without any projections. /// -/// Subspaces are separated by projections or explicit disconnects. +/// Subspaces are separated by projections. /// /// A subspace may contain internal transforms, but any such transforms must be invertible such /// that all data can be represented regardless of choice of origin. @@ -69,8 +57,7 @@ pub struct SubSpace { /// Origin paths of child spaces. /// - /// This implies that there is a either an explicit disconnect or - /// a projection at the origin of the child space. + /// This implies that there is a projection at the origin of the child space. /// How it is connected is implied by `connection_to_parent` in the child space. /// /// Any path in `child_spaces` is *not* contained in `entities`. @@ -283,9 +270,7 @@ impl SpatialTopology { let mut new_heuristic_hints = HeuristicHints::empty(); for added_component in added_components { - if added_component == DisconnectedSpace::name() { - new_subspace_connections.insert(SubSpaceConnectionFlags::Disconnected); - } else if added_component == PinholeProjection::name() { + if added_component == PinholeProjection::name() { new_subspace_connections.insert(SubSpaceConnectionFlags::Pinhole); } else if added_component == ViewCoordinates::name() { new_heuristic_hints.insert(HeuristicHints::ViewCoordinates3d); @@ -434,7 +419,7 @@ impl SpatialTopology { mod tests { use re_log_types::EntityPath; use re_types::{ - components::{DisconnectedSpace, PinholeProjection, ViewCoordinates}, + components::{PinholeProjection, ViewCoordinates}, Component as _, ComponentName, }; @@ -478,16 +463,10 @@ mod tests { ); // Add splitting entities to the root space - this should not cause any splits. + #[allow(clippy::single_element_loop)] for (name, flags) in [ (PinholeProjection::name(), SubSpaceConnectionFlags::Pinhole), - ( - DisconnectedSpace::name(), - SubSpaceConnectionFlags::Pinhole | SubSpaceConnectionFlags::Disconnected, - ), - ( - ViewCoordinates::name(), - SubSpaceConnectionFlags::Pinhole | SubSpaceConnectionFlags::Disconnected, - ), + // Add future ways of splitting here (in the past `DisconnectedSpace` was used here). ] { add_diff(&mut topo, "", &[name]); let subspace = topo.subspace_for_entity(&"robo".into()); @@ -589,31 +568,6 @@ mod tests { ); } - // Disconnect the left camera. - add_diff( - &mut topo, - "robo/eyes/left/cam", - &[DisconnectedSpace::name()], - ); - { - let root = topo.subspace_for_entity(&"robo".into()); - let left_camera = topo.subspace_for_entity(&"robo/eyes/left/cam".into()); - let right_camera = topo.subspace_for_entity(&"robo/eyes/right/cam".into()); - - assert_eq!(left_camera.origin, "robo/eyes/left/cam".into()); - assert_eq!(left_camera.parent_space, root.origin.hash()); - assert_eq!( - left_camera.connection_to_parent, - SubSpaceConnectionFlags::Disconnected | SubSpaceConnectionFlags::Pinhole - ); - assert_eq!(right_camera.parent_space, root.origin.hash()); - assert_eq!( - right_camera.connection_to_parent, - SubSpaceConnectionFlags::Pinhole - ); - assert_eq!(root.connection_to_parent, SubSpaceConnectionFlags::empty()); - } - // Add view coordinates to robo. add_diff(&mut topo, "robo", &[ViewCoordinates::name()]); { @@ -659,32 +613,6 @@ mod tests { } } - #[test] - fn disconnected_pinhole() { - let mut topo = SpatialTopology::default(); - - add_diff(&mut topo, "stuff", &[]); - add_diff( - &mut topo, - "camera", - &[PinholeProjection::name(), DisconnectedSpace::name()], - ); - add_diff(&mut topo, "camera/image", &[]); - - check_paths_in_space(&topo, &["stuff"], "/"); - check_paths_in_space(&topo, &["camera", "camera/image"], "camera"); - - let cam = topo.subspace_for_entity(&"camera".into()); - assert_eq!( - cam.connection_to_parent, - SubSpaceConnectionFlags::Disconnected | SubSpaceConnectionFlags::Pinhole - ); - assert_eq!(cam.parent_space, EntityPath::root().hash()); - - let root = topo.subspace_for_entity(&"stuff".into()); - assert_eq!(root.connection_to_parent, SubSpaceConnectionFlags::empty()); - } - fn add_diff(topo: &mut SpatialTopology, path: &str, components: &[ComponentName]) { topo.on_store_diff(&path.into(), components.iter().copied()); } diff --git a/crates/viewer/re_view_spatial/src/transform_component_tracker.rs b/crates/viewer/re_view_spatial/src/transform_component_tracker.rs index a343d2fff3aa..7c951cafe693 100644 --- a/crates/viewer/re_view_spatial/src/transform_component_tracker.rs +++ b/crates/viewer/re_view_spatial/src/transform_component_tracker.rs @@ -21,9 +21,6 @@ pub struct PotentialTransformComponentSet { /// Whether the entity ever had a pinhole camera. pub pinhole: bool, - - /// Whether the entity ever had a disconnected space component. - pub disconnected_space: bool, } /// Keeps track of which entities have had any `Transform3D`-related data on any timeline at any @@ -136,16 +133,6 @@ impl PerStoreChunkSubscriber for TransformComponentTrackerStoreSubscriber { .or_default() .pinhole = true; } - // `DisconnectedSpace` is deprecated and will be removed in the future. - #[allow(deprecated)] - if component_name == re_types::components::DisconnectedSpace::name() - && contains_non_zero_component_array(component_name) - { - self.components_per_entity - .entry(entity_path_hash) - .or_default() - .disconnected_space = true; - } } } } diff --git a/crates/viewer/re_view_spatial/src/view_2d.rs b/crates/viewer/re_view_spatial/src/view_2d.rs index 724118f27275..1ed42c0201d7 100644 --- a/crates/viewer/re_view_spatial/src/view_2d.rs +++ b/crates/viewer/re_view_spatial/src/view_2d.rs @@ -149,14 +149,16 @@ impl ViewClass for SpatialView2D { // All space are visualizable + the parent space if it is connected via a pinhole. // For the moment we don't allow going down pinholes again. - let reprojectable_3d_entities = - if primary_space.connection_to_parent.is_connected_pinhole() { - topo.subspace_for_subspace_origin(primary_space.parent_space) - .map(|parent_space| parent_space.entities.clone()) - .unwrap_or_default() - } else { - Default::default() - }; + let reprojectable_3d_entities = if primary_space + .connection_to_parent + .contains(SubSpaceConnectionFlags::Pinhole) + { + topo.subspace_for_subspace_origin(primary_space.parent_space) + .map(|parent_space| parent_space.entities.clone()) + .unwrap_or_default() + } else { + Default::default() + }; VisualizableFilterContext2D { entities_in_main_2d_space: primary_space.entities.clone(), diff --git a/crates/viewer/re_view_spatial/src/view_3d.rs b/crates/viewer/re_view_spatial/src/view_3d.rs index 64f0ca7aaf23..2af66bb20404 100644 --- a/crates/viewer/re_view_spatial/src/view_3d.rs +++ b/crates/viewer/re_view_spatial/src/view_3d.rs @@ -304,7 +304,9 @@ impl ViewClass for SpatialView3D { topo.subspace_for_subspace_origin(child.hash()).map_or( false, |child_space| { - child_space.connection_to_parent.is_connected_pinhole() + child_space + .connection_to_parent + .contains(SubSpaceConnectionFlags::Pinhole) }, ) }) diff --git a/docs/content/concepts/spaces-and-transforms.md b/docs/content/concepts/spaces-and-transforms.md index ada84a26f699..b72c134d92e4 100644 --- a/docs/content/concepts/spaces-and-transforms.md +++ b/docs/content/concepts/spaces-and-transforms.md @@ -75,7 +75,6 @@ transforms that can be logged: [`rr.Transform3D`](https://ref.rerun.io/docs/python/stable/common/archetypes/#rerun.archetypes.Transform3D)). - Pinhole transforms define a 3D -> 2D camera projection (see [`rr.Pinhole`](https://ref.rerun.io/docs/python/stable/common/archetypes/#rerun.archetypes.Pinhole)). -- A disconnected space specifies that the data cannot be transformed (see [`rr.DisconnectedSpace`](https://ref.rerun.io/docs/python/stable/common/archetypes/#rerun.archetypes.DisconnectedSpace)). In this case it will not be possible to combine the data into a single view, and you will need to create two separate views to explore the data. In the future, Rerun will be adding support for additional types of transforms. diff --git a/docs/content/reference/migration/migration-0-13.md b/docs/content/reference/migration/migration-0-13.md index 511e351df01a..a090f53df745 100644 --- a/docs/content/reference/migration/migration-0-13.md +++ b/docs/content/reference/migration/migration-0-13.md @@ -33,8 +33,8 @@ more predictable but comes with a few changes on how paths are expected to be st the appropriate dimensions. * Note that children of root are still special for 3D & time series views but this may change in the future see [#4926](https://github.com/rerun-io/rerun/issues/4926) -* [DisconnectedSpace](../types/archetypes/disconnected_space.md) now strictly applies only to 2D and 3D Space Views +* `DisconnectedSpace` now strictly applies only to 2D and 3D Space Views * Internally, the heuristic now reasons about a 2D/3D topology which does not affect other types of views. - [DisconnectedSpace](../types/archetypes/disconnected_space.md) represents a hard cut in this topology. + `DisconnectedSpace` represents a hard cut in this topology. Future releases will allow you to specify Space Views & view layout from code. diff --git a/docs/content/reference/migration/migration-0-22.md b/docs/content/reference/migration/migration-0-22.md new file mode 100644 index 000000000000..265b1876cadf --- /dev/null +++ b/docs/content/reference/migration/migration-0-22.md @@ -0,0 +1,18 @@ +--- +title: Migrating from 0.20 to 0.21 +order: 989 +--- + +### Previously deprecated `DisconnectedSpace` archetype/component got now removed. + +The deprecated `DisconnectedSpace` archetype and `DisconnectedSpace` component have been removed. +To achieve the same effect, you can log any of the following "invalid" transforms: +* zeroed 3x3 matrix +* zero scale +* zeroed quaternion +* zero axis on axis-angle rotation + +Previously, the `DisconnectedSpace` archetype played a double role by governing view spawn heuristics & being used as a transform placeholder. +This led to a lot of complexity and often broke or caused confusion (see https://github.com/rerun-io/rerun/issues/6817, https://github.com/rerun-io/rerun/issues/4465, https://github.com/rerun-io/rerun/issues/4221). +By now, explicit blueprints offer a better way to express which views should be spawned and what content they should query. +(you can learn more about blueprints [here](https://rerun.io/docs/getting-started/configure-the-viewer/through-code-tutorial)). diff --git a/docs/content/reference/migration/migration-0-9.md b/docs/content/reference/migration/migration-0-9.md index fb9749f08c48..d19243bc70ba 100644 --- a/docs/content/reference/migration/migration-0-9.md +++ b/docs/content/reference/migration/migration-0-9.md @@ -76,9 +76,9 @@ Notes: * `image` has become `data` ### log_disconnected_space -Replace with [DisconnectedSpace](../types/archetypes/disconnected_space.md) +Replace with `DisconnectedSpace` -Python docs: [DisconnectedSpace](https://ref.rerun.io/docs/python/stable/common/archetypes/#rerun.archetypes.DisconnectedSpace) +Python docs: [DisconnectedSpace](https://ref.rerun.io/docs/python/0.21.0/common/archetypes/#rerun.archetypes.DisconnectedSpace) ### log_extension_components Replace with `AnyValues` diff --git a/docs/content/reference/types/archetypes.md b/docs/content/reference/types/archetypes.md index 5176d0a479a3..db614d6ed610 100644 --- a/docs/content/reference/types/archetypes.md +++ b/docs/content/reference/types/archetypes.md @@ -73,5 +73,4 @@ This page lists all built-in archetypes. * [`AnnotationContext`](archetypes/annotation_context.md): The annotation context provides additional information on how to display entities. * [`Clear`](archetypes/clear.md): Empties all the components of an entity. -* ⚠️ _deprecated_ [`DisconnectedSpace`](archetypes/disconnected_space.md): Spatially disconnect this entity from its parent. diff --git a/docs/content/reference/types/archetypes/.gitattributes b/docs/content/reference/types/archetypes/.gitattributes index 962c2cdd2d55..74a1bf759841 100644 --- a/docs/content/reference/types/archetypes/.gitattributes +++ b/docs/content/reference/types/archetypes/.gitattributes @@ -12,7 +12,6 @@ boxes3d.md linguist-generated=true capsules3d.md linguist-generated=true clear.md linguist-generated=true depth_image.md linguist-generated=true -disconnected_space.md linguist-generated=true ellipsoids3d.md linguist-generated=true encoded_image.md linguist-generated=true geo_line_strings.md linguist-generated=true diff --git a/docs/content/reference/types/archetypes/disconnected_space.md b/docs/content/reference/types/archetypes/disconnected_space.md deleted file mode 100644 index 2362dfeb4f6d..000000000000 --- a/docs/content/reference/types/archetypes/disconnected_space.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "DisconnectedSpace (deprecated)" ---- - - -**⚠️ This type is deprecated and may be removed in future versions** -Use [archetypes.Transform3D] with an invalid transform instead - -Spatially disconnect this entity from its parent. - -Specifies that the entity path at which this is logged is spatially disconnected from its parent, -making it impossible to transform the entity path into its parent's space and vice versa. -It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -This is useful for specifying that a subgraph is independent of the rest of the scene. - -## Components - -**Required**: [`DisconnectedSpace`](../components/disconnected_space.md) - -## Shown in -* [Spatial2DView](../views/spatial2d_view.md) -* [Spatial3DView](../views/spatial3d_view.md) -* [DataframeView](../views/dataframe_view.md) - -## API reference links - * 🌊 [C++ API docs for `DisconnectedSpace`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1DisconnectedSpace.html) - * 🐍 [Python API docs for `DisconnectedSpace`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.DisconnectedSpace) - * 🦀 [Rust API docs for `DisconnectedSpace`](https://docs.rs/rerun/latest/rerun/archetypes/struct.DisconnectedSpace.html) - -## Example - -### Disconnected space - -snippet: archetypes/disconnected_space - - - - - - - - - diff --git a/docs/content/reference/types/components.md b/docs/content/reference/types/components.md index 0ebd0863ab0c..7e57967c10dc 100644 --- a/docs/content/reference/types/components.md +++ b/docs/content/reference/types/components.md @@ -23,7 +23,6 @@ on [Entities and Components](../../concepts/entity-component.md). * [`Color`](components/color.md): An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. * [`Colormap`](components/colormap.md): Colormap for mapping scalar values within a given range to a color. * [`DepthMeter`](components/depth_meter.md): The world->depth map scaling factor. -* ⚠️ _deprecated_ [`DisconnectedSpace`](components/disconnected_space.md): Spatially disconnect this entity from its parent. * [`DrawOrder`](components/draw_order.md): Draw order of 2D elements. Higher values are drawn on top of lower values. * [`EntityPath`](components/entity_path.md): A path to an entity, usually to reference some data that is part of the target entity. * [`FillMode`](components/fill_mode.md): How a geometric shape is drawn and colored. diff --git a/docs/content/reference/types/components/.gitattributes b/docs/content/reference/types/components/.gitattributes index ecb4df1c74f1..6606aeac1aaa 100644 --- a/docs/content/reference/types/components/.gitattributes +++ b/docs/content/reference/types/components/.gitattributes @@ -11,7 +11,6 @@ clear_is_recursive.md linguist-generated=true color.md linguist-generated=true colormap.md linguist-generated=true depth_meter.md linguist-generated=true -disconnected_space.md linguist-generated=true draw_order.md linguist-generated=true entity_path.md linguist-generated=true fill_mode.md linguist-generated=true diff --git a/docs/content/reference/types/components/disconnected_space.md b/docs/content/reference/types/components/disconnected_space.md deleted file mode 100644 index 3fbb0ac3f060..000000000000 --- a/docs/content/reference/types/components/disconnected_space.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "DisconnectedSpace (deprecated)" ---- - - -**⚠️ This type is deprecated and may be removed in future versions** -Use [archetypes.Transform3D] with an invalid transform instead. - -Spatially disconnect this entity from its parent. - -Specifies that the entity path at which this is logged is spatially disconnected from its parent, -making it impossible to transform the entity path into its parent's space and vice versa. -It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. -This is useful for specifying that a subgraph is independent of the rest of the scene. - -## Rerun datatype -[`Bool`](../datatypes/bool.md) - - -## Arrow datatype -``` -boolean -``` - -## API reference links - * 🌊 [C++ API docs for `DisconnectedSpace`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1components_1_1DisconnectedSpace.html) - * 🐍 [Python API docs for `DisconnectedSpace`](https://ref.rerun.io/docs/python/stable/common/components#rerun.components.DisconnectedSpace) - * 🦀 [Rust API docs for `DisconnectedSpace`](https://docs.rs/rerun/latest/rerun/components/struct.DisconnectedSpace.html) - - -## Used by - -* [`DisconnectedSpace`](../archetypes/disconnected_space.md) diff --git a/docs/content/reference/types/datatypes/bool.md b/docs/content/reference/types/datatypes/bool.md index 4ee2740a5ed3..83054a151e97 100644 --- a/docs/content/reference/types/datatypes/bool.md +++ b/docs/content/reference/types/datatypes/bool.md @@ -20,5 +20,4 @@ boolean ## Used by * [`ClearIsRecursive`](../components/clear_is_recursive.md) -* [`DisconnectedSpace`](../components/disconnected_space.md) * [`ShowLabels`](../components/show_labels.md) diff --git a/docs/content/reference/types/views/spatial2d_view.md b/docs/content/reference/types/views/spatial2d_view.md index 5bb3a50596e9..b470de517df0 100644 --- a/docs/content/reference/types/views/spatial2d_view.md +++ b/docs/content/reference/types/views/spatial2d_view.md @@ -49,7 +49,6 @@ snippet: views/spatial2d * [`Boxes2D`](../archetypes/boxes2d.md) * [`Clear`](../archetypes/clear.md) * [`DepthImage`](../archetypes/depth_image.md) -* [`DisconnectedSpace`](../archetypes/disconnected_space.md) * [`EncodedImage`](../archetypes/encoded_image.md) * [`Image`](../archetypes/image.md) * [`LineStrips2D`](../archetypes/line_strips2d.md) diff --git a/docs/content/reference/types/views/spatial3d_view.md b/docs/content/reference/types/views/spatial3d_view.md index c31a719a1d6b..96d09de843f8 100644 --- a/docs/content/reference/types/views/spatial3d_view.md +++ b/docs/content/reference/types/views/spatial3d_view.md @@ -52,7 +52,6 @@ snippet: views/spatial3d * [`Boxes3D`](../archetypes/boxes3d.md) * [`Capsules3D`](../archetypes/capsules3d.md) * [`Clear`](../archetypes/clear.md) -* [`DisconnectedSpace`](../archetypes/disconnected_space.md) * [`Ellipsoids3D`](../archetypes/ellipsoids3d.md) * [`InstancePoses3D`](../archetypes/instance_poses3d.md) * [`LineStrips3D`](../archetypes/line_strips3d.md) diff --git a/docs/snippets/INDEX.md b/docs/snippets/INDEX.md index 16ee05d96c03..7ae27d8bee17 100644 --- a/docs/snippets/INDEX.md +++ b/docs/snippets/INDEX.md @@ -74,7 +74,6 @@ _All snippets, organized by the [`Archetype`](https://rerun.io/docs/reference/ty | **[`Clear`](https://rerun.io/docs/reference/types/archetypes/clear)** | `concepts/different_data_per_timeline` | Log different data on different timelines | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/different_data_per_timeline.cpp) | | **[`DepthImage`](https://rerun.io/docs/reference/types/archetypes/depth_image)** | `archetypes/depth_image_simple` | Create and log a depth image | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_simple.cpp) | | **[`DepthImage`](https://rerun.io/docs/reference/types/archetypes/depth_image)** | `archetypes/depth_image_3d` | Create and log a depth image and pinhole camera | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_3d.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_3d.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/depth_image_3d.cpp) | -| **[`DisconnectedSpace`](https://rerun.io/docs/reference/types/archetypes/disconnected_space)** | `archetypes/disconnected_space` | Disconnect two spaces | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.cpp) | | **[`Ellipsoids3D`](https://rerun.io/docs/reference/types/archetypes/ellipsoids3d)** | `archetypes/ellipsoids3d_simple` | Log random points and the corresponding covariance ellipsoid | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.cpp) | | **[`Ellipsoids3D`](https://rerun.io/docs/reference/types/archetypes/ellipsoids3d)** | `archetypes/ellipsoids3d_batch` | Log a batch of ellipsoids | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_batch.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_batch.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_batch.cpp) | | **[`EncodedImage`](https://rerun.io/docs/reference/types/archetypes/encoded_image)** | `archetypes/encoded_image` | Create and log an image | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/encoded_image.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/encoded_image.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/encoded_image.cpp) | @@ -130,7 +129,6 @@ _All snippets, organized by the [`Archetype`](https://rerun.io/docs/reference/ty | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/points3d_send_columns` | Use the `send_columns` API to send several point clouds over time in a single call | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.py) | | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_send_columns.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/points3d_random` | Log some random points with color and radii | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_random.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_random.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/points3d_random.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/annotation_context_connections` | Log annotation context with connections between keypoints | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/annotation_context_connections.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/annotation_context_connections.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/annotation_context_connections.cpp) | -| **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/disconnected_space` | Disconnect two spaces | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/ellipsoids3d_simple` | Log random points and the corresponding covariance ellipsoid | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/ellipsoids3d_simple.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/instance_poses3d_combined` | Log a simple 3D box with a regular & instance pose transform | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/instance_poses3d_combined.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/instance_poses3d_combined.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/instance_poses3d_combined.cpp) | | **[`Points3D`](https://rerun.io/docs/reference/types/archetypes/points3d)** | `archetypes/pinhole_perspective` | Logs a point cloud and a perspective camera looking at it | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/pinhole_perspective.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/pinhole_perspective.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/pinhole_perspective.cpp) | @@ -206,7 +204,6 @@ _All snippets, organized by the [`Component`](https://rerun.io/docs/reference/ty | **[`Color`](https://rerun.io/docs/reference/types/components/color)** | `concepts/viscomp-visualizer-override-multiple` | Override a visualizer | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/concepts/viscomp-visualizer-override-multiple.py) | | | | **[`Color`](https://rerun.io/docs/reference/types/components/color)** | `descriptors/descr_custom_archetype` | | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/descriptors/descr_custom_archetype.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/descriptors/descr_custom_archetype.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/descriptors/descr_custom_archetype.cpp) | | **[`Color`](https://rerun.io/docs/reference/types/components/color)** | `views/spatial3d` | Use a blueprint to customize a Spatial3DView | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/views/spatial3d.py) | | | -| **[`DisconnectedSpace`](https://rerun.io/docs/reference/types/components/disconnected_space)** | `archetypes/disconnected_space` | Disconnect two spaces | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/disconnected_space.cpp) | | **[`GeoLineString`](https://rerun.io/docs/reference/types/components/geo_line_string)** | `archetypes/geo_line_strings_simple` | Log a simple geospatial line string | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/geo_line_strings_simple.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/geo_line_strings_simple.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/geo_line_strings_simple.cpp) | | **[`GraphEdge`](https://rerun.io/docs/reference/types/components/graph_edge)** | `archetypes/graph_directed` | Log a simple directed graph | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_directed.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_directed.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_directed.cpp) | | **[`GraphEdge`](https://rerun.io/docs/reference/types/components/graph_edge)** | `archetypes/graph_undirected` | Log a simple undirected graph | [🐍](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_undirected.py) | [🦀](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_undirected.rs) | [🌊](https://github.com/rerun-io/rerun/blob/main/docs/snippets/all/archetypes/graph_undirected.cpp) | diff --git a/docs/snippets/all/archetypes/disconnected_space.cpp b/docs/snippets/all/archetypes/disconnected_space.cpp deleted file mode 100644 index e3053c338b62..000000000000 --- a/docs/snippets/all/archetypes/disconnected_space.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Disconnect two spaces. - -#include - -// DisconnectedSpace is deprecated and will be removed in the future. -RR_DISABLE_DEPRECATION_WARNING - -int main() { - const auto rec = rerun::RecordingStream("rerun_example_disconnected_space"); - rec.spawn().exit_on_failure(); - - // These two points can be projected into the same space.. - rec.log("world/room1/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}})); - rec.log("world/room2/point", rerun::Points3D({{1.0f, 1.0f, 1.0f}})); - - // ..but this one lives in a completely separate space! - rec.log("world/wormhole", rerun::DisconnectedSpace(true)); - rec.log("world/wormhole/point", rerun::Points3D({{2.0f, 2.0f, 2.0f}})); -} diff --git a/docs/snippets/all/archetypes/disconnected_space.py b/docs/snippets/all/archetypes/disconnected_space.py deleted file mode 100644 index cde7a732e846..000000000000 --- a/docs/snippets/all/archetypes/disconnected_space.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Disconnect two spaces.""" - -import rerun as rr - -rr.init("rerun_example_disconnected_space", spawn=True) - -# These two points can be projected into the same space.. -rr.log("world/room1/point", rr.Points3D([[0, 0, 0]])) -rr.log("world/room2/point", rr.Points3D([[1, 1, 1]])) - -# ..but this one lives in a completely separate space! -rr.log("world/wormhole", rr.DisconnectedSpace()) -rr.log("world/wormhole/point", rr.Points3D([[2, 2, 2]])) diff --git a/docs/snippets/all/archetypes/disconnected_space.rs b/docs/snippets/all/archetypes/disconnected_space.rs deleted file mode 100644 index 250f8018cbea..000000000000 --- a/docs/snippets/all/archetypes/disconnected_space.rs +++ /dev/null @@ -1,28 +0,0 @@ -//! Disconnect two spaces. - -// `DisconnectedSpace` is deprecated and will be removed in the future. -// Use an invalid transform (e.g. zeroed out 3x3 matrix) instead. -#![allow(deprecated)] - -fn main() -> Result<(), Box> { - let rec = rerun::RecordingStreamBuilder::new("rerun_example_disconnected_space").spawn()?; - - // These two points can be projected into the same space.. - rec.log( - "world/room1/point", - &rerun::Points3D::new([(0.0, 0.0, 0.0)]), - )?; - rec.log( - "world/room2/point", - &rerun::Points3D::new([(1.0, 1.0, 1.0)]), - )?; - - // ..but this one lives in a completely separate space! - rec.log("world/wormhole", &rerun::DisconnectedSpace::new(true))?; - rec.log( - "world/wormhole/point", - &rerun::Points3D::new([(2.0, 2.0, 2.0)]), - )?; - - Ok(()) -} diff --git a/rerun_cpp/src/rerun/archetypes.hpp b/rerun_cpp/src/rerun/archetypes.hpp index 74f875d5ac8c..830f5abd56ea 100644 --- a/rerun_cpp/src/rerun/archetypes.hpp +++ b/rerun_cpp/src/rerun/archetypes.hpp @@ -13,7 +13,6 @@ #include "archetypes/capsules3d.hpp" #include "archetypes/clear.hpp" #include "archetypes/depth_image.hpp" -#include "archetypes/disconnected_space.hpp" #include "archetypes/ellipsoids3d.hpp" #include "archetypes/encoded_image.hpp" #include "archetypes/geo_line_strings.hpp" diff --git a/rerun_cpp/src/rerun/archetypes/.gitattributes b/rerun_cpp/src/rerun/archetypes/.gitattributes index 8b89b32e2722..3079ef0625ca 100644 --- a/rerun_cpp/src/rerun/archetypes/.gitattributes +++ b/rerun_cpp/src/rerun/archetypes/.gitattributes @@ -23,8 +23,6 @@ clear.cpp linguist-generated=true clear.hpp linguist-generated=true depth_image.cpp linguist-generated=true depth_image.hpp linguist-generated=true -disconnected_space.cpp linguist-generated=true -disconnected_space.hpp linguist-generated=true ellipsoids3d.cpp linguist-generated=true ellipsoids3d.hpp linguist-generated=true encoded_image.cpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp deleted file mode 100644 index 4c1ca31b8df6..000000000000 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs -// Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". - -#include "disconnected_space.hpp" - -#include "../collection_adapter_builtins.hpp" - -RR_PUSH_WARNINGS -RR_DISABLE_DEPRECATION_WARNING - -namespace rerun::archetypes {} - -namespace rerun { - - Result> AsComponents::serialize( - const archetypes::DisconnectedSpace& archetype - ) { - using namespace archetypes; - std::vector cells; - cells.reserve(2); - - { - auto result = ComponentBatch::from_loggable( - archetype.disconnected_space, - ComponentDescriptor( - "rerun.archetypes.DisconnectedSpace", - "disconnected_space", - "rerun.components.DisconnectedSpace" - ) - ); - RR_RETURN_NOT_OK(result.error); - cells.push_back(std::move(result.value)); - } - { - auto indicator = DisconnectedSpace::IndicatorComponent(); - auto result = ComponentBatch::from_loggable(indicator); - RR_RETURN_NOT_OK(result.error); - cells.emplace_back(std::move(result.value)); - } - - return cells; - } -} // namespace rerun - -RR_POP_WARNINGS diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp deleted file mode 100644 index 19d598b0a5d7..000000000000 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs -// Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". - -#pragma once - -#include "../collection.hpp" -#include "../compiler_utils.hpp" -#include "../component_batch.hpp" -#include "../components/disconnected_space.hpp" -#include "../indicator_component.hpp" -#include "../result.hpp" - -#include -#include -#include - -RR_PUSH_WARNINGS -RR_DISABLE_DEPRECATION_WARNING - -namespace rerun::archetypes { - /// **Archetype**: Spatially disconnect this entity from its parent. - /// - /// Specifies that the entity path at which this is logged is spatially disconnected from its parent, - /// making it impossible to transform the entity path into its parent's space and vice versa. - /// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. - /// This is useful for specifying that a subgraph is independent of the rest of the scene. - /// - /// ## Example - /// - /// ### Disconnected space - /// ![image](https://static.rerun.io/disconnected_space/709041fc304b50c74db773b780e32294fe90c95f/full.png) - /// - /// ```cpp - /// #include - /// - /// // DisconnectedSpace is deprecated and will be removed in the future. - /// RR_DISABLE_DEPRECATION_WARNING - /// - /// int main() { - /// const auto rec = rerun::RecordingStream("rerun_example_disconnected_space"); - /// rec.spawn().exit_on_failure(); - /// - /// // These two points can be projected into the same space.. - /// rec.log("world/room1/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}})); - /// rec.log("world/room2/point", rerun::Points3D({{1.0f, 1.0f, 1.0f}})); - /// - /// // ..but this one lives in a completely separate space! - /// rec.log("world/wormhole", rerun::DisconnectedSpace(true)); - /// rec.log("world/wormhole/point", rerun::Points3D({{2.0f, 2.0f, 2.0f}})); - /// } - /// ``` - struct [[deprecated("Use [archetypes.Transform3D] with an invalid transform instead" - )]] DisconnectedSpace { - /// Whether the entity path at which this is logged is disconnected from its parent. - rerun::components::DisconnectedSpace disconnected_space; - - public: - static constexpr const char IndicatorComponentName[] = - "rerun.components.DisconnectedSpaceIndicator"; - - /// Indicator component, used to identify the archetype when converting to a list of components. - using IndicatorComponent = rerun::components::IndicatorComponent; - - public: - DisconnectedSpace() = default; - DisconnectedSpace(DisconnectedSpace&& other) = default; - - explicit DisconnectedSpace(rerun::components::DisconnectedSpace _disconnected_space) - : disconnected_space(std::move(_disconnected_space)) {} - }; - -} // namespace rerun::archetypes - -namespace rerun { - /// \private - template - struct AsComponents; - RR_PUSH_WARNINGS - RR_DISABLE_DEPRECATION_WARNING - - /// \private - template <> - struct AsComponents { - /// Serialize all set component batches. - static Result> serialize( - const archetypes::DisconnectedSpace& archetype - ); - }; -} // namespace rerun - -RR_POP_WARNINGS diff --git a/rerun_cpp/src/rerun/components.hpp b/rerun_cpp/src/rerun/components.hpp index 17ff34250df4..27e6377cc73d 100644 --- a/rerun_cpp/src/rerun/components.hpp +++ b/rerun_cpp/src/rerun/components.hpp @@ -12,7 +12,6 @@ #include "components/color.hpp" #include "components/colormap.hpp" #include "components/depth_meter.hpp" -#include "components/disconnected_space.hpp" #include "components/draw_order.hpp" #include "components/entity_path.hpp" #include "components/fill_mode.hpp" diff --git a/rerun_cpp/src/rerun/components/.gitattributes b/rerun_cpp/src/rerun/components/.gitattributes index 57a1800528b7..2f773028d7c8 100644 --- a/rerun_cpp/src/rerun/components/.gitattributes +++ b/rerun_cpp/src/rerun/components/.gitattributes @@ -14,7 +14,6 @@ color.hpp linguist-generated=true colormap.cpp linguist-generated=true colormap.hpp linguist-generated=true depth_meter.hpp linguist-generated=true -disconnected_space.hpp linguist-generated=true draw_order.hpp linguist-generated=true entity_path.hpp linguist-generated=true fill_mode.cpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/components/disconnected_space.hpp b/rerun_cpp/src/rerun/components/disconnected_space.hpp deleted file mode 100644 index 2c659a40ffbd..000000000000 --- a/rerun_cpp/src/rerun/components/disconnected_space.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs -// Based on "crates/store/re_types/definitions/rerun/components/disconnected_space.fbs". - -#pragma once - -#include "../compiler_utils.hpp" -#include "../component_descriptor.hpp" -#include "../datatypes/bool.hpp" -#include "../result.hpp" - -#include -#include - -namespace rerun::components { - /// **Component**: Spatially disconnect this entity from its parent. - /// - /// Specifies that the entity path at which this is logged is spatially disconnected from its parent, - /// making it impossible to transform the entity path into its parent's space and vice versa. - /// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. - /// This is useful for specifying that a subgraph is independent of the rest of the scene. - struct [[deprecated("Use [archetypes.Transform3D] with an invalid transform instead." - )]] DisconnectedSpace { - /// Whether the entity path at which this is logged is disconnected from its parent. - /// - /// Set to true to disconnect the entity from its parent. - /// Set to false to disable the effects of this component - /// TODO(#7121): Once a space is disconnected, it can't be re-connected again. - rerun::datatypes::Bool is_disconnected; - - public: - DisconnectedSpace() = default; - - DisconnectedSpace(rerun::datatypes::Bool is_disconnected_) - : is_disconnected(is_disconnected_) {} - - DisconnectedSpace& operator=(rerun::datatypes::Bool is_disconnected_) { - is_disconnected = is_disconnected_; - return *this; - } - - DisconnectedSpace(bool value_) : is_disconnected(value_) {} - - DisconnectedSpace& operator=(bool value_) { - is_disconnected = value_; - return *this; - } - - /// Cast to the underlying Bool datatype - operator rerun::datatypes::Bool() const { - return is_disconnected; - } - }; -} // namespace rerun::components - -RR_PUSH_WARNINGS -RR_DISABLE_DEPRECATION_WARNING - -namespace rerun { - static_assert(sizeof(rerun::datatypes::Bool) == sizeof(components::DisconnectedSpace)); - - /// \private - template <> - struct Loggable { - static constexpr ComponentDescriptor Descriptor = "rerun.components.DisconnectedSpace"; - - /// Returns the arrow data type this type corresponds to. - static const std::shared_ptr& arrow_datatype() { - return Loggable::arrow_datatype(); - } - - /// Serializes an array of `rerun::components::DisconnectedSpace` into an arrow array. - static Result> to_arrow( - const components::DisconnectedSpace* instances, size_t num_instances - ) { - if (num_instances == 0) { - return Loggable::to_arrow(nullptr, 0); - } else if (instances == nullptr) { - return rerun::Error( - ErrorCode::UnexpectedNullArgument, - "Passed array instances is null when num_elements> 0." - ); - } else { - return Loggable::to_arrow( - &instances->is_disconnected, - num_instances - ); - } - } - }; -} // namespace rerun - -RR_POP_WARNINGS diff --git a/rerun_cpp/tests/archetypes/disconnected_space.cpp b/rerun_cpp/tests/archetypes/disconnected_space.cpp deleted file mode 100644 index e20f3f7c38bf..000000000000 --- a/rerun_cpp/tests/archetypes/disconnected_space.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "archetype_test.hpp" - -RR_DISABLE_DEPRECATION_WARNING - -#include - -using namespace rerun::archetypes; - -#define TEST_TAG "[disconnected_space][archetypes]" - -SCENARIO("disconnected_space archetype can be serialized" TEST_TAG) { - GIVEN("Constructed from builder and manually") { - auto from_builder = DisconnectedSpace(true); - - THEN("serialization succeeds") { - CHECK(rerun::AsComponents().serialize(from_builder).is_ok()); - } - } -} diff --git a/rerun_py/docs/gen_common_index.py b/rerun_py/docs/gen_common_index.py index 4c106a2e6ce4..f55c1719449d 100755 --- a/rerun_py/docs/gen_common_index.py +++ b/rerun_py/docs/gen_common_index.py @@ -242,7 +242,6 @@ class Section: Section( title="Transforms and Coordinate Systems", class_list=[ - "archetypes.DisconnectedSpace", "archetypes.Pinhole", "archetypes.Transform3D", "archetypes.InstancePoses3D", diff --git a/rerun_py/rerun_sdk/rerun/__init__.py b/rerun_py/rerun_sdk/rerun/__init__.py index f396868fbd8e..5852276cfadc 100644 --- a/rerun_py/rerun_sdk/rerun/__init__.py +++ b/rerun_py/rerun_sdk/rerun/__init__.py @@ -75,7 +75,6 @@ Capsules3D as Capsules3D, Clear as Clear, DepthImage as DepthImage, - DisconnectedSpace as DisconnectedSpace, Ellipsoids3D as Ellipsoids3D, EncodedImage as EncodedImage, GeoLineStrings as GeoLineStrings, diff --git a/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes b/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes index 054ebcd0186d..66e701d0296d 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes +++ b/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes @@ -13,7 +13,6 @@ boxes3d.py linguist-generated=true capsules3d.py linguist-generated=true clear.py linguist-generated=true depth_image.py linguist-generated=true -disconnected_space.py linguist-generated=true ellipsoids3d.py linguist-generated=true encoded_image.py linguist-generated=true geo_line_strings.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/archetypes/__init__.py b/rerun_py/rerun_sdk/rerun/archetypes/__init__.py index 12b8f2c904d1..ab5ba675061a 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/__init__.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/__init__.py @@ -13,7 +13,6 @@ from .capsules3d import Capsules3D from .clear import Clear from .depth_image import DepthImage -from .disconnected_space import DisconnectedSpace from .ellipsoids3d import Ellipsoids3D from .encoded_image import EncodedImage from .geo_line_strings import GeoLineStrings @@ -51,7 +50,6 @@ "Capsules3D", "Clear", "DepthImage", - "DisconnectedSpace", "Ellipsoids3D", "EncodedImage", "GeoLineStrings", diff --git a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py deleted file mode 100644 index 4ea38aaf153c..000000000000 --- a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py +++ /dev/null @@ -1,83 +0,0 @@ -# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs -# Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". - -# You can extend this class by creating a "DisconnectedSpaceExt" class in "disconnected_space_ext.py". - -from __future__ import annotations - -from attrs import define, field -from typing_extensions import deprecated # type: ignore[misc, unused-ignore] - -from .. import components -from .._baseclasses import ( - Archetype, -) -from .disconnected_space_ext import DisconnectedSpaceExt - -__all__ = ["DisconnectedSpace"] - - -@deprecated("""Use [archetypes.Transform3D] with an invalid transform instead""") -@define(str=False, repr=False, init=False) -class DisconnectedSpace(DisconnectedSpaceExt, Archetype): - """ - **Archetype**: Spatially disconnect this entity from its parent. - - Specifies that the entity path at which this is logged is spatially disconnected from its parent, - making it impossible to transform the entity path into its parent's space and vice versa. - It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. - This is useful for specifying that a subgraph is independent of the rest of the scene. - - Example - ------- - ### Disconnected space: - ```python - import rerun as rr - - rr.init("rerun_example_disconnected_space", spawn=True) - - # These two points can be projected into the same space.. - rr.log("world/room1/point", rr.Points3D([[0, 0, 0]])) - rr.log("world/room2/point", rr.Points3D([[1, 1, 1]])) - - # ..but this one lives in a completely separate space! - rr.log("world/wormhole", rr.DisconnectedSpace()) - rr.log("world/wormhole/point", rr.Points3D([[2, 2, 2]])) - ``` -
- - - - - - - -
- - """ - - # __init__ can be found in disconnected_space_ext.py - - def __attrs_clear__(self) -> None: - """Convenience method for calling `__attrs_init__` with all `None`s.""" - self.__attrs_init__( - disconnected_space=None, # type: ignore[arg-type] - ) - - @classmethod - def _clear(cls) -> DisconnectedSpace: - """Produce an empty DisconnectedSpace, bypassing `__init__`.""" - inst = cls.__new__(cls) - inst.__attrs_clear__() - return inst - - disconnected_space: components.DisconnectedSpaceBatch = field( - metadata={"component": "required"}, - converter=components.DisconnectedSpaceBatch._required, # type: ignore[misc] - ) - # Whether the entity path at which this is logged is disconnected from its parent. - # - # (Docstring intentionally commented out to hide this field from the docs) - - __str__ = Archetype.__str__ - __repr__ = Archetype.__repr__ # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space_ext.py b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space_ext.py deleted file mode 100644 index c72a30c019a1..000000000000 --- a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space_ext.py +++ /dev/null @@ -1,28 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -if TYPE_CHECKING: - from ..datatypes import BoolLike - - -class DisconnectedSpaceExt: - """Extension for [DisconnectedSpace][rerun.archetypes.DisconnectedSpace].""" - - def __init__( - self: Any, - is_disconnected: BoolLike = True, - ): - """ - Disconnect an entity from its parent. - - Parameters - ---------- - is_disconnected: - Whether or not the entity should be disconnected from the rest of the scene. - Set to `True` to disconnect the entity from its parent. - Set to `False` to disable the effects of this archetype, (re-)connecting the entity to its parent again. - - """ - - self.__attrs_init__(is_disconnected) diff --git a/rerun_py/rerun_sdk/rerun/components/.gitattributes b/rerun_py/rerun_sdk/rerun/components/.gitattributes index bc78f211dc27..4940e2de0da1 100644 --- a/rerun_py/rerun_sdk/rerun/components/.gitattributes +++ b/rerun_py/rerun_sdk/rerun/components/.gitattributes @@ -12,7 +12,6 @@ clear_is_recursive.py linguist-generated=true color.py linguist-generated=true colormap.py linguist-generated=true depth_meter.py linguist-generated=true -disconnected_space.py linguist-generated=true draw_order.py linguist-generated=true entity_path.py linguist-generated=true fill_mode.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/components/__init__.py b/rerun_py/rerun_sdk/rerun/components/__init__.py index 1bc230a70e79..f8ab31dbcb49 100644 --- a/rerun_py/rerun_sdk/rerun/components/__init__.py +++ b/rerun_py/rerun_sdk/rerun/components/__init__.py @@ -22,7 +22,6 @@ from .color import Color, ColorBatch from .colormap import Colormap, ColormapArrayLike, ColormapBatch, ColormapLike from .depth_meter import DepthMeter, DepthMeterBatch -from .disconnected_space import DisconnectedSpace, DisconnectedSpaceBatch from .draw_order import DrawOrder, DrawOrderBatch from .entity_path import EntityPath, EntityPathBatch from .fill_mode import FillMode, FillModeArrayLike, FillModeBatch, FillModeLike @@ -121,8 +120,6 @@ "ColormapLike", "DepthMeter", "DepthMeterBatch", - "DisconnectedSpace", - "DisconnectedSpaceBatch", "DrawOrder", "DrawOrderBatch", "EntityPath", diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py deleted file mode 100644 index 40b9886d8c45..000000000000 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ /dev/null @@ -1,44 +0,0 @@ -# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs -# Based on "crates/store/re_types/definitions/rerun/components/disconnected_space.fbs". - -# You can extend this class by creating a "DisconnectedSpaceExt" class in "disconnected_space_ext.py". - -from __future__ import annotations - -from typing_extensions import deprecated # type: ignore[misc, unused-ignore] - -from .. import datatypes -from .._baseclasses import ( - ComponentBatchMixin, - ComponentDescriptor, - ComponentMixin, -) -from .disconnected_space_ext import DisconnectedSpaceExt - -__all__ = ["DisconnectedSpace", "DisconnectedSpaceBatch"] - - -@deprecated("""Use [archetypes.Transform3D] with an invalid transform instead.""") -class DisconnectedSpace(DisconnectedSpaceExt, datatypes.Bool, ComponentMixin): - """ - **Component**: Spatially disconnect this entity from its parent. - - Specifies that the entity path at which this is logged is spatially disconnected from its parent, - making it impossible to transform the entity path into its parent's space and vice versa. - It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views. - This is useful for specifying that a subgraph is independent of the rest of the scene. - """ - - _BATCH_TYPE = None - # __init__ can be found in disconnected_space_ext.py - - # Note: there are no fields here because DisconnectedSpace delegates to datatypes.Bool - pass - - -class DisconnectedSpaceBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.DisconnectedSpace") - - -# This is patched in late to avoid circular dependencies. -DisconnectedSpace._BATCH_TYPE = DisconnectedSpaceBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space_ext.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space_ext.py deleted file mode 100644 index 4ac4066a3ca1..000000000000 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space_ext.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import annotations - -from typing import Any - - -class DisconnectedSpaceExt: - """Extension for [DisconnectedSpace][rerun.components.DisconnectedSpace].""" - - def __init__( - self: Any, - is_disconnected: bool = True, - ): - """ - Disconnect an entity from its parent. - - Parameters - ---------- - is_disconnected: - Whether or not the entity should be disconnected from the rest of the scene. - Set to `True` to disconnect the entity from its parent. - Set to `False` to disable the effects of this component, (re-)connecting the entity to its parent again. - - """ - self.__attrs_init__(is_disconnected) diff --git a/tests/cpp/roundtrips/disconnected_space/main.cpp b/tests/cpp/roundtrips/disconnected_space/main.cpp deleted file mode 100644 index caba6f07d892..000000000000 --- a/tests/cpp/roundtrips/disconnected_space/main.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include - -// DisconnectedSpace is deprecated and will be removed in the future. -RR_DISABLE_DEPRECATION_WARNING - -#include -#include - -int main(int, char** argv) { - const auto rec = rerun::RecordingStream("rerun_example_roundtrip_disconnected_space"); - rec.save(argv[1]).exit_on_failure(); - - rec.log("disconnected_space", rerun::archetypes::DisconnectedSpace(true)); -} diff --git a/tests/python/release_checklist/check_all_components_ui.py b/tests/python/release_checklist/check_all_components_ui.py index 2819ee163442..d5fb1629d430 100644 --- a/tests/python/release_checklist/check_all_components_ui.py +++ b/tests/python/release_checklist/check_all_components_ui.py @@ -109,7 +109,6 @@ def alternatives(self) -> list[Any] | None: "ColorBatch": TestCase(batch=[(255, 0, 0, 255), (0, 255, 0, 255), (0, 0, 255, 255)]), "ColormapBatch": TestCase(rr.components.Colormap.Viridis), "DepthMeterBatch": TestCase(1000.0), - "DisconnectedSpaceBatch": TestCase(True), "DrawOrderBatch": TestCase(100.0), "EntityPathBatch": TestCase("my/entity/path"), "FillModeBatch": TestCase( diff --git a/tests/python/roundtrips/disconnected_space/main.py b/tests/python/roundtrips/disconnected_space/main.py deleted file mode 100644 index 5441af1df5ac..000000000000 --- a/tests/python/roundtrips/disconnected_space/main.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -"""Logs a `DisconnectedSpace` archetype for roundtrip checks.""" - -from __future__ import annotations - -import argparse - -import rerun as rr - - -def main() -> None: - parser = argparse.ArgumentParser(description="Logs rich data using the Rerun SDK.") - rr.script_add_args(parser) - args = parser.parse_args() - - rr.script_setup(args, "rerun_example_roundtrip_disconnected_space") - - rr.log("disconnected_space", rr.DisconnectedSpace()) - - rr.script_teardown(args) - - -if __name__ == "__main__": - main() diff --git a/tests/python/test_api/test_api.py b/tests/python/test_api/test_api.py index 83e4091a7654..bf2eebf24c3d 100755 --- a/tests/python/test_api/test_api.py +++ b/tests/python/test_api/test_api.py @@ -60,7 +60,7 @@ def run_segmentation() -> None: rr.log( "logs/seg_test_log", rr.TextLog( - "default colored rects, default colored points, " "all points except the bottom right clusters have labels", + "default colored rects, default colored points, all points except the bottom right clusters have labels", ), ) @@ -99,9 +99,6 @@ def small_image() -> None: def transforms() -> None: rr.log("transforms", rr.ViewCoordinates.RIGHT_HAND_Y_UP, static=True) - # Log a disconnected space (this doesn't do anything here, but can be used to force a new space) - rr.log("transforms/disconnected", rr.DisconnectedSpace()) - # Log scale along the x axis only. rr.log("transforms/x_scaled", rr.Transform3D(scale=(3, 1, 1))) diff --git a/tests/rust/roundtrips/disconnected_space/Cargo.toml b/tests/rust/roundtrips/disconnected_space/Cargo.toml deleted file mode 100644 index d41c089e00b4..000000000000 --- a/tests/rust/roundtrips/disconnected_space/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "roundtrip_disconnected_space" -edition.workspace = true -license.workspace = true -publish = false -rust-version.workspace = true -version.workspace = true - -[lints] -workspace = true - -[dependencies] -re_log = { workspace = true, features = ["setup"] } -rerun = { path = "../../../../crates/top/rerun", features = ["clap"] } - -anyhow.workspace = true -clap = { workspace = true, features = ["derive"] } diff --git a/tests/rust/roundtrips/disconnected_space/src/main.rs b/tests/rust/roundtrips/disconnected_space/src/main.rs deleted file mode 100644 index a20b1a92391c..000000000000 --- a/tests/rust/roundtrips/disconnected_space/src/main.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! Logs a `DisconnectedSpace` archetype for roundtrip checks. - -// `DisconnectedSpace` is deprecated and will be removed in the future. -// Use an invalid transform (for instance zero scale or zero matrix) instead. -#![allow(deprecated)] - -use rerun::{archetypes::DisconnectedSpace, RecordingStream}; - -#[derive(Debug, clap::Parser)] -#[clap(author, version, about)] -struct Args { - #[command(flatten)] - rerun: rerun::clap::RerunArgs, -} - -fn run(rec: &RecordingStream, _args: &Args) -> anyhow::Result<()> { - rec.log("disconnected_space", &DisconnectedSpace::new(true)) - .map_err(Into::into) -} - -fn main() -> anyhow::Result<()> { - re_log::setup_logging(); - - use clap::Parser as _; - let args = Args::parse(); - - let (rec, _serve_guard) = args - .rerun - .init("rerun_example_roundtrip_disconnected_space")?; - run(&rec, &args) -} From 7596891caae0cb7cf7d3f0726db360fcce3abe81 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 20 Dec 2024 11:42:30 +0100 Subject: [PATCH 11/11] remove screenshot tests for disconnected space component ui (#8552) --- .../DisconnectedSpace_placeholder.png | 3 --- .../DisconnectedSpace_placeholder.png | 3 --- 2 files changed, 6 deletions(-) delete mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png delete mode 100644 crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png deleted file mode 100644 index 7eff823eb509..000000000000 --- a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_narrow/DisconnectedSpace_placeholder.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c7e7982b97d6219a78beb8967d92da8251a45f40b291e58ae0fcbe0713373d7 -size 3243 diff --git a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png b/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png deleted file mode 100644 index 0333b48d5aa9..000000000000 --- a/crates/viewer/re_component_ui/tests/snapshots/all_components_list_item_wide/DisconnectedSpace_placeholder.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f21d8cedc48aa3e11c0e9eadde3f5616f53ee785679e8e25ca6d151573cb7403 -size 3554