Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Add number of delayed validations to instance stats #1997

Merged
merged 3 commits into from
Dec 19, 2019
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions crates/core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub struct InstanceStats {
pub number_held_entries: usize,
pub number_held_aspects: usize,
pub number_pending_validations: usize,
pub number_delayed_validations: usize,
pub number_running_zome_calls: usize,
pub offline: bool,
}
Expand Down Expand Up @@ -412,6 +413,11 @@ impl Context {
.values()
.fold(0, |acc, aspect_set| acc + aspect_set.len()),
number_pending_validations: dht_store.queued_holding_workflows().len(),
number_delayed_validations: dht_store
.queued_holding_workflows
.iter()
.filter(|p| p.timeout.is_some())
.count(),
number_running_zome_calls: state.nucleus().running_zome_calls.len(),
offline: false,
})
Expand Down