Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
bdf01611
Unverified
Commit
bdf01611
authored
Apr 23, 2026
by
hhzhang16
Committed by
GitHub
Apr 23, 2026
Browse files
fix: implement block_count and worker_count for CRTC (#8559)
Signed-off-by:
Hannah Zhang
<
hannahz@nvidia.com
>
parent
60764414
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
lib/kv-router/src/indexer/concurrent_radix_tree.rs
lib/kv-router/src/indexer/concurrent_radix_tree.rs
+11
-0
lib/kv-router/src/indexer/concurrent_radix_tree_compressed.rs
...kv-router/src/indexer/concurrent_radix_tree_compressed.rs
+11
-0
lib/kv-router/src/indexer/positional.rs
lib/kv-router/src/indexer/positional.rs
+11
-0
No files found.
lib/kv-router/src/indexer/concurrent_radix_tree.rs
View file @
bdf01611
...
...
@@ -712,6 +712,17 @@ impl SyncIndexer for ConcurrentRadixTree {
cleanup_guard
.mark_completed
();
}
fn
worker_count
(
&
self
)
->
usize
{
self
.tree_sizes
.len
()
}
fn
block_count
(
&
self
)
->
usize
{
self
.tree_sizes
.iter
()
.map
(|
e
|
e
.value
()
.load
(
Ordering
::
Relaxed
))
.sum
()
}
fn
dump_events
(
&
self
)
->
Option
<
Vec
<
RouterEvent
>>
{
Some
(
self
.dump_tree_as_events
())
}
...
...
lib/kv-router/src/indexer/concurrent_radix_tree_compressed.rs
View file @
bdf01611
...
...
@@ -1388,6 +1388,17 @@ impl SyncIndexer for ConcurrentRadixTreeCompressed {
cleanup_guard
.mark_completed
();
}
fn
worker_count
(
&
self
)
->
usize
{
self
.tree_sizes
.len
()
}
fn
block_count
(
&
self
)
->
usize
{
self
.tree_sizes
.iter
()
.map
(|
e
|
e
.value
()
.load
(
Ordering
::
Relaxed
))
.sum
()
}
fn
dump_events
(
&
self
)
->
Option
<
Vec
<
RouterEvent
>>
{
Some
(
self
.dump_tree_as_events
())
}
...
...
lib/kv-router/src/indexer/positional.rs
View file @
bdf01611
...
...
@@ -190,6 +190,17 @@ impl SyncIndexer for PositionalIndexer {
fn
find_matches
(
&
self
,
sequence
:
&
[
LocalBlockHash
],
early_exit
:
bool
)
->
OverlapScores
{
self
.jump_search_matches
(
sequence
,
early_exit
)
}
fn
worker_count
(
&
self
)
->
usize
{
self
.tree_sizes
.len
()
}
fn
block_count
(
&
self
)
->
usize
{
self
.tree_sizes
.iter
()
.map
(|
e
|
e
.value
()
.load
(
Ordering
::
Relaxed
))
.sum
()
}
}
// ============================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment