Report layers rendered to iced_beacon

This commit is contained in:
Héctor Ramón Jiménez 2025-04-29 23:01:45 +02:00
parent fae95d6095
commit 613c706a39
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 45 additions and 6 deletions

View file

@ -43,11 +43,15 @@ pub fn theme_changed(f: impl FnOnce() -> Option<theme::Palette>) {
}
pub fn tasks_spawned(amount: usize) {
internal::tasks_spawned(amount)
internal::tasks_spawned(amount);
}
pub fn subscriptions_tracked(amount: usize) {
internal::subscriptions_tracked(amount)
internal::subscriptions_tracked(amount);
}
pub fn layers_rendered(amount: impl FnOnce() -> usize) {
internal::layers_rendered(amount);
}
pub fn boot() -> Span {
@ -157,6 +161,10 @@ mod internal {
log(client::Event::SubscriptionsTracked(amount));
}
pub fn layers_rendered(amount: impl FnOnce() -> usize) {
log(client::Event::LayersRendered(amount()));
}
pub fn boot() -> Span {
span(span::Stage::Boot)
}
@ -300,8 +308,6 @@ mod internal {
use crate::futures::Subscription;
use crate::{Command, Primitive};
use std::io;
pub fn enable() {}
pub fn disable() {}
@ -317,6 +323,8 @@ mod internal {
pub fn subscriptions_tracked(_amount: usize) {}
pub fn layers_rendered(_amount: impl FnOnce() -> usize) {}
pub fn boot() -> Span {
Span
}