Skip to content

Add SystemInfo for WT and indecies#67

Merged
Handy-caT merged 11 commits intomainfrom
system-info
Apr 6, 2025
Merged

Add SystemInfo for WT and indecies#67
Handy-caT merged 11 commits intomainfrom
system-info

Conversation

@the2pizza
Copy link
Copy Markdown

@the2pizza the2pizza commented Mar 31, 2025

Counts data and indicies size

let info = table.system_info();
println!("{info}");
┌──────────────────────────────┐
 	 Table Name: My   
└──────────────────────────────┘
Rows: 999998   Pages: 5883   Empty slots: 1
Allocated Memory: 92.09 MB (data) + 236.51 MB (indexes) = 328.60 MB total

 Index | Type       | Keys   | Capacity | Node Count | Heap      | Used 
 idx3  | non unique | 999998 | 1918976  | 1874       | 103.95 MB | 61.88 MB 
 idx1  | non unique | 999998 | 1918976  | 1874       | 102.04 MB | 59.98 MB 
 idx2  | unique     | 999998 | 1999872  | 1953       | 30.52 MB  | 15.26 MB

@Handy-caT
Copy link
Copy Markdown
Collaborator

I think this task really needs some researches on how to properly measure objects separately

@the2pizza
Copy link
Copy Markdown
Author

depends on brurucy/indexset#35.

@Handy-caT
Copy link
Copy Markdown
Collaborator

@the2pizza You need to make macro usable with enums too. Last error is in tests, because it panics on SomeEnum deriving.

@the2pizza
Copy link
Copy Markdown
Author

@Handy-caT A bit reworked, added more primitives and macro for them, test've been fixed

Question - should we support chrono crate time types? I suppose it's usable for end users, we can add cfg option for chrono as well

@Handy-caT
Copy link
Copy Markdown
Collaborator

@the2pizza You can add it in separate PR

@Handy-caT Handy-caT merged commit 33f8e91 into main Apr 6, 2025
3 of 4 checks passed
@Handy-caT Handy-caT deleted the system-info branch April 6, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants