Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK batching/revamp 1: impl DataTableBatcher #1980

Merged
merged 14 commits into from
May 3, 2023
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ arrow2_convert = "0.4.2"
cfg-if = "1.0"
clap = "4.0"
comfy-table = { version = "6.1", default-features = false }
crossbeam = "0.8"
ctrlc = { version = "3.0", features = ["termination"] }
ecolor = "0.21.0"
eframe = { version = "0.21.3", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ re_log.workspace = true

# External dependencies:
anyhow.workspace = true
crossbeam = "0.8"
crossbeam.workspace = true
once_cell = "1.17"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
2 changes: 2 additions & 0 deletions crates/re_log_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ serde_bytes = { version = "0.11", optional = true }

# Native dependencies:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
crossbeam.workspace = true
puffin.workspace = true


[dev-dependencies]
rmp-serde = "1.1"
similar-asserts = "1.4.2"
25 changes: 25 additions & 0 deletions crates/re_log_types/src/data_row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ impl std::ops::IndexMut<usize> for DataCellRow {
}
}

impl SizeBytes for DataCellRow {
#[inline]
fn heap_size_bytes(&self) -> u64 {
self.0.heap_size_bytes()
}
}

// ---

/// A unique ID for a [`DataRow`].
Expand Down Expand Up @@ -325,6 +332,24 @@ impl DataRow {
}
}

impl SizeBytes for DataRow {
fn heap_size_bytes(&self) -> u64 {
let Self {
row_id,
timepoint,
entity_path,
num_instances,
cells,
} = self;

row_id.heap_size_bytes()
+ timepoint.heap_size_bytes()
+ entity_path.heap_size_bytes()
+ num_instances.heap_size_bytes()
+ cells.heap_size_bytes()
}
}

impl DataRow {
#[inline]
pub fn row_id(&self) -> RowId {
Expand Down
Loading