forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Memtrie] (2/n) Construction, refcounting, and lookup of memtrie. (ne…
…ar#9646) Construction: efficient bottom-up algorithm for constructing in-memory trie from flat storage. Refcounting: maintenance of multiple roots, and GC based on heights. Lookup: looking up a FlatStateValue from a root of the memtrie. Also includes a CLI tool to load the trie, to easily measure timing and memory usage.
- Loading branch information
1 parent
df17ea7
commit 7e28c38
Showing
16 changed files
with
1,070 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use near_o11y::metrics::{try_create_int_gauge_vec, IntGaugeVec}; | ||
use once_cell::sync::Lazy; | ||
|
||
pub static MEM_TRIE_ARENA_ACTIVE_ALLOCS_BYTES: Lazy<IntGaugeVec> = Lazy::new(|| { | ||
try_create_int_gauge_vec( | ||
"near_mem_trie_arena_active_allocs_bytes", | ||
"Total size of active allocations on the in-memory trie arena", | ||
&["shard_uid"], | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static MEM_TRIE_ARENA_ACTIVE_ALLOCS_COUNT: Lazy<IntGaugeVec> = Lazy::new(|| { | ||
try_create_int_gauge_vec( | ||
"near_mem_trie_arena_active_allocs_count", | ||
"Total number of active allocations on the in-memory trie arena", | ||
&["shard_uid"], | ||
) | ||
.unwrap() | ||
}); | ||
|
||
pub static MEM_TRIE_ARENA_MEMORY_USAGE_BYTES: Lazy<IntGaugeVec> = Lazy::new(|| { | ||
try_create_int_gauge_vec( | ||
"near_mem_trie_arena_memory_usage_bytes", | ||
"Memory usage of the in-memory trie arena", | ||
&["shard_uid"], | ||
) | ||
.unwrap() | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.