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

Commit

Permalink
Merge pull request #1997 from holochain/stats-number-delayed
Browse files Browse the repository at this point in the history
Add number of delayed validations to instance stats
  • Loading branch information
thedavidmeister authored Dec 19, 2019
2 parents 8cf24eb + 33b8174 commit eaa250a
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit eaa250a

Please sign in to comment.