app: cherry-pick rune's pause and sound fixes onto the checkout
Rune comes from app/vendor/rune now, a checkout of 63ad0209 on branch ported, carrying the four commits of upstream issues 1320 (a pause while a clip is layered holds the layer's picture and time) and 1325 (a video's sound is read ahead of the clock and leads it). Both were written against eb9f1104 and ported across the refactors since. The faults are the first two and the third in docs/rune-upstream.md; the app's workarounds in review.rs stay until the fixes arrive upstream.
This commit is contained in:
1 parent
80fef698ce
commit
5bf262b82b
3795 files changed
+663463
-28
No files matched your search
@@ -0,0 +1,3 @@
|
||||
/target/
|
||||
/results/
|
||||
__pycache__/
|
||||
+909
@@ -0,0 +1,909 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.20.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
||||
|
||||
[[package]]
|
||||
name = "const_format"
|
||||
version = "0.2.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e"
|
||||
dependencies = [
|
||||
"const_format_proc_macros",
|
||||
"konst",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const_format_proc_macros"
|
||||
version = "0.2.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "data-encoding"
|
||||
version = "2.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-cli-config"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "322d10f47effebd85ee0662a2cb083ff920d40dd6295a4afd8cfa4f9bc2e05c6"
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-core"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b232228ada232c0adc151e41ebd9ef70cc04683db097fa0dc6015979fa01722"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"const_format",
|
||||
"dioxus-core-types",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
"generational-box",
|
||||
"longest-increasing-subsequence",
|
||||
"rustc-hash",
|
||||
"rustversion",
|
||||
"serde",
|
||||
"slab",
|
||||
"slotmap",
|
||||
"subsecond",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-core-types"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96007ed6cbad951dfed82d83c581aabd95bc591f351f5666d454ddbe7845b324"
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-devtools"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "434cebb282b3f820a341582ebfd37dab907d5a25c3eeafd87802468afcd2a959"
|
||||
dependencies = [
|
||||
"dioxus-cli-config",
|
||||
"dioxus-core",
|
||||
"dioxus-devtools-types",
|
||||
"dioxus-signals",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"subsecond",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"tungstenite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-devtools-types"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfd6f3475e38c93be245a664a9ce11679a8f2b99832620705cf7837f42aa39ce"
|
||||
dependencies = [
|
||||
"dioxus-core",
|
||||
"serde",
|
||||
"subsecond-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-signals"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95d85e36fcaf7abdc986836801bf248776da7d5961f5fac65fdbf5ed491afb4f"
|
||||
dependencies = [
|
||||
"dioxus-core",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
"generational-box",
|
||||
"parking_lot",
|
||||
"rustc-hash",
|
||||
"tracing",
|
||||
"warnings",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
"pin-project-lite",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generational-box"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8b2dc9b873cd1a8adb80aa5dcef9a8205f781a8a313d5ffb867248cb3bcb764"
|
||||
dependencies = [
|
||||
"parking_lot",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.14.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasip2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "konst"
|
||||
version = "0.2.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb"
|
||||
dependencies = [
|
||||
"konst_macro_rules",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "konst_macro_rules"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.191"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.8.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
|
||||
dependencies = [
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
|
||||
|
||||
[[package]]
|
||||
name = "longest-increasing-subsequence"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"
|
||||
|
||||
[[package]]
|
||||
name = "rune-hot-patch"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dioxus-devtools",
|
||||
"subsecond",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
||||
|
||||
[[package]]
|
||||
name = "memfd"
|
||||
version = "0.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90"
|
||||
dependencies = [
|
||||
"rustix",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
version = "0.9.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.12.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
|
||||
dependencies = [
|
||||
"lock_api",
|
||||
"parking_lot_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.9.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"smallvec",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "1.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "1.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
|
||||
dependencies = [
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
|
||||
dependencies = [
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_core"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.229"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 3.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.154"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
||||
|
||||
[[package]]
|
||||
name = "slotmap"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.16.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b"
|
||||
|
||||
[[package]]
|
||||
name = "subsecond"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d350d5788fa94d560d92269266a50efc77b036bfca6675e420b64df7b3211f37"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"libc",
|
||||
"libloading",
|
||||
"memfd",
|
||||
"memmap2",
|
||||
"serde",
|
||||
"subsecond-types",
|
||||
"thiserror",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "subsecond-types"
|
||||
version = "0.7.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcf32d66269b5fbb8558334e8d22b657b2f7af0dd2ef56c231541099a862e464"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.119"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "3.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 3.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.54.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"data-encoding",
|
||||
"http",
|
||||
"httparse",
|
||||
"log",
|
||||
"rand",
|
||||
"sha1",
|
||||
"thiserror",
|
||||
"utf-8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||
|
||||
[[package]]
|
||||
name = "utf-8"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "warnings"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64f68998838dab65727c9b30465595c6f7c953313559371ca8bf31759b3680ad"
|
||||
dependencies = [
|
||||
"pin-project",
|
||||
"tracing",
|
||||
"warnings-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "warnings-macro"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasip2"
|
||||
version = "1.0.4+wasi-0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
|
||||
dependencies = [
|
||||
"wit-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.129"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"tokio",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.129"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.129"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 3.0.9",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.129"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.61.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.57.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.63"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.63"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.119",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "rune-hot-patch"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
subsecond = "=0.7.10"
|
||||
dioxus-devtools = { version = "=0.7.10", default-features = false }
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 0
|
||||
debug = 0
|
||||
incremental = true
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
# Headless Subsecond spike
|
||||
|
||||
Measured on an Apple M2 Max build Mac. See [the research report](../../research/08-spike-hot-patch.md) for conclusions and qualifications. `evidence/` contains the recorded JSON results; `results/` contains disposable full logs from a run.
|
||||
|
||||
This is a Rust terminal binary, with no Dioxus UI or window. `main` owns the state and runs a nominal 120 Hz loop. The patched function returns a string. The Python driver edits Rust source and consumes actual frame events, using timestamps from the same machine.
|
||||
|
||||
## Run
|
||||
|
||||
Copy this directory into its own scratch Git repository on the build machine, outside the Rune workspace:
|
||||
|
||||
```sh
|
||||
mkdir -p <scratch>/rune-hot-patch && git -C <scratch>/rune-hot-patch init
|
||||
rsync -az --exclude target --exclude results --exclude evidence \
|
||||
spikes/hot-patch/ <scratch>/rune-hot-patch/
|
||||
```
|
||||
|
||||
If Dioxus CLI is missing, install the release used by this spike:
|
||||
|
||||
```sh
|
||||
cargo-binstall dioxus-cli --version 0.7.10 --no-confirm
|
||||
"$HOME/.cargo/bin/dx" --version
|
||||
```
|
||||
|
||||
Homebrew's `dx` is Deno's command, not Dioxus. The harness deliberately uses the absolute Dioxus path.
|
||||
|
||||
Run each mode from the scratch repository, one at a time:
|
||||
|
||||
```sh
|
||||
for mode in builds benchmark probes extras; do
|
||||
python3 run.py "$mode"
|
||||
done
|
||||
```
|
||||
|
||||
`builds` requires a fresh artifact directory; choose a new `RUNE_NORMAL_TARGET` if `target/normal` already exists. This prevents labeling a warm build as cold. For example, put `env RUNE_NORMAL_TARGET=target/normal-new` before `python3` in the command above. Each probe launches a fresh process, patches once, records its observations, stops the process group, and restores the source. Do not run modes concurrently.
|
||||
|
||||
The boundary-signature probe can be run alone:
|
||||
|
||||
```sh
|
||||
python3 run.py extras --case explicit_hotfn_signature
|
||||
```
|
||||
|
||||
The underlying headless command is:
|
||||
|
||||
```sh
|
||||
"$HOME/.cargo/bin/dx" serve --hot-patch --platform server \
|
||||
--open false --interactive false --addr 127.0.0.1 --port 18743
|
||||
```
|
||||
|
||||
The harness disables any inherited sccache wrapper, enables incremental compilation, and limits Cargo to two jobs. The measured runs used background scheduling priority, under which a nominal 120 Hz sleep loop runs in bursts; this is not a display-pacing benchmark.
|
||||
|
||||
## Interpreting the probes
|
||||
|
||||
- The benchmark uses a two-reference closure capture to work around 0.7.10's pointer-sized-closure dispatch bug. `extras` reproduces the broken single capture and verifies `HotFn::current(render).call((&state,))` as a cleaner integration.
|
||||
- The layout probe adds a field but never explicitly reads it. It demonstrates that patches can cross incompatible layouts without a rejection or migration; it does not establish memory safety.
|
||||
- A successful revision with unchanged PID, increasing counter, unchanged state/Vec addresses, and `vec0 == counter + 73` establishes preservation of this sample's main-owned state only.
|
||||
- Private and exported tip-crate statics, thread locals, and cached trait objects have separate observations. Their behavior must not be inferred from the main-owned-state result.
|
||||
- `p95_nearest_rank_ms` is the largest of ten samples. There is no statistical claim beyond this small run.
|
||||
@@ -0,0 +1,442 @@
|
||||
{
|
||||
"command": [
|
||||
"~/.cargo/bin/dx",
|
||||
"serve",
|
||||
"--hot-patch",
|
||||
"--platform",
|
||||
"server",
|
||||
"--open",
|
||||
"false",
|
||||
"--interactive",
|
||||
"false",
|
||||
"--addr",
|
||||
"127.0.0.1",
|
||||
"--port",
|
||||
"18743"
|
||||
],
|
||||
"launch_to_tick60_ms": 7001.939,
|
||||
"rows": [
|
||||
{
|
||||
"saved_ns": 1792642085506222000,
|
||||
"latency_ms": 1150.117,
|
||||
"before": {
|
||||
"ns": 1792642085503443000,
|
||||
"pid": 12294,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642086561740000,
|
||||
"pid": 12294,
|
||||
"counter": 202,
|
||||
"vec0": 275,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=275;generic=g0:202;closure=212;trait=t0:800x600;static=1201;tls=2201;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642086656339000,
|
||||
"pid": 12294,
|
||||
"counter": 203,
|
||||
"vec0": 276,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=1;value=276;generic=g0:203;closure=213;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642086605967000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642086838981000,
|
||||
"latency_ms": 712.42,
|
||||
"before": {
|
||||
"ns": 1792642086835450000,
|
||||
"pid": 12294,
|
||||
"counter": 233,
|
||||
"vec0": 306,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=1;value=306;generic=g0:233;closure=243;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642087349187000,
|
||||
"pid": 12294,
|
||||
"counter": 297,
|
||||
"vec0": 370,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=1;value=370;generic=g0:297;closure=307;trait=t0:800x600;static=1094;tls=2094;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642087551401000,
|
||||
"pid": 12294,
|
||||
"counter": 298,
|
||||
"vec0": 371,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=2;value=371;generic=g0:298;closure=308;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642087501981000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642087751298000,
|
||||
"latency_ms": 998.195,
|
||||
"before": {
|
||||
"ns": 1792642087749279000,
|
||||
"pid": 12294,
|
||||
"counter": 328,
|
||||
"vec0": 401,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=2;value=401;generic=g0:328;closure=338;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642088550413000,
|
||||
"pid": 12294,
|
||||
"counter": 441,
|
||||
"vec0": 514,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=2;value=514;generic=g0:441;closure=451;trait=t0:800x600;static=1143;tls=2143;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642088749493000,
|
||||
"pid": 12294,
|
||||
"counter": 442,
|
||||
"vec0": 515,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=3;value=515;generic=g0:442;closure=452;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642088559161000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642088953242000,
|
||||
"latency_ms": 867.826,
|
||||
"before": {
|
||||
"ns": 1792642088951300000,
|
||||
"pid": 12294,
|
||||
"counter": 472,
|
||||
"vec0": 545,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=3;value=545;generic=g0:472;closure=482;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642089613359000,
|
||||
"pid": 12294,
|
||||
"counter": 569,
|
||||
"vec0": 642,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=3;value=642;generic=g0:569;closure=579;trait=t0:800x600;static=1127;tls=2127;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642089821068000,
|
||||
"pid": 12294,
|
||||
"counter": 570,
|
||||
"vec0": 643,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=4;value=643;generic=g0:570;closure=580;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642089665812000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642090034248000,
|
||||
"latency_ms": 753.253,
|
||||
"before": {
|
||||
"ns": 1792642090033362000,
|
||||
"pid": 12294,
|
||||
"counter": 600,
|
||||
"vec0": 673,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=4;value=673;generic=g0:600;closure=610;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642090627389000,
|
||||
"pid": 12294,
|
||||
"counter": 690,
|
||||
"vec0": 763,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=4;value=763;generic=g0:690;closure=700;trait=t0:800x600;static=1120;tls=2120;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642090787501000,
|
||||
"pid": 12294,
|
||||
"counter": 691,
|
||||
"vec0": 764,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=5;value=764;generic=g0:691;closure=701;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642090786059000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642091031835000,
|
||||
"latency_ms": 1005.25,
|
||||
"before": {
|
||||
"ns": 1792642091029866000,
|
||||
"pid": 12294,
|
||||
"counter": 721,
|
||||
"vec0": 794,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=5;value=794;generic=g0:721;closure=731;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642091830376000,
|
||||
"pid": 12294,
|
||||
"counter": 835,
|
||||
"vec0": 908,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=5;value=908;generic=g0:835;closure=845;trait=t0:800x600;static=1144;tls=2144;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642092037085000,
|
||||
"pid": 12294,
|
||||
"counter": 836,
|
||||
"vec0": 909,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=6;value=909;generic=g0:836;closure=846;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642091865846000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642092106997000,
|
||||
"latency_ms": 851.558,
|
||||
"before": {
|
||||
"ns": 1792642092105159000,
|
||||
"pid": 12294,
|
||||
"counter": 866,
|
||||
"vec0": 939,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=6;value=939;generic=g0:866;closure=876;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642092920925000,
|
||||
"pid": 12294,
|
||||
"counter": 965,
|
||||
"vec0": 1038,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=6;value=1038;generic=g0:965;closure=975;trait=t0:800x600;static=1129;tls=2129;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642092958555000,
|
||||
"pid": 12294,
|
||||
"counter": 966,
|
||||
"vec0": 1039,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=7;value=1039;generic=g0:966;closure=976;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642092924546000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642093312077000,
|
||||
"latency_ms": 979.82,
|
||||
"before": {
|
||||
"ns": 1792642093311180000,
|
||||
"pid": 12294,
|
||||
"counter": 996,
|
||||
"vec0": 1069,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=7;value=1069;generic=g0:996;closure=1006;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642094093259000,
|
||||
"pid": 12294,
|
||||
"counter": 1106,
|
||||
"vec0": 1179,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=7;value=1179;generic=g0:1106;closure=1116;trait=t0:800x600;static=1140;tls=2140;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642094291897000,
|
||||
"pid": 12294,
|
||||
"counter": 1107,
|
||||
"vec0": 1180,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=8;value=1180;generic=g0:1107;closure=1117;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642094172697000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642094492841000,
|
||||
"latency_ms": 1036.368,
|
||||
"before": {
|
||||
"ns": 1792642094490695000,
|
||||
"pid": 12294,
|
||||
"counter": 1137,
|
||||
"vec0": 1210,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=8;value=1210;generic=g0:1137;closure=1147;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642095323670000,
|
||||
"pid": 12294,
|
||||
"counter": 1254,
|
||||
"vec0": 1327,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=8;value=1327;generic=g0:1254;closure=1264;trait=t0:800x600;static=1147;tls=2147;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642095529209000,
|
||||
"pid": 12294,
|
||||
"counter": 1255,
|
||||
"vec0": 1328,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=9;value=1328;generic=g0:1255;closure=1265;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642095408833000
|
||||
]
|
||||
},
|
||||
{
|
||||
"saved_ns": 1792642095766266000,
|
||||
"latency_ms": 1030.275,
|
||||
"before": {
|
||||
"ns": 1792642095763851000,
|
||||
"pid": 12294,
|
||||
"counter": 1285,
|
||||
"vec0": 1358,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=9;value=1358;generic=g0:1285;closure=1295;trait=t0:800x600;static=1030;tls=2030;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642096590552000,
|
||||
"pid": 12294,
|
||||
"counter": 1406,
|
||||
"vec0": 1479,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=9;value=1479;generic=g0:1406;closure=1416;trait=t0:800x600;static=1151;tls=2151;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642096796541000,
|
||||
"pid": 12294,
|
||||
"counter": 1407,
|
||||
"vec0": 1480,
|
||||
"vec_ptr": 4313468912,
|
||||
"state_addr": 6169897736,
|
||||
"panel_width": 800,
|
||||
"output": "rev=10;value=1480;generic=g0:1407;closure=1417;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642096704994000
|
||||
]
|
||||
}
|
||||
],
|
||||
"median_ms": 989.0075,
|
||||
"p95_nearest_rank_ms": 1150.117
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"name": "cold",
|
||||
"elapsed_ms": 71333.100958,
|
||||
"exit": 0,
|
||||
"command": [
|
||||
"cargo",
|
||||
"build",
|
||||
"--target-dir",
|
||||
"target/normal-final"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "incremental",
|
||||
"elapsed_ms": 1846.435208,
|
||||
"exit": 0,
|
||||
"command": [
|
||||
"cargo",
|
||||
"build",
|
||||
"--target-dir",
|
||||
"target/normal-final"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"date": "2026-10-21",
|
||||
"host": "macOS arm64",
|
||||
"chip": "Apple M2 Max",
|
||||
"cores": 12,
|
||||
"ram_gib": 96,
|
||||
"macos": "27.0.1 (26A434)",
|
||||
"rustc": "rustc 1.99.0 (b940084d7 2026-09-28)",
|
||||
"toolchain": "stable-aarch64-apple-darwin",
|
||||
"dx": "dioxus 0.7.10 (57d6794)",
|
||||
"dx_path": "~/.cargo/bin/dx",
|
||||
"subsecond": "0.7.10",
|
||||
"dioxus_devtools": "0.7.10",
|
||||
"xcode": "27.1 (27A9275)",
|
||||
"installed_rust_targets": ["aarch64-apple-darwin"],
|
||||
"booted_simulators_at_inspection": 0,
|
||||
"runner": "local: python3 run.py",
|
||||
"cargo_jobs": 2,
|
||||
"rustc_wrapper": "disabled because inherited sccache rejects CARGO_INCREMENTAL=1",
|
||||
"dev_profile": {"opt_level": 0, "debug": 0, "incremental": true},
|
||||
"scheduler": "taskpolicy background/utility, nice 10",
|
||||
"windows_opened": false,
|
||||
"gpu_tested": false,
|
||||
"ios_tested": false
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"explicit_hotfn_signature": {
|
||||
"saved_ns": 1792642443553528000,
|
||||
"error": "Empty: ",
|
||||
"before": {
|
||||
"ns": 1792642443549997000,
|
||||
"pid": 16842,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4356149072,
|
||||
"state_addr": 6124137224,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"last": {
|
||||
"ns": 1792642448698142000,
|
||||
"pid": 16842,
|
||||
"counter": 666,
|
||||
"vec0": 739,
|
||||
"vec_ptr": 4356149072,
|
||||
"state_addr": 6124137224,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=739;generic=g0:666;closure=676;trait=t0:800x600;static=1665;tls=2665;layout=48"
|
||||
},
|
||||
"dx_exit": null,
|
||||
"all_patch_ns": [
|
||||
1792642444347318000
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"single_capture": {
|
||||
"saved_ns": 1792642220464464000,
|
||||
"error": "Empty: ",
|
||||
"before": {
|
||||
"ns": 1792642220461332000,
|
||||
"pid": 14121,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4387229680,
|
||||
"state_addr": 6095825680,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"last": {
|
||||
"ns": 1792642225604792000,
|
||||
"pid": 14121,
|
||||
"counter": 668,
|
||||
"vec0": 741,
|
||||
"vec_ptr": 4387229680,
|
||||
"state_addr": 6095825680,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=741;generic=g0:668;closure=678;trait=t0:800x600;static=1667;tls=2667;layout=48"
|
||||
},
|
||||
"dx_exit": null,
|
||||
"all_patch_ns": [
|
||||
1792642221450704000
|
||||
]
|
||||
},
|
||||
"explicit_hotfn": {
|
||||
"saved_ns": 1792642231822687000,
|
||||
"latency_ms": 918.212,
|
||||
"before": {
|
||||
"ns": 1792642231821365000,
|
||||
"pid": 14252,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4309602288,
|
||||
"state_addr": 6171896584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642232550510000,
|
||||
"pid": 14252,
|
||||
"counter": 162,
|
||||
"vec0": 235,
|
||||
"vec_ptr": 4309602288,
|
||||
"state_addr": 6171896584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=235;generic=g0:162;closure=172;trait=t0:800x600;static=1161;tls=2161;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642232740899000,
|
||||
"pid": 14252,
|
||||
"counter": 163,
|
||||
"vec0": 236,
|
||||
"vec_ptr": 4309602288,
|
||||
"state_addr": 6171896584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=93;value=236;generic=g0:163;closure=173;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642232682946000
|
||||
],
|
||||
"all_patch_ns": [
|
||||
1792642232682946000
|
||||
]
|
||||
},
|
||||
"exported_static": {
|
||||
"saved_ns": 1792642237684455000,
|
||||
"latency_ms": 1103.955,
|
||||
"before": {
|
||||
"ns": 1792642237680850000,
|
||||
"pid": 14373,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4326019056,
|
||||
"state_addr": 6155168520,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642238581962000,
|
||||
"pid": 14373,
|
||||
"counter": 182,
|
||||
"vec0": 255,
|
||||
"vec_ptr": 4326019056,
|
||||
"state_addr": 6155168520,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=255;generic=g0:182;closure=192;trait=t0:800x600;static=1181;tls=2181;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642238788410000,
|
||||
"pid": 14373,
|
||||
"counter": 183,
|
||||
"vec0": 256,
|
||||
"vec_ptr": 4326019056,
|
||||
"state_addr": 6155168520,
|
||||
"panel_width": 800,
|
||||
"output": "rev=93;value=256;generic=g0:183;closure=193;trait=t0:800x600;static=9000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642238700397000
|
||||
],
|
||||
"all_patch_ns": [
|
||||
1792642238700397000
|
||||
]
|
||||
},
|
||||
"cached_trait_object": {
|
||||
"saved_ns": 1792642243409971000,
|
||||
"latency_ms": 837.707,
|
||||
"before": {
|
||||
"ns": 1792642243408744000,
|
||||
"pid": 14490,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4389916656,
|
||||
"state_addr": 6092237576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:42x24;static=1059;tls=2059;layout=64"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642244055695000,
|
||||
"pid": 14490,
|
||||
"counter": 152,
|
||||
"vec0": 225,
|
||||
"vec_ptr": 4389916656,
|
||||
"state_addr": 6092237576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=225;generic=g0:152;closure=162;trait=t0:42x24;static=1151;tls=2151;layout=64"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642244247678000,
|
||||
"pid": 14490,
|
||||
"counter": 153,
|
||||
"vec0": 226,
|
||||
"vec_ptr": 4389916656,
|
||||
"state_addr": 6092237576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=93;value=226;generic=g0:153;closure=163;trait=t0:42x24;static=1000;tls=2000;layout=64"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642244210145000
|
||||
],
|
||||
"all_patch_ns": [
|
||||
1792642244210145000
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"name": "cold",
|
||||
"elapsed_ms": 79599.681459,
|
||||
"exit": 0,
|
||||
"command": [
|
||||
"cargo",
|
||||
"build",
|
||||
"--target-dir",
|
||||
"target/normal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "incremental",
|
||||
"elapsed_ms": 1671.94775,
|
||||
"exit": 0,
|
||||
"command": [
|
||||
"cargo",
|
||||
"build",
|
||||
"--target-dir",
|
||||
"target/normal"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"command": [
|
||||
"~/.cargo/bin/dx",
|
||||
"serve",
|
||||
"--hot-patch",
|
||||
"--platform",
|
||||
"server",
|
||||
"--open",
|
||||
"false",
|
||||
"--interactive",
|
||||
"false",
|
||||
"--addr",
|
||||
"127.0.0.1",
|
||||
"--port",
|
||||
"18743"
|
||||
],
|
||||
"launch_to_tick60_ms": 139455.02,
|
||||
"rows": [
|
||||
{
|
||||
"saved_ns": 1792641351383807000,
|
||||
"error": "Empty: ",
|
||||
"before": {
|
||||
"ns": 1792641351381246000,
|
||||
"pid": 341,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4383383296,
|
||||
"state_addr": 6091696912,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"last": {
|
||||
"ns": 1792641381515163000,
|
||||
"pid": 341,
|
||||
"counter": 3665,
|
||||
"vec0": 3738,
|
||||
"vec_ptr": 4383383296,
|
||||
"state_addr": 6091696912,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=3738;generic=g0:3665;closure=3675;trait=t0:800x600;static=4664;tls=5664;layout=48"
|
||||
},
|
||||
"dx_exit": null
|
||||
}
|
||||
],
|
||||
"median_ms": null,
|
||||
"p95_nearest_rank_ms": null
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
{
|
||||
"generic": {
|
||||
"saved_ns": 1792642108306413000,
|
||||
"latency_ms": 811.216,
|
||||
"before": {
|
||||
"ns": 1792642108304765000,
|
||||
"pid": 12680,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4352643056,
|
||||
"state_addr": 6131149576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642108913479000,
|
||||
"pid": 12680,
|
||||
"counter": 134,
|
||||
"vec0": 207,
|
||||
"vec_ptr": 4352643056,
|
||||
"state_addr": 6131149576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=207;generic=g0:134;closure=144;trait=t0:800x600;static=1133;tls=2133;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642109117629000,
|
||||
"pid": 12680,
|
||||
"counter": 135,
|
||||
"vec0": 208,
|
||||
"vec_ptr": 4352643056,
|
||||
"state_addr": 6131149576,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=208;generic=g1:135;closure=145;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642108947293000
|
||||
]
|
||||
},
|
||||
"closure": {
|
||||
"saved_ns": 1792642112595462000,
|
||||
"latency_ms": 974.11,
|
||||
"before": {
|
||||
"ns": 1792642112592532000,
|
||||
"pid": 12767,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4326526960,
|
||||
"state_addr": 6155987720,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642113416884000,
|
||||
"pid": 12767,
|
||||
"counter": 165,
|
||||
"vec0": 238,
|
||||
"vec_ptr": 4326526960,
|
||||
"state_addr": 6155987720,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=238;generic=g0:165;closure=175;trait=t0:800x600;static=1164;tls=2164;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642113569572000,
|
||||
"pid": 12767,
|
||||
"counter": 166,
|
||||
"vec0": 239,
|
||||
"vec_ptr": 4326526960,
|
||||
"state_addr": 6155987720,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=239;generic=g0:166;closure=186;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642113544560000
|
||||
]
|
||||
},
|
||||
"trait_impl": {
|
||||
"saved_ns": 1792642118437453000,
|
||||
"latency_ms": 1050.813,
|
||||
"before": {
|
||||
"ns": 1792642118436294000,
|
||||
"pid": 12884,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4310493696,
|
||||
"state_addr": 6171208456,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642119283144000,
|
||||
"pid": 12884,
|
||||
"counter": 175,
|
||||
"vec0": 248,
|
||||
"vec_ptr": 4310493696,
|
||||
"state_addr": 6171208456,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=248;generic=g0:175;closure=185;trait=t0:800x600;static=1174;tls=2174;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642119488266000,
|
||||
"pid": 12884,
|
||||
"counter": 176,
|
||||
"vec0": 249,
|
||||
"vec_ptr": 4310493696,
|
||||
"state_addr": 6171208456,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=249;generic=g0:176;closure=186;trait=t1:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642119309418000
|
||||
]
|
||||
},
|
||||
"signature": {
|
||||
"saved_ns": 1792642124824404000,
|
||||
"latency_ms": 1351.378,
|
||||
"before": {
|
||||
"ns": 1792642124820861000,
|
||||
"pid": 13003,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4386050032,
|
||||
"state_addr": 6094072584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642125970919000,
|
||||
"pid": 13003,
|
||||
"counter": 203,
|
||||
"vec0": 276,
|
||||
"vec_ptr": 4386050032,
|
||||
"state_addr": 6094072584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=276;generic=g0:203;closure=213;trait=t0:800x600;static=1202;tls=2202;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642126175782000,
|
||||
"pid": 13003,
|
||||
"counter": 204,
|
||||
"vec0": 277,
|
||||
"vec_ptr": 4386050032,
|
||||
"state_addr": 6094072584,
|
||||
"panel_width": 800,
|
||||
"output": "rev=99;value=277;generic=g0:204;closure=214;trait=t0:800x600;static=1000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642126059739000
|
||||
]
|
||||
},
|
||||
"state_field": {
|
||||
"saved_ns": 1792642130972514000,
|
||||
"latency_ms": 1449.457,
|
||||
"before": {
|
||||
"ns": 1792642130968977000,
|
||||
"pid": 13107,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4325462000,
|
||||
"state_addr": 6156331784,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642132223222000,
|
||||
"pid": 13107,
|
||||
"counter": 213,
|
||||
"vec0": 286,
|
||||
"vec_ptr": 4325462000,
|
||||
"state_addr": 6156331784,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=286;generic=g0:213;closure=223;trait=t0:800x600;static=1212;tls=2212;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642132421971000,
|
||||
"pid": 13107,
|
||||
"counter": 214,
|
||||
"vec0": 287,
|
||||
"vec_ptr": 4325462000,
|
||||
"state_addr": 6156331784,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=287;generic=g0:214;closure=224;trait=t0:800x600;static=1000;tls=2000;layout=56"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642132340891000
|
||||
]
|
||||
},
|
||||
"static_initializer": {
|
||||
"saved_ns": 1792642137926238000,
|
||||
"latency_ms": 1122.501,
|
||||
"before": {
|
||||
"ns": 1792642137922447000,
|
||||
"pid": 13229,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4383985648,
|
||||
"state_addr": 6097857288,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642138838994000,
|
||||
"pid": 13229,
|
||||
"counter": 190,
|
||||
"vec0": 263,
|
||||
"vec_ptr": 4383985648,
|
||||
"state_addr": 6097857288,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=263;generic=g0:190;closure=200;trait=t0:800x600;static=1189;tls=2189;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642139048739000,
|
||||
"pid": 13229,
|
||||
"counter": 191,
|
||||
"vec0": 264,
|
||||
"vec_ptr": 4383985648,
|
||||
"state_addr": 6097857288,
|
||||
"panel_width": 800,
|
||||
"output": "rev=91;value=264;generic=g0:191;closure=201;trait=t0:800x600;static=9000;tls=2000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642138897582000
|
||||
]
|
||||
},
|
||||
"tls_initializer": {
|
||||
"saved_ns": 1792642143342964000,
|
||||
"latency_ms": 871.657,
|
||||
"before": {
|
||||
"ns": 1792642143341740000,
|
||||
"pid": 13330,
|
||||
"counter": 60,
|
||||
"vec0": 133,
|
||||
"vec_ptr": 4315779056,
|
||||
"state_addr": 6168128264,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=133;generic=g0:60;closure=70;trait=t0:800x600;static=1059;tls=2059;layout=48"
|
||||
},
|
||||
"previous": {
|
||||
"ns": 1792642144008965000,
|
||||
"pid": 13330,
|
||||
"counter": 143,
|
||||
"vec0": 216,
|
||||
"vec_ptr": 4315779056,
|
||||
"state_addr": 6168128264,
|
||||
"panel_width": 800,
|
||||
"output": "rev=0;value=216;generic=g0:143;closure=153;trait=t0:800x600;static=1142;tls=2142;layout=48"
|
||||
},
|
||||
"after": {
|
||||
"ns": 1792642144214621000,
|
||||
"pid": 13330,
|
||||
"counter": 144,
|
||||
"vec0": 217,
|
||||
"vec_ptr": 4315779056,
|
||||
"state_addr": 6168128264,
|
||||
"panel_width": 800,
|
||||
"output": "rev=92;value=217;generic=g0:144;closure=154;trait=t0:800x600;static=1000;tls=9000;layout=48"
|
||||
},
|
||||
"same_pid": true,
|
||||
"same_vec": true,
|
||||
"same_state": true,
|
||||
"counter_advanced": true,
|
||||
"vector_invariant": true,
|
||||
"patch_ns": [
|
||||
1792642144108229000
|
||||
]
|
||||
}
|
||||
}
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run only on a build worker, inside a cargo lease on the build queue.
|
||||
|
||||
Consumes actual frame events (no status polling). All clocks are on the worker.
|
||||
The save timestamp is immediately after close; no network sync is in the metric.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
from pathlib import Path
|
||||
import queue
|
||||
import re
|
||||
import signal
|
||||
import statistics
|
||||
import subprocess
|
||||
import threading
|
||||
import time
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
SOURCE = ROOT / "src/main.rs"
|
||||
BASE = SOURCE.read_text()
|
||||
RESULTS = ROOT / "results"
|
||||
RESULTS.mkdir(exist_ok=True)
|
||||
ENV = dict(os.environ, CARGO_BUILD_JOBS="2", CARGO_INCREMENTAL="1", NO_COLOR="1")
|
||||
# The worker normally uses sccache, which rejects explicit incremental builds.
|
||||
ENV["RUSTC_WRAPPER"] = ""
|
||||
DX = str(Path.home() / ".cargo/bin/dx")
|
||||
COMMAND = [DX, "serve", "--hot-patch", "--platform", "server", "--open", "false",
|
||||
"--interactive", "false", "--addr", "127.0.0.1", "--port", "18743"]
|
||||
|
||||
|
||||
def save(text):
|
||||
SOURCE.write_text(text)
|
||||
return time.time_ns()
|
||||
|
||||
|
||||
def parse_output(frame):
|
||||
return dict(part.split("=", 1) for part in frame["output"].split(";"))
|
||||
|
||||
|
||||
class Session:
|
||||
def __init__(self, name):
|
||||
self.events = queue.Queue()
|
||||
self.last = None
|
||||
self.patch_ns = []
|
||||
self.log = (RESULTS / f"{name}.log").open("w")
|
||||
self.started_ns = time.time_ns()
|
||||
self.process = subprocess.Popen(COMMAND, cwd=ROOT, env=ENV,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
text=True, bufsize=1, start_new_session=True)
|
||||
self.reader = threading.Thread(target=self.read, daemon=True)
|
||||
self.reader.start()
|
||||
|
||||
def read(self):
|
||||
for line in self.process.stdout:
|
||||
self.log.write(line)
|
||||
self.log.flush()
|
||||
if "Build failed" in line or "could not compile" in line:
|
||||
self.events.put(None)
|
||||
patch = re.search(r'PATCH ns=(\d+)', line)
|
||||
if patch:
|
||||
self.patch_ns.append(int(patch.group(1)))
|
||||
match = re.search(r'FRAME (\{[^\n]+\})', line)
|
||||
if match:
|
||||
try:
|
||||
self.events.put(json.loads(match.group(1)))
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
self.events.put(None)
|
||||
|
||||
def until(self, predicate, timeout=120):
|
||||
deadline = time.monotonic() + timeout
|
||||
while True:
|
||||
item = self.events.get(timeout=max(0, deadline - time.monotonic()))
|
||||
if item is None:
|
||||
raise RuntimeError(f"dx exited: {self.process.poll()}")
|
||||
previous, self.last = self.last, item
|
||||
if predicate(item):
|
||||
return previous, item
|
||||
|
||||
def ready(self):
|
||||
self.until(lambda f: f["counter"] >= 60, timeout=600)
|
||||
return (self.last["ns"] - self.started_ns) / 1e6
|
||||
|
||||
def edit(self, text, predicate, timeout=30):
|
||||
before = self.last
|
||||
saved = save(text)
|
||||
try:
|
||||
previous, after = self.until(lambda f: f["ns"] >= saved and predicate(f), timeout)
|
||||
result = {
|
||||
"saved_ns": saved, "latency_ms": (after["ns"] - saved) / 1e6,
|
||||
"before": before, "previous": previous, "after": after,
|
||||
"same_pid": before["pid"] == after["pid"],
|
||||
"same_vec": before["vec_ptr"] == after["vec_ptr"],
|
||||
"same_state": before["state_addr"] == after["state_addr"],
|
||||
"counter_advanced": after["counter"] > before["counter"],
|
||||
"vector_invariant": after["vec0"] == after["counter"] + 73,
|
||||
"patch_ns": [ns for ns in self.patch_ns if ns >= saved],
|
||||
}
|
||||
except (queue.Empty, RuntimeError) as exc:
|
||||
result = {"saved_ns": saved, "error": type(exc).__name__ + ": " + str(exc),
|
||||
"before": before, "last": self.last,
|
||||
"dx_exit": self.process.poll()}
|
||||
print(json.dumps(result), flush=True)
|
||||
return result
|
||||
|
||||
def close(self):
|
||||
if self.process.poll() is None:
|
||||
os.killpg(self.process.pid, signal.SIGTERM)
|
||||
try:
|
||||
self.process.wait(timeout=10)
|
||||
except subprocess.TimeoutExpired:
|
||||
os.killpg(self.process.pid, signal.SIGKILL)
|
||||
self.process.wait()
|
||||
self.reader.join(timeout=5)
|
||||
self.log.close()
|
||||
|
||||
|
||||
def benchmark():
|
||||
session = Session("benchmark")
|
||||
rows = []
|
||||
try:
|
||||
ready_ms = session.ready()
|
||||
for revision in range(1, 11):
|
||||
text = BASE.replace("let revision = 0;", f"let revision = {revision};")
|
||||
row = session.edit(text, lambda f: parse_output(f)["rev"] == str(revision))
|
||||
rows.append(row)
|
||||
if "error" in row:
|
||||
break
|
||||
# Let at least 30 real frames flow between saves; do not overlap builds.
|
||||
counter = row["after"]["counter"]
|
||||
session.until(lambda f: f["counter"] >= counter + 30)
|
||||
times = sorted(r["latency_ms"] for r in rows if "latency_ms" in r)
|
||||
result = {"command": COMMAND, "launch_to_tick60_ms": ready_ms, "rows": rows,
|
||||
"median_ms": statistics.median(times) if times else None,
|
||||
"p95_nearest_rank_ms": times[math.ceil(.95 * len(times)) - 1] if times else None}
|
||||
(RESULTS / "benchmark.json").write_text(json.dumps(result, indent=2))
|
||||
finally:
|
||||
session.close()
|
||||
save(BASE)
|
||||
|
||||
|
||||
def probes():
|
||||
changes = {
|
||||
"generic": (BASE.replace('"g0:{value}"', '"g1:{value}"'),
|
||||
lambda f: parse_output(f)["generic"].startswith("g1:")),
|
||||
"closure": (BASE.replace("value + 10", "value + 20"),
|
||||
lambda f: int(parse_output(f)["closure"]) == f["counter"] + 20),
|
||||
"trait_impl": (BASE.replace('"t0:{}x{}"', '"t1:{}x{}"'),
|
||||
lambda f: parse_output(f)["trait"].startswith("t1:")),
|
||||
"signature": (BASE.replace("fn render(state: &AppState)", "fn render(state: &AppState, tone: u64)")
|
||||
.replace("let revision = 0;", "let revision = tone;")
|
||||
.replace(" render(&state)", " render(&state, 99)"),
|
||||
lambda f: parse_output(f)["rev"] == "99"),
|
||||
# Only compare sizes; NEVER read the new field through the old instance.
|
||||
"state_field": (BASE.replace("// FIELD_PROBE", "extra: u64,")
|
||||
.replace("// FIELD_INIT", "extra: 999,"),
|
||||
lambda f: parse_output(f)["layout"] == "56"),
|
||||
"static_initializer": (BASE.replace("AtomicU64::new(1000)", "AtomicU64::new(9000)")
|
||||
.replace("let revision = 0;", "let revision = 91;"),
|
||||
lambda f: parse_output(f)["rev"] == "91"),
|
||||
"tls_initializer": (BASE.replace("Cell::new(2000)", "Cell::new(9000)")
|
||||
.replace("let revision = 0;", "let revision = 92;"),
|
||||
lambda f: parse_output(f)["rev"] == "92"),
|
||||
}
|
||||
rows = {}
|
||||
for name, (text, predicate) in changes.items():
|
||||
save(BASE)
|
||||
session = Session("probe-" + name)
|
||||
try:
|
||||
session.ready()
|
||||
rows[name] = session.edit(text, predicate, timeout=15)
|
||||
finally:
|
||||
session.close()
|
||||
save(BASE)
|
||||
(RESULTS / "probes.json").write_text(json.dumps(rows, indent=2))
|
||||
|
||||
|
||||
def builds():
|
||||
target = os.environ.get("RUNE_NORMAL_TARGET", "target/normal")
|
||||
if (ROOT / target).exists():
|
||||
raise RuntimeError(f"{target} already exists; select a fresh RUNE_NORMAL_TARGET for a cold build")
|
||||
rows = []
|
||||
try:
|
||||
for name, text in [("cold", BASE),
|
||||
("incremental", BASE.replace("let revision = 0;", "let revision = 1;"))]:
|
||||
save(text)
|
||||
command = ["cargo", "build", "--target-dir", target]
|
||||
start = time.monotonic_ns()
|
||||
with (RESULTS / f"build-{name}.log").open("w") as out:
|
||||
run = subprocess.run(command, cwd=ROOT, env=ENV, stdout=out, stderr=subprocess.STDOUT)
|
||||
rows.append({"name": name, "elapsed_ms": (time.monotonic_ns() - start) / 1e6,
|
||||
"exit": run.returncode, "command": command})
|
||||
print(json.dumps(rows[-1]), flush=True)
|
||||
if run.returncode:
|
||||
break
|
||||
(RESULTS / "builds.json").write_text(json.dumps(rows, indent=2))
|
||||
finally:
|
||||
save(BASE)
|
||||
|
||||
|
||||
def extras():
|
||||
closure = """subsecond::call(|| {
|
||||
std::hint::black_box(&capture_guard);
|
||||
render(&state)
|
||||
})"""
|
||||
cases = {
|
||||
"single_capture": BASE.replace(closure, "subsecond::call(|| render(&state))"),
|
||||
"explicit_hotfn": BASE.replace(closure, "subsecond::HotFn::current(render).call((&state,))"),
|
||||
"explicit_hotfn_signature": BASE.replace(closure, "subsecond::HotFn::current(render).call((&state,))"),
|
||||
"exported_static": BASE.replace("static GLOBAL:", "#[unsafe(no_mangle)]\npub static GLOBAL:"),
|
||||
"cached_trait_object": BASE.replace("// FIELD_PROBE", "cached: Box<dyn Label>,")
|
||||
.replace("// FIELD_INIT", "cached: Box::new(Panel { width: 42, height: 24 }),")
|
||||
.replace("state.panel.label()", "state.cached.label()"),
|
||||
}
|
||||
rows = {}
|
||||
for name, base in cases.items():
|
||||
if args.case and args.case != name:
|
||||
continue
|
||||
save(base)
|
||||
session = Session("extra-" + name)
|
||||
try:
|
||||
session.ready()
|
||||
text = base.replace("let revision = 0;", "let revision = 93;")
|
||||
if name == "explicit_hotfn_signature":
|
||||
text = text.replace("fn render(state: &AppState)", "fn render(state: &AppState, tone: u64)")
|
||||
text = text.replace("let revision = 93;", "let revision = tone;")
|
||||
text = text.replace(".call((&state,))", ".call((&state, 93))")
|
||||
if name == "exported_static":
|
||||
text = text.replace("AtomicU64::new(1000)", "AtomicU64::new(9000)")
|
||||
if name == "cached_trait_object":
|
||||
text = text.replace('"t0:{}x{}"', '"t1:{}x{}"')
|
||||
rows[name] = session.edit(text, lambda f: parse_output(f)["rev"] == "93", timeout=5)
|
||||
rows[name]["all_patch_ns"] = session.patch_ns
|
||||
finally:
|
||||
session.close()
|
||||
save(BASE)
|
||||
filename = f"extra-{args.case}.json" if args.case else "extras.json"
|
||||
(RESULTS / filename).write_text(json.dumps(rows, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("mode", choices=["benchmark", "probes", "builds", "extras"])
|
||||
parser.add_argument("--case", help="Run only this extra probe")
|
||||
args = parser.parse_args()
|
||||
globals()[args.mode]()
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
use std::{
|
||||
cell::Cell,
|
||||
io::{self, Write},
|
||||
sync::atomic::{AtomicU64, Ordering},
|
||||
time::{Duration, Instant, SystemTime, UNIX_EPOCH},
|
||||
};
|
||||
|
||||
#[repr(C)]
|
||||
struct Panel {
|
||||
width: u64,
|
||||
height: u64,
|
||||
}
|
||||
|
||||
// repr(C) makes the append-only layout probe deterministic. It does NOT make
|
||||
// accessing a new field on an existing old-layout instance safe.
|
||||
#[repr(C)]
|
||||
struct AppState {
|
||||
counter: u64,
|
||||
values: Vec<u64>,
|
||||
panel: Panel,
|
||||
// FIELD_PROBE
|
||||
}
|
||||
|
||||
static GLOBAL: AtomicU64 = AtomicU64::new(1000);
|
||||
thread_local! {
|
||||
static LOCAL: Cell<u64> = const { Cell::new(2000) };
|
||||
}
|
||||
|
||||
trait Label {
|
||||
fn label(&self) -> String;
|
||||
}
|
||||
|
||||
impl Label for Panel {
|
||||
fn label(&self) -> String {
|
||||
format!("t0:{}x{}", self.width, self.height)
|
||||
}
|
||||
}
|
||||
|
||||
fn generic<T: std::fmt::Display>(value: T) -> String {
|
||||
format!("g0:{value}")
|
||||
}
|
||||
|
||||
fn render(state: &AppState) -> String {
|
||||
let revision = 0; // REVISION
|
||||
let closure = |value: u64| value + 10;
|
||||
let global = GLOBAL.fetch_add(1, Ordering::Relaxed);
|
||||
let local = LOCAL.with(|cell| {
|
||||
let value = cell.get();
|
||||
cell.set(value + 1);
|
||||
value
|
||||
});
|
||||
format!(
|
||||
"rev={revision};value={};generic={};closure={};trait={};static={global};tls={local};layout={}",
|
||||
state.values[0],
|
||||
generic(state.counter),
|
||||
closure(state.counter),
|
||||
state.panel.label(),
|
||||
std::mem::size_of::<AppState>(),
|
||||
)
|
||||
}
|
||||
|
||||
fn epoch_ns() -> u128 {
|
||||
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_nanos()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// The devtools connection includes the ASLR reference and PID handshake.
|
||||
// This binary never creates a Dioxus VirtualDom, UI, renderer, or window.
|
||||
subsecond::register_handler(std::sync::Arc::new(|| println!("PATCH ns={}", epoch_ns())));
|
||||
dioxus_devtools::connect_subsecond();
|
||||
let mut state = AppState {
|
||||
counter: 0,
|
||||
values: vec![73, 19, 41],
|
||||
panel: Panel { width: 800, height: 600 },
|
||||
// FIELD_INIT
|
||||
};
|
||||
let period = Duration::from_nanos(1_000_000_000 / 120);
|
||||
let mut next_tick = Instant::now();
|
||||
let capture_guard = 123_u64;
|
||||
loop {
|
||||
state.counter += 1;
|
||||
state.values[0] += 1;
|
||||
// 0.7.10 mistakes pointer-sized closures for function pointers. Capture
|
||||
// two references so this closure follows the closure dispatch path.
|
||||
let output = subsecond::call(|| {
|
||||
std::hint::black_box(&capture_guard);
|
||||
render(&state)
|
||||
});
|
||||
println!(
|
||||
"FRAME {{\"ns\":{},\"pid\":{},\"counter\":{},\"vec0\":{},\"vec_ptr\":{},\"state_addr\":{},\"panel_width\":{},\"output\":\"{}\"}}",
|
||||
epoch_ns(), std::process::id(), state.counter, state.values[0],
|
||||
state.values.as_ptr() as usize, &state as *const AppState as usize,
|
||||
state.panel.width, output,
|
||||
);
|
||||
io::stdout().flush().unwrap();
|
||||
next_tick += period;
|
||||
std::thread::sleep(next_tick.saturating_duration_since(Instant::now()));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user