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

Add re_arrow_store profile scopes #1546

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/re_arrow_store/src/store_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ impl IndexBucket {
return; // early read-only exit
}

crate::profile_scope!("sort");
self.indices.write().sort();
}

Expand All @@ -846,6 +847,7 @@ impl IndexBucket {
primary: ComponentName,
components: &[ComponentName; N],
) -> Option<[Option<RowIndex>; N]> {
crate::profile_function!();
self.sort_indices_if_needed();

let IndexBucketIndices {
Expand Down
8 changes: 8 additions & 0 deletions crates/re_arrow_store/src/store_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl DataStore {
/// Returns the number of timeless index rows stored across this entire store, i.e. the sum of
/// the number of rows across all of its timeless index tables.
pub fn total_timeless_index_rows(&self) -> u64 {
crate::profile_function!();
self.timeless_indices
.values()
.map(|table| table.total_rows())
Expand All @@ -78,6 +79,7 @@ impl DataStore {
/// Returns the size of the timeless index data stored across this entire store, i.e. the sum
/// of the size of the data stored across all of its timeless index tables, in bytes.
pub fn total_timeless_index_size_bytes(&self) -> u64 {
crate::profile_function!();
self.timeless_indices
.values()
.map(|table| table.total_size_bytes())
Expand All @@ -87,6 +89,7 @@ impl DataStore {
/// Returns the number of timeless component rows stored across this entire store, i.e. the
/// sum of the number of rows across all of its timeless component tables.
pub fn total_timeless_component_rows(&self) -> u64 {
crate::profile_function!();
self.timeless_components
.values()
.map(|table| table.total_rows())
Expand All @@ -96,6 +99,7 @@ impl DataStore {
/// Returns the size of the timeless component data stored across this entire store, i.e. the
/// sum of the size of the data stored across all of its timeless component tables, in bytes.
pub fn total_timeless_component_size_bytes(&self) -> u64 {
crate::profile_function!();
self.timeless_components
.values()
.map(|table| table.total_size_bytes())
Expand All @@ -105,12 +109,14 @@ impl DataStore {
/// Returns the number of temporal index rows stored across this entire store, i.e. the sum of
/// the number of rows across all of its temporal index tables.
pub fn total_temporal_index_rows(&self) -> u64 {
crate::profile_function!();
self.indices.values().map(|table| table.total_rows()).sum()
}

/// Returns the size of the temporal index data stored across this entire store, i.e. the sum
/// of the size of the data stored across all of its temporal index tables, in bytes.
pub fn total_temporal_index_size_bytes(&self) -> u64 {
crate::profile_function!();
self.indices
.values()
.map(|table| table.total_size_bytes())
Expand All @@ -120,6 +126,7 @@ impl DataStore {
/// Returns the number of temporal component rows stored across this entire store, i.e. the
/// sum of the number of rows across all of its temporal component tables.
pub fn total_temporal_component_rows(&self) -> u64 {
crate::profile_function!();
self.components
.values()
.map(|table| table.total_rows())
Expand All @@ -129,6 +136,7 @@ impl DataStore {
/// Returns the size of the temporal component data stored across this entire store, i.e. the
/// sum of the size of the data stored across all of its temporal component tables, in bytes.
pub fn total_temporal_component_size_bytes(&self) -> u64 {
crate::profile_function!();
self.components
.values()
.map(|table| table.total_size_bytes())
Expand Down