Editor for papermario-dx mods
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

integrate puffin profiling for dev builds

+198
+169
Cargo.lock
··· 508 508 checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 509 509 510 510 [[package]] 511 + name = "bincode" 512 + version = "1.3.3" 513 + source = "registry+https://github.com/rust-lang/crates.io-index" 514 + checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 515 + dependencies = [ 516 + "serde", 517 + ] 518 + 519 + [[package]] 511 520 name = "bindgen" 512 521 version = "0.72.1" 513 522 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 977 986 checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" 978 987 979 988 [[package]] 989 + name = "deranged" 990 + version = "0.5.8" 991 + source = "registry+https://github.com/rust-lang/crates.io-index" 992 + checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" 993 + dependencies = [ 994 + "powerfmt", 995 + ] 996 + 997 + [[package]] 980 998 name = "derive_arbitrary" 981 999 version = "1.4.2" 982 1000 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1222 1240 ] 1223 1241 1224 1242 [[package]] 1243 + name = "egui_extras" 1244 + version = "0.33.3" 1245 + source = "registry+https://github.com/rust-lang/crates.io-index" 1246 + checksum = "d01d34e845f01c62e3fded726961092e70417d66570c499b9817ab24674ca4ed" 1247 + dependencies = [ 1248 + "ahash", 1249 + "egui", 1250 + "enum-map", 1251 + "log", 1252 + "profiling", 1253 + "serde", 1254 + ] 1255 + 1256 + [[package]] 1225 1257 name = "egui_kittest" 1226 1258 version = "0.33.3" 1227 1259 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1309 1341 ] 1310 1342 1311 1343 [[package]] 1344 + name = "enum-map" 1345 + version = "2.7.3" 1346 + source = "registry+https://github.com/rust-lang/crates.io-index" 1347 + checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" 1348 + dependencies = [ 1349 + "enum-map-derive", 1350 + "serde", 1351 + ] 1352 + 1353 + [[package]] 1354 + name = "enum-map-derive" 1355 + version = "0.17.0" 1356 + source = "registry+https://github.com/rust-lang/crates.io-index" 1357 + checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" 1358 + dependencies = [ 1359 + "proc-macro2", 1360 + "quote", 1361 + "syn 2.0.117", 1362 + ] 1363 + 1364 + [[package]] 1312 1365 name = "enum_dispatch" 1313 1366 version = "0.3.13" 1314 1367 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2037 2090 dependencies = [ 2038 2091 "equivalent", 2039 2092 "hashbrown 0.16.1", 2093 + "serde", 2094 + "serde_core", 2040 2095 ] 2041 2096 2042 2097 [[package]] ··· 2131 2186 "loroscope", 2132 2187 "parallel_rdp", 2133 2188 "pm64", 2189 + "profiling", 2134 2190 "project", 2191 + "puffin", 2192 + "puffin_egui", 2135 2193 "raw-window-handle", 2136 2194 "rfd", 2137 2195 "star_rod_interop", ··· 2255 2313 checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 2256 2314 2257 2315 [[package]] 2316 + name = "log-once" 2317 + version = "0.4.1" 2318 + source = "registry+https://github.com/rust-lang/crates.io-index" 2319 + checksum = "6d8a05e3879b317b1b6dbf353e5bba7062bedcc59815267bb23eaa0c576cebf0" 2320 + dependencies = [ 2321 + "log", 2322 + ] 2323 + 2324 + [[package]] 2258 2325 name = "longest-increasing-subsequence" 2259 2326 version = "0.1.0" 2260 2327 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2565 2632 ] 2566 2633 2567 2634 [[package]] 2635 + name = "natord" 2636 + version = "1.0.9" 2637 + source = "registry+https://github.com/rust-lang/crates.io-index" 2638 + checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" 2639 + 2640 + [[package]] 2568 2641 name = "ndk" 2569 2642 version = "0.9.0" 2570 2643 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2657 2730 dependencies = [ 2658 2731 "num-traits", 2659 2732 ] 2733 + 2734 + [[package]] 2735 + name = "num-conv" 2736 + version = "0.2.0" 2737 + source = "registry+https://github.com/rust-lang/crates.io-index" 2738 + checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" 2660 2739 2661 2740 [[package]] 2662 2741 name = "num-integer" ··· 3260 3339 dependencies = [ 3261 3340 "zerovec", 3262 3341 ] 3342 + 3343 + [[package]] 3344 + name = "powerfmt" 3345 + version = "0.2.0" 3346 + source = "registry+https://github.com/rust-lang/crates.io-index" 3347 + checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 3263 3348 3264 3349 [[package]] 3265 3350 name = "ppv-lite86" ··· 3319 3404 version = "1.0.17" 3320 3405 source = "registry+https://github.com/rust-lang/crates.io-index" 3321 3406 checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" 3407 + dependencies = [ 3408 + "profiling-procmacros", 3409 + "puffin", 3410 + ] 3411 + 3412 + [[package]] 3413 + name = "profiling-procmacros" 3414 + version = "1.0.17" 3415 + source = "registry+https://github.com/rust-lang/crates.io-index" 3416 + checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" 3417 + dependencies = [ 3418 + "quote", 3419 + "syn 2.0.117", 3420 + ] 3322 3421 3323 3422 [[package]] 3324 3423 name = "project" ··· 3326 3425 dependencies = [ 3327 3426 "loro", 3328 3427 "loroscope", 3428 + ] 3429 + 3430 + [[package]] 3431 + name = "puffin" 3432 + version = "0.19.1" 3433 + source = "git+https://github.com/blip-radar/puffin?branch=egui-0.33#4a51e9f504f584e2e68a404cf24812bbb1be2300" 3434 + dependencies = [ 3435 + "anyhow", 3436 + "bincode", 3437 + "byteorder", 3438 + "cfg-if", 3439 + "itertools 0.14.0", 3440 + "lz4_flex", 3441 + "parking_lot", 3442 + "serde", 3443 + ] 3444 + 3445 + [[package]] 3446 + name = "puffin_egui" 3447 + version = "0.29.0" 3448 + source = "git+https://github.com/blip-radar/puffin?branch=egui-0.33#4a51e9f504f584e2e68a404cf24812bbb1be2300" 3449 + dependencies = [ 3450 + "egui", 3451 + "egui_extras", 3452 + "indexmap", 3453 + "log", 3454 + "log-once", 3455 + "natord", 3456 + "parking_lot", 3457 + "puffin", 3458 + "time", 3459 + "vec1", 3460 + "web-time", 3329 3461 ] 3330 3462 3331 3463 [[package]] ··· 4092 4224 ] 4093 4225 4094 4226 [[package]] 4227 + name = "time" 4228 + version = "0.3.47" 4229 + source = "registry+https://github.com/rust-lang/crates.io-index" 4230 + checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" 4231 + dependencies = [ 4232 + "deranged", 4233 + "itoa", 4234 + "num-conv", 4235 + "powerfmt", 4236 + "serde_core", 4237 + "time-core", 4238 + "time-macros", 4239 + ] 4240 + 4241 + [[package]] 4242 + name = "time-core" 4243 + version = "0.1.8" 4244 + source = "registry+https://github.com/rust-lang/crates.io-index" 4245 + checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" 4246 + 4247 + [[package]] 4248 + name = "time-macros" 4249 + version = "0.2.27" 4250 + source = "registry+https://github.com/rust-lang/crates.io-index" 4251 + checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" 4252 + dependencies = [ 4253 + "num-conv", 4254 + "time-core", 4255 + ] 4256 + 4257 + [[package]] 4095 4258 name = "tiny-skia" 4096 4259 version = "0.11.4" 4097 4260 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4350 4513 version = "0.1.1" 4351 4514 source = "registry+https://github.com/rust-lang/crates.io-index" 4352 4515 checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 4516 + 4517 + [[package]] 4518 + name = "vec1" 4519 + version = "1.12.1" 4520 + source = "registry+https://github.com/rust-lang/crates.io-index" 4521 + checksum = "eab68b56840f69efb0fefbe3ab6661499217ffdc58e2eef7c3f6f69835386322" 4353 4522 4354 4523 [[package]] 4355 4524 name = "version_check"
+7
Cargo.toml
··· 27 27 log = "0.4" 28 28 thiserror = "2" 29 29 anyhow = "1" 30 + profiling = "1.0" 31 + puffin = { git = "https://github.com/blip-radar/puffin", branch = "egui-0.33" } 32 + puffin_egui = { git = "https://github.com/blip-radar/puffin", branch = "egui-0.33" } 33 + 34 + [patch.crates-io] 35 + puffin = { git = "https://github.com/blip-radar/puffin", branch = "egui-0.33" } 36 + puffin_egui = { git = "https://github.com/blip-radar/puffin", branch = "egui-0.33" } 30 37 31 38 [workspace.lints.rust] 32 39 missing_debug_implementations = "warn"
+6
crates/kammy/Cargo.toml
··· 7 7 version = "0.1.0" 8 8 edition = "2024" 9 9 10 + [features] 11 + profile = ["dep:puffin", "dep:puffin_egui", "profiling/profile-with-puffin"] 12 + 10 13 [dependencies] 14 + profiling = { workspace = true } 15 + puffin = { workspace = true, optional = true } 16 + puffin_egui = { workspace = true, optional = true } 11 17 parallel_rdp = { path = "../parallel_rdp" } 12 18 pm64 = { path = "../pm64" } 13 19 project = { path = "../project" }
+8
crates/kammy/src/app.rs
··· 344 344 } 345 345 } 346 346 347 + #[profiling::function] 347 348 fn toolbar_ui(&mut self, ctx: &egui::Context) { 348 349 egui::TopBottomPanel::top("toolbar").show(ctx, |ui| { 349 350 ui.horizontal(|ui| { ··· 374 375 }); 375 376 } 376 377 378 + #[profiling::function] 377 379 fn status_bar_ui(&mut self, ctx: &egui::Context) { 378 380 egui::TopBottomPanel::bottom("status_bar").show(ctx, |ui| { 379 381 ui.horizontal(|ui| { ··· 392 394 }); 393 395 } 394 396 397 + #[profiling::function] 395 398 fn render_docks(&mut self, ctx: &egui::Context) { 396 399 // Determine commit origin from the active editor so tool edits 397 400 // are attributed to the correct undo stack. ··· 429 432 } 430 433 } 431 434 435 + #[profiling::function] 432 436 fn content_ui(&mut self, ctx: &egui::Context, gpu: Option<&mut GpuState>) { 433 437 egui::CentralPanel::default().show(ctx, |ui| { 434 438 // Snapshot each tabs container's children and active tab so we can ··· 522 526 /// Main UI update, called each frame from the winit event loop. 523 527 /// 524 528 /// `gpu` is `None` only in headless test environments. 529 + #[profiling::function] 525 530 pub fn update(&mut self, ctx: &egui::Context, gpu: Option<&mut GpuState>) { 531 + #[cfg(feature = "profile")] 532 + puffin_egui::profiler_window(ctx); 533 + 526 534 self.handle_keyboard(ctx); 527 535 subsecond::call(|| self.toolbar_ui(ctx)); 528 536 subsecond::call(|| self.status_bar_ui(ctx));
+5
crates/kammy/src/main.rs
··· 125 125 state.window.request_redraw(); 126 126 } 127 127 WindowEvent::RedrawRequested => { 128 + profiling::finish_frame!(); 129 + 128 130 let raw_input = state.egui_state.take_egui_input(&state.window); 129 131 let full_output = state.egui_ctx.run(raw_input, |ctx| { 130 132 subsecond::call(|| state.app.update(ctx, Some(&mut state.gpu))); ··· 172 174 .init(); 173 175 174 176 dioxus_devtools::connect_subsecond(); 177 + 178 + #[cfg(feature = "profile")] 179 + puffin::set_scopes_on(true); 175 180 176 181 subsecond::call(|| { 177 182 let event_loop = EventLoop::new().expect("failed to create event loop");
+3
justfile
··· 1 1 run: 2 2 dx serve --hot-patch -p kammy 3 3 4 + profile: 5 + dx serve --hot-patch -p kammy --features profile 6 + 4 7 fmt: 5 8 nix fmt 6 9