update deps; add profiling

This commit is contained in:
facile pop culture reference 2026-08-14 13:36:37 +03:00
parent 95ace83756
commit 20517f09b4
5 changed files with 1232 additions and 618 deletions

1831
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,8 @@ description = "UI metaframework."
[features] [features]
default = ["lang", "sing", "midi", "draw", "play", "term", "text", "time", "rand", "okhsl", "eval", "exit"] default = ["lang", "sing", "midi", "draw", "play", "term", "text", "time", "rand", "okhsl", "eval", "exit"]
bumpalo = ["dep:bumpalo"] prof = ["dep:profiling", "dep:tracing", "dep:tracing-flame", "dep:tracing-subscriber"]
bump = ["dep:bumpalo"]
draw = [] draw = []
gui = ["draw", "dep:winit"] gui = ["draw", "dep:winit"]
eval = [] eval = []
@ -34,10 +35,15 @@ midly = { optional = true, version = "0.5" }
palette = { optional = true, version = "0.7.6", features = [ "random" ] } palette = { optional = true, version = "0.7.6", features = [ "random" ] }
quanta = { optional = true, version = "0.12.3" } quanta = { optional = true, version = "0.12.3" }
rand = { optional = true, version = "0.8.5" } rand = { optional = true, version = "0.8.5" }
ratatui = { optional = true, version = "0.29.0", features = [ "unstable-widget-ref", "underline-color" ] } ratatui = { optional = true, version = "^0.30.2", features = [ "unstable-widget-ref", "underline-color" ] }
unicode-width = { optional = true, version = "0.2" } unicode-width = { optional = true, version = "0.2" }
winit = { optional = true, version = "0.30.4", features = [ "x11" ]} winit = { optional = true, version = "0.30.4", features = [ "x11" ]}
profiling = { version = "1.0.18", optional = true, features = ["profile-with-tracing"] }
tracing = { version = "0.1", optional = true, default-features = false, features = [ "std" ] }
tracing-subscriber = { version = "0.3", optional = true }
tracing-flame = { version = "0.2", optional = true }
[dev-dependencies] [dev-dependencies]
proptest = { version = "^1" } proptest = { version = "^1" }
proptest-derive = { version = "^0.5.1" } proptest-derive = { version = "^0.5.1" }

2
dizzle

@ -1 +1 @@
Subproject commit ab177b0d0d1ccdff0c69f915847be9a23a364663 Subproject commit 947a2f36a60869ee9aab40aa43d06e1e1c100730

View file

@ -211,9 +211,11 @@ impl Sizer {
} }
fn_kw_layout!($kw_name |state, output, expr| { fn_kw_layout!($kw_name |state, output, expr| {
#[cfg(feature = "prof")] profiling::scope!(stringify!(match $kw_name));
let head = expr.head()?; let head = expr.head()?;
let mut frags = head.src()?.unwrap_or_default().split("/"); let mut frags = head.src()?.unwrap_or_default().split("/");
Ok(matches!(frags.next(), Some($name)).then(||{ Ok(matches!(frags.next(), Some($name)).then(||{
#[cfg(feature = "prof")] profiling::scope!(stringify!(inner $kw_name));
let args = expr.tail(); let args = expr.tail();
let arg0 = args.head(); let arg0 = args.head();
let tail0 = args.tail(); let tail0 = args.tail();
@ -253,9 +255,11 @@ impl Sizer {
} }
fn_kw_layout!($kw_name |state, output, expr| { fn_kw_layout!($kw_name |state, output, expr| {
#[cfg(feature = "prof")] profiling::scope!(stringify!(match $kw_name));
let head = expr.head()?; let head = expr.head()?;
let mut frags = head.src()?.unwrap_or_default().split("/"); let mut frags = head.src()?.unwrap_or_default().split("/");
Ok(matches!(frags.next(), Some($name)).then(||{ Ok(matches!(frags.next(), Some($name)).then(||{
#[cfg(feature = "prof")] profiling::scope!(stringify!(inner $kw_name));
let args = expr.tail(); let args = expr.tail();
let arg0 = args.head(); let arg0 = args.head();
eval_xy!( eval_xy!(

View file

@ -1205,7 +1205,8 @@ pub trait AsMutOpt<T> { fn as_mut_opt (&mut self) -> Option<&mut T>; }
Ok(Self { Ok(Self {
exit: exit.clone(), exit: exit.clone(),
perf: perf.clone(), perf: perf.clone(),
join: Builder::new().name("tengri tui output".into()).spawn(move || { join: Builder::new().name("tengri task".into()).spawn(move || {
#[cfg(feature = "prof")] profiling::register_thread!();
while !exit.fetch_and(true, Relaxed) { while !exit.fetch_and(true, Relaxed) {
let _ = perf.cycle(&mut call); let _ = perf.cycle(&mut call);
} }