Track commands spawned and subscriptions alive in beacon

This commit is contained in:
Héctor Ramón Jiménez 2024-05-13 13:21:10 +02:00
parent e770804435
commit b8adfc9ffe
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
8 changed files with 131 additions and 35 deletions

View file

@ -5,20 +5,36 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Span {
Boot,
Update,
View { window: window::Id },
Layout { window: window::Id },
Interact { window: window::Id },
Draw { window: window::Id },
Present { window: window::Id },
Custom { window: window::Id, name: String },
Update {
message: String,
commands_spawned: usize,
},
View {
window: window::Id,
},
Layout {
window: window::Id,
},
Interact {
window: window::Id,
},
Draw {
window: window::Id,
},
Present {
window: window::Id,
},
Custom {
window: window::Id,
name: String,
},
}
impl Span {
pub fn stage(&self) -> Stage {
match self {
Span::Boot => Stage::Boot,
Span::Update => Stage::Update,
Span::Update { .. } => Stage::Update,
Span::View { window } => Stage::View(*window),
Span::Layout { window } => Stage::Layout(*window),
Span::Interact { window } => Stage::Interact(*window),