From 3143ded374668fc6f404fc81044c680c06cb823d Mon Sep 17 00:00:00 2001 From: Filip Andersson <17986183+FilipAndersson245@users.noreply.github.com> Date: Sun, 5 May 2024 17:53:48 +0200 Subject: [PATCH] Tango migration (#12469) # Description This PR migrates the benchmark suit to Tango. Its different compared to other framework because it require 2 binaries, to run to do A/B benchmarking, this is currently limited to Linux, Max, (Windows require rustc nightly flag), by switching between two suits it can reduce noise and run the code "almost" concurrently. I have have been in contact with the maintainer, and bases this on the dev branch, as it had a newer API simular to criterion. This framework compared to Divan also have a simple file dump system if we want to generate graphs, do other analysis on later. I think overall this crate is very nice, a lot faster to compile and run then criterion, that's for sure. --- Cargo.lock | 769 ++++++++++++++++++++++++---------------- Cargo.toml | 2 +- benches/benchmarks.rs | 792 +++++++++++++++++++++++------------------- scripts/build.rs | 7 +- toolkit.nu | 25 ++ 5 files changed, 920 insertions(+), 675 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 83a5b41b60..29647b87ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,10 +72,19 @@ dependencies = [ ] [[package]] -name = "allocator-api2" -version = "0.2.16" +name = "alloca" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alphanumeric-sort" @@ -119,47 +128,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -173,17 +183,16 @@ checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "arboard" -version = "3.3.2" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58" +checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" dependencies = [ "clipboard-win", "log", - "objc", - "objc-foundation", - "objc_id", + "objc2", + "objc2-app-kit", + "objc2-foundation", "parking_lot", - "thiserror", "wl-clipboard-rs", "x11rb", ] @@ -259,18 +268,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -376,7 +385,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -421,12 +430,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - [[package]] name = "block-buffer" version = "0.10.4" @@ -437,10 +440,19 @@ dependencies = [ ] [[package]] -name = "borsh" -version = "1.4.0" +name = "block2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" +checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e" +dependencies = [ + "objc2", +] + +[[package]] +name = "borsh" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" dependencies = [ "borsh-derive", "cfg_aliases", @@ -448,15 +460,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" +checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "syn_derive", ] @@ -560,9 +572,9 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" @@ -581,7 +593,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -636,12 +648,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.92" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" dependencies = [ "jobserver", "libc", + "once_cell", ] [[package]] @@ -688,9 +701,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -699,7 +712,7 @@ dependencies = [ "pure-rust-locales", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -761,7 +774,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", "stacker", ] @@ -783,6 +796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", + "clap_derive", ] [[package]] @@ -798,6 +812,18 @@ dependencies = [ "terminal_size", ] +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "clap_lex" version = "0.7.0" @@ -806,9 +832,9 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clipboard-win" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" +checksum = "79f4473f5144e20d9aceaf2972478f06ddf687831eafeeb434fbaf0acc4144ad" dependencies = [ "error-code", ] @@ -824,9 +850,18 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "colorz" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc2a5df6ee18d52a36920c93a7736761c6fcffa72b9d960fd9133dd8d57c5184" +dependencies = [ + "supports-color 2.1.0", +] [[package]] name = "comfy-table" @@ -853,12 +888,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "condtype" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf0a07a401f374238ab8e2f11a104d2851bf9ce711ec69804834de8af45c7af" - [[package]] name = "console" version = "0.15.8" @@ -1066,7 +1095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1117,7 +1146,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1186,31 +1215,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "divan" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d567df2c9c2870a43f3f2bd65aaeb18dbce1c18f217c3e564b4fbaeb3ee56c" -dependencies = [ - "cfg-if", - "clap", - "condtype", - "divan-macros", - "libc", - "regex-lite", -] - -[[package]] -name = "divan-macros" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27540baf49be0d484d8f0130d7d8da3011c32a44d4fc873368154f1510e574a2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.58", -] - [[package]] name = "dlib" version = "0.5.2" @@ -1288,9 +1292,9 @@ checksum = "3a68a4904193147e0a8dec3314640e6db742afd5f6e634f428a6af230d9b3591" [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "eml-parser" @@ -1310,9 +1314,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -1326,7 +1330,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1407,9 +1411,9 @@ checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fd-lock" @@ -1448,7 +1452,7 @@ checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "windows-sys 0.52.0", ] @@ -1460,9 +1464,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -1600,7 +1604,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -1717,6 +1721,23 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "glob-match" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985c9503b412198aa4197559e9a318524ebc4519c229bfa05a535828c950b9d" + +[[package]] +name = "goblin" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27c1b4369c2cd341b5de549380158b105a04c331be5db9110eef7b6d2742134" +dependencies = [ + "log", + "plain", + "scroll", +] + [[package]] name = "h2" version = "0.3.26" @@ -1742,7 +1763,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] @@ -1766,9 +1787,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", @@ -1781,7 +1802,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692eaaf7f7607518dd3cef090f1474b61edc5301d8012f09579920df68b725ee" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -1959,7 +1980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] @@ -2038,6 +2059,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "is-wsl" version = "0.4.0" @@ -2069,6 +2101,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.11.0" @@ -2101,9 +2139,9 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] @@ -2232,9 +2270,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libflate" @@ -2277,7 +2315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -2288,9 +2326,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libmimalloc-sys" -version = "0.1.35" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +checksum = "81eb4061c0582dedea1cbc7aff2240300dd6982e0239d1c99e65c1dbf4a30ba7" dependencies = [ "cc", "libc", @@ -2298,9 +2336,9 @@ dependencies = [ [[package]] name = "libproc" -version = "0.14.6" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb6497078a4c9c2aca63df56d8dce6eb4381d53a960f781a3a748f7ea97436d" +checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" dependencies = [ "bindgen", "errno", @@ -2371,9 +2409,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -2391,7 +2429,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -2522,7 +2560,7 @@ dependencies = [ "cfg-if", "miette-derive", "owo-colors", - "supports-color", + "supports-color 3.0.0", "supports-hyperlinks", "supports-unicode", "terminal_size", @@ -2539,14 +2577,14 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "mimalloc" -version = "0.1.39" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +checksum = "9f41a2280ded0da56c8cf898babb86e8f10651a34adcfff190ae9a1159c6908d" dependencies = [ "libmimalloc-sys", ] @@ -2738,7 +2776,6 @@ dependencies = [ "crossterm", "ctrlc", "dirs-next", - "divan", "log", "miette", "mimalloc", @@ -2770,6 +2807,7 @@ dependencies = [ "serde_json", "serial_test", "simplelog", + "tango-bench", "tempfile", "time", "winresource", @@ -3013,7 +3051,7 @@ dependencies = [ "uu_mv", "uu_uname", "uu_whoami", - "uucore", + "uucore 0.0.25", "uuid", "v_htmlescape", "wax", @@ -3414,9 +3452,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" dependencies = [ "num-bigint", "num-complex", @@ -3551,23 +3589,58 @@ dependencies = [ ] [[package]] -name = "objc-foundation" -version = "0.1.1" +name = "objc-sys" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60" + +[[package]] +name = "objc2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659" dependencies = [ - "block", - "objc", - "objc_id", + "objc-sys", + "objc2-encode", ] [[package]] -name = "objc_id" -version = "0.1.1" +name = "objc2-app-kit" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047" dependencies = [ - "objc", + "block2", + "objc2", + "objc2-core-data", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a" + +[[package]] +name = "objc2-foundation" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904" +dependencies = [ + "block2", + "objc2", ] [[package]] @@ -3625,7 +3698,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -3663,7 +3736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -3706,9 +3779,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -3716,15 +3789,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -3739,9 +3812,9 @@ dependencies = [ [[package]] name = "parse-zoneinfo" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" dependencies = [ "regex", ] @@ -3772,9 +3845,9 @@ checksum = "f658886ed52e196e850cfbbfddab9eaa7f6d90dd0929e264c31e5cec07e09e57" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -3783,9 +3856,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" dependencies = [ "pest", "pest_generator", @@ -3793,22 +3866,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" dependencies = [ "once_cell", "pest", @@ -3894,7 +3967,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -3933,6 +4006,12 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "planus" version = "0.3.1" @@ -3944,9 +4023,9 @@ dependencies = [ [[package]] name = "platform-info" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6259c4860e53bf665016f1b2f46a8859cadfa717581dc9d597ae4069de6300f" +checksum = "d5ff316b9c4642feda973c18f0decd6c8b0919d4722566f6e4337cce0dd88217" dependencies = [ "libc", "winapi", @@ -3954,9 +4033,9 @@ dependencies = [ [[package]] name = "polars" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c352aaa0399c0863eecd879f2cbe585c9026c5cafe432f029025e4bec3adf43" +checksum = "0ea21b858b16b9c0e17a12db2800d11aa5b4bd182be6b3022eb537bbfc1f2db5" dependencies = [ "getrandom", "polars-arrow", @@ -3974,9 +4053,9 @@ dependencies = [ [[package]] name = "polars-arrow" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88d3cfc6b500f106f03a5f4d37f700deef38c5b58a2e843edb3ec31f5a0ec19" +checksum = "725b09f2b5ef31279b66e27bbab63c58d49d8f6696b66b1f46c7eaab95e80f75" dependencies = [ "ahash 0.8.11", "atoi", @@ -3992,7 +4071,7 @@ dependencies = [ "foreign_vec", "futures", "getrandom", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "itoa", "itoap", "lz4", @@ -4022,9 +4101,9 @@ dependencies = [ [[package]] name = "polars-compute" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf264bfb632aaeba859fe19a87fa051d850e72542c36177ccea71fd9cae84079" +checksum = "a796945b14b14fbb79b91ef0406e6fddca2be636e889f81ea5d6ee7d36efb4fe" dependencies = [ "bytemuck", "either", @@ -4038,9 +4117,9 @@ dependencies = [ [[package]] name = "polars-core" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cb72917958e82f29d604429ab55851f561c7cd336f7744a7360f9e50b9ac88" +checksum = "465f70d3e96b6d0b1a43c358ba451286b8c8bd56696feff020d65702aa33e35c" dependencies = [ "ahash 0.8.11", "bitflags 2.5.0", @@ -4049,7 +4128,7 @@ dependencies = [ "chrono-tz 0.8.6", "comfy-table", "either", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "indexmap", "num-traits", "once_cell", @@ -4072,9 +4151,9 @@ dependencies = [ [[package]] name = "polars-error" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c18ef81979a6d9e9fdbd25ad3bf1591cbd5c474489f785af44604cf591cd636d" +checksum = "5224d5d05e6b8a6f78b75951ae1b5f82c8ab1979e11ffaf5fd41941e3d5b0757" dependencies = [ "avro-schema", "polars-arrow-format", @@ -4085,9 +4164,9 @@ dependencies = [ [[package]] name = "polars-io" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d47f2cdd8e2a2bfc71b0d30444d4c378ddc0d6f80826746fc3c731c06251b42" +checksum = "b2c8589e418cbe4a48228d64b2a8a40284a82ec3c98817c0c2bcc0267701338b" dependencies = [ "ahash 0.8.11", "async-trait", @@ -4126,14 +4205,14 @@ dependencies = [ [[package]] name = "polars-json" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af22dcdf6f94894bbedb0b0b11fbffbb1905cc6e2a43bdb3e15355f3d4cf874a" +checksum = "81224492a649a12b668480c0cf219d703f432509765d2717e72fe32ad16fc701" dependencies = [ "ahash 0.8.11", "chrono", "fallible-streaming-iterator", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "indexmap", "itoa", "num-traits", @@ -4147,9 +4226,9 @@ dependencies = [ [[package]] name = "polars-lazy" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee5683b551f5e2bb004468edec0f87fd585f436c2e5f89b292c2bfee1b6f5d4f" +checksum = "89b2632b1af668e2058d5f8f916d8fbde3cac63d03ae29a705f598e41dcfeb7f" dependencies = [ "ahash 0.8.11", "bitflags 2.5.0", @@ -4171,9 +4250,9 @@ dependencies = [ [[package]] name = "polars-ops" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f311543e0e110d385867df25f47c1c740ee0cc854feead54262a24b0246383bb" +checksum = "efdbdb4d9a92109bc2e0ce8e17af5ae8ab643bb5b7ee9d1d74f0aeffd1fbc95f" dependencies = [ "ahash 0.8.11", "argminmax", @@ -4182,7 +4261,7 @@ dependencies = [ "chrono", "chrono-tz 0.8.6", "either", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "indexmap", "jsonpath_lib_polars_vendor", @@ -4207,9 +4286,9 @@ dependencies = [ [[package]] name = "polars-parquet" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cd1f445fea8377350dfa2bd216785839ce97c826299c7e0e9557c1dbe887f" +checksum = "b421d2196f786fdfe162db614c8485f8308fe41575d4de634a39bbe460d1eb6a" dependencies = [ "ahash 0.8.11", "async-stream", @@ -4233,14 +4312,14 @@ dependencies = [ [[package]] name = "polars-pipe" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f57de92c0ca9851e89cf9374cd88029f9bb2197937c34d571ec2a7ac45cca3" +checksum = "48700f1d5bd56a15451e581f465c09541492750360f18637b196f995470a015c" dependencies = [ "crossbeam-channel", "crossbeam-queue", "enum_dispatch", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "num-traits", "polars-arrow", "polars-compute", @@ -4258,14 +4337,14 @@ dependencies = [ [[package]] name = "polars-plan" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c509bc273c402a8b1fbfa63df2b2e90ca10d30decab698c7739003817de67e1" +checksum = "2fb8e2302e20c44defd5be8cad9c96e75face63c3a5f609aced8c4ec3b3ac97d" dependencies = [ "ahash 0.8.11", "bytemuck", "chrono-tz 0.8.6", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "once_cell", "percent-encoding", "polars-arrow", @@ -4287,9 +4366,9 @@ dependencies = [ [[package]] name = "polars-row" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695a9954f5aa273e44c497c19f806177f787ccf87cd4b3044c96a5057266a861" +checksum = "a515bdc68c2ae3702e3de70d89601f3b71ca8137e282a226dddb53ee4bacfa2e" dependencies = [ "bytemuck", "polars-arrow", @@ -4299,9 +4378,9 @@ dependencies = [ [[package]] name = "polars-sql" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7cdf3b41bda70004ed3ec78652eb690aec3db5d99dfac03fbf9995fe76a7e26" +checksum = "7b4bb7cc1c04c3023d1953b2f1dec50515e8fd8169a5a2bf4967b3b082232db7" dependencies = [ "hex", "polars-arrow", @@ -4317,9 +4396,9 @@ dependencies = [ [[package]] name = "polars-time" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bdc956b63e99a5ad1dabd9d397ce9ce50f703e503a5039c972968683a953d0c" +checksum = "efc18e3ad92eec55db89d88f16c22d436559ba7030cf76f86f6ed7a754b673f1" dependencies = [ "atoi", "chrono", @@ -4338,13 +4417,13 @@ dependencies = [ [[package]] name = "polars-utils" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355b126757b4a87da5248ae6eb644e99b5583a11ffc2d42e13b2b856d43e84be" +checksum = "c760b6c698cfe2fbbbd93d6cfb408db14ececfe1d92445dae2229ce1b5b21ae8" dependencies = [ "ahash 0.8.11", "bytemuck", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "indexmap", "num-traits", "once_cell", @@ -4470,9 +4549,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -4594,9 +4673,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -4675,9 +4754,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.1" +version = "11.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" +checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" dependencies = [ "bitflags 2.5.0", ] @@ -4719,7 +4798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -4737,6 +4816,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "redox_users" version = "0.4.5" @@ -4788,7 +4876,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -4814,12 +4902,6 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "regex-lite" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" - [[package]] name = "regex-syntax" version = "0.8.3" @@ -4951,7 +5033,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.58", + "syn 2.0.60", "unicode-ident", ] @@ -4990,7 +5072,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.58", + "syn 2.0.60", "walkdir", ] @@ -5054,9 +5136,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", @@ -5131,6 +5213,26 @@ dependencies = [ "tendril", ] +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "sdd" version = "0.2.0" @@ -5199,29 +5301,29 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "indexmap", "itoa", @@ -5237,7 +5339,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5276,9 +5378,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb86f9315df5df6a70eae0cc22395a44e544a0d8897586820770a35ede74449" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" dependencies = [ "futures", "log", @@ -5290,13 +5392,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "3.1.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9bb72430492e9549b0c4596725c0f82729bff861c45aa8099c0a8e67fc3b721" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5365,18 +5467,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "simd-json" -version = "0.13.9" +version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b84c23a1066e1d650ebc99aa8fb9f8ed0ab96fd36e2e836173c92fc9fb29bc" +checksum = "570c430b3d902ea083097e853263ae782dfe40857d93db019a12356c8e8143fa" dependencies = [ "ahash 0.8.11", "getrandom", @@ -5460,9 +5562,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5493,7 +5595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ff9eaf853dec4c8802325d8b6d3dffa86cc707fd7a1a4cdbf416e13b061787a" dependencies = [ "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5608,7 +5710,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5621,7 +5723,17 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.58", + "syn 2.0.60", +] + +[[package]] +name = "supports-color" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +dependencies = [ + "is-terminal", + "is_ci", ] [[package]] @@ -5679,9 +5791,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.58" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -5697,7 +5809,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5711,9 +5823,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.9" +version = "0.30.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a84fe4cfc513b41cb2596b624e561ec9e7e1c4b46328e496ed56a53514ef2a" +checksum = "87341a165d73787554941cd5ef55ad728011566fe714e987d1b976c15dbc3a83" dependencies = [ "cfg-if", "core-foundation-sys", @@ -5736,6 +5848,27 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tango-bench" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e79d9e491b718fb52bb2052726a0e66fe89a31cc6979fe58c72c73f058c279e" +dependencies = [ + "alloca", + "anyhow", + "clap", + "colorz", + "glob-match", + "goblin", + "libloading", + "log", + "num-traits", + "rand", + "scroll", + "tempfile", + "thiserror", +] + [[package]] name = "tap" version = "1.0.1" @@ -5809,22 +5942,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -5839,9 +5972,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -5862,9 +5995,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -5957,7 +6090,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.9", + "toml_edit 0.22.12", ] [[package]] @@ -5995,15 +6128,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow 0.6.7", ] [[package]] @@ -6106,7 +6239,7 @@ checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] @@ -6177,9 +6310,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" @@ -6195,11 +6328,11 @@ checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "ureq" -version = "2.9.6" +version = "2.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" +checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "encoding_rs", "flate2", "log", @@ -6251,7 +6384,7 @@ dependencies = [ "indicatif", "libc", "quick-error 2.0.1", - "uucore", + "uucore 0.0.26", "walkdir", "xattr", ] @@ -6263,7 +6396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "040aa4584036b2f65e05387b0ea9ac468afce1db325743ce5f350689fd9ce4ae" dependencies = [ "clap", - "uucore", + "uucore 0.0.26", ] [[package]] @@ -6275,7 +6408,7 @@ dependencies = [ "clap", "rand", "tempfile", - "uucore", + "uucore 0.0.26", ] [[package]] @@ -6287,7 +6420,7 @@ dependencies = [ "clap", "fs_extra", "indicatif", - "uucore", + "uucore 0.0.26", ] [[package]] @@ -6298,7 +6431,7 @@ checksum = "5951832d73199636bde6c0d61cf960932b3c4450142c290375bc10c7abed6db5" dependencies = [ "clap", "platform-info", - "uucore", + "uucore 0.0.26", ] [[package]] @@ -6309,7 +6442,7 @@ checksum = "e3b44166eb6335aeac42744ea368cc4c32d3f2287a4ff765a5ce44d927ab8bb4" dependencies = [ "clap", "libc", - "uucore", + "uucore 0.0.26", "windows-sys 0.48.0", ] @@ -6318,12 +6451,29 @@ name = "uucore" version = "0.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23994a722acb43dbc56877e271c9723f167ae42c4c089f909b2d7dd106c3a9b4" +dependencies = [ + "clap", + "glob", + "libc", + "nix", + "once_cell", + "os_display", + "uucore_procs", + "wild", +] + +[[package]] +name = "uucore" +version = "0.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2ea2f77699e5ff5c7e001af588ceb34cae8b5f9af5496bea5a6476aaa8e780" dependencies = [ "clap", "dunce", "glob", "libc", "nix", + "number_prefix", "once_cell", "os_display", "uucore_procs", @@ -6336,9 +6486,9 @@ dependencies = [ [[package]] name = "uucore_procs" -version = "0.0.25" +version = "0.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f51594832e53b11811446b1cd3567722e2906a589a5b19622c5c4720977309" +checksum = "1a233a488da42f3ddb0aaa8a9f75a969e3f37e4de7e909d2d23f6aa3ee401d20" dependencies = [ "proc-macro2", "quote", @@ -6347,9 +6497,9 @@ dependencies = [ [[package]] name = "uuhelp_parser" -version = "0.0.25" +version = "0.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac7a6832a5add86204d5a8d0ef41c5a11e3ddf61c0f1a508f69e7e3e1bf04e3f" +checksum = "425a23c7b7145bc7620c9c445817c37b1f78b6790aee9f208133f3c028975b60" [[package]] name = "uuid" @@ -6477,7 +6627,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -6499,7 +6649,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6643,11 +6793,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -6672,7 +6822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core 0.52.0", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6682,7 +6832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6691,7 +6841,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6701,16 +6851,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] name = "windows-result" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6728,7 +6878,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -6763,17 +6913,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -6790,9 +6941,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -6808,9 +6959,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -6826,9 +6977,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -6844,9 +7001,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -6862,9 +7019,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -6880,9 +7037,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -6898,9 +7055,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -6913,9 +7070,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" dependencies = [ "memchr", ] @@ -6977,9 +7134,9 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "gethostname", "rustix", @@ -6988,9 +7145,9 @@ dependencies = [ [[package]] name = "x11rb-protocol" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xattr" @@ -7032,7 +7189,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.58", + "syn 2.0.60", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 11f393a5ce..beabd26e20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -227,7 +227,7 @@ nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.93.1" nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.93.1" } assert_cmd = "2.0" dirs-next = { workspace = true } -divan = "0.1.14" +tango-bench = "0.5" pretty_assertions = { workspace = true } rstest = { workspace = true, default-features = false } serial_test = "3.1" diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index e6bec2e163..859e3e2d2d 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,7 +1,7 @@ use nu_cli::{eval_source, evaluate_commands}; -use nu_parser::parse; use nu_plugin_core::{Encoder, EncodingType}; use nu_plugin_protocol::{PluginCallResponse, PluginOutput}; + use nu_protocol::{ engine::{EngineState, Stack}, eval_const::create_nu_constant, @@ -9,12 +9,14 @@ use nu_protocol::{ }; use nu_std::load_standard_library; use nu_utils::{get_default_config, get_default_env}; -use std::path::{Path, PathBuf}; +use std::{ + path::{Path, PathBuf}, + rc::Rc, +}; -fn main() { - // Run registered benchmarks. - divan::main(); -} +use std::hint::black_box; + +use tango_bench::{benchmark_fn, tango_benchmarks, tango_main, IntoBenchmarks}; fn load_bench_commands() -> EngineState { nu_command::add_shell_command_context(nu_cmd_lang::create_default_context()) @@ -57,42 +59,6 @@ fn setup_engine() -> EngineState { engine_state } -fn bench_command(bencher: divan::Bencher, scaled_command: String) { - bench_command_with_custom_stack_and_engine( - bencher, - scaled_command, - Stack::new(), - setup_engine(), - ) -} - -fn bench_command_with_custom_stack_and_engine( - bencher: divan::Bencher, - scaled_command: String, - stack: nu_protocol::engine::Stack, - mut engine: EngineState, -) { - load_standard_library(&mut engine).unwrap(); - let commands = Spanned { - span: Span::unknown(), - item: scaled_command, - }; - - bencher - .with_inputs(|| engine.clone()) - .bench_values(|mut engine| { - evaluate_commands( - &commands, - &mut engine, - &mut stack.clone(), - PipelineData::empty(), - None, - false, - ) - .unwrap(); - }) -} - fn setup_stack_and_engine_from_command(command: &str) -> (Stack, EngineState) { let mut engine = setup_engine(); let commands = Spanned { @@ -114,261 +80,6 @@ fn setup_stack_and_engine_from_command(command: &str) -> (Stack, EngineState) { (stack, engine) } -// FIXME: All benchmarks live in this 1 file to speed up build times when benchmarking. -// When the *_benchmarks functions were in different files, `cargo bench` would build -// an executable for every single one - incredibly slowly. Would be nice to figure out -// a way to split things up again. - -#[divan::bench] -fn load_standard_lib(bencher: divan::Bencher) { - let engine = setup_engine(); - bencher - .with_inputs(|| engine.clone()) - .bench_values(|mut engine| { - load_standard_library(&mut engine).unwrap(); - }) -} - -#[divan::bench_group] -mod record { - - use super::*; - - fn create_flat_record_string(n: i32) -> String { - let mut s = String::from("let record = {"); - for i in 0..n { - s.push_str(&format!("col_{}: {}", i, i)); - if i < n - 1 { - s.push_str(", "); - } - } - s.push('}'); - s - } - - fn create_nested_record_string(depth: i32) -> String { - let mut s = String::from("let record = {"); - for _ in 0..depth { - s.push_str("col: {"); - } - s.push_str("col_final: 0"); - for _ in 0..depth { - s.push('}'); - } - s.push('}'); - s - } - - #[divan::bench(args = [1, 10, 100, 1000])] - fn create(bencher: divan::Bencher, n: i32) { - bench_command(bencher, create_flat_record_string(n)); - } - - #[divan::bench(args = [1, 10, 100, 1000])] - fn flat_access(bencher: divan::Bencher, n: i32) { - let (stack, engine) = setup_stack_and_engine_from_command(&create_flat_record_string(n)); - bench_command_with_custom_stack_and_engine( - bencher, - "$record.col_0 | ignore".to_string(), - stack, - engine, - ); - } - - #[divan::bench(args = [1, 2, 4, 8, 16, 32, 64, 128])] - fn nest_access(bencher: divan::Bencher, depth: i32) { - let (stack, engine) = - setup_stack_and_engine_from_command(&create_nested_record_string(depth)); - let nested_access = ".col".repeat(depth as usize); - bench_command_with_custom_stack_and_engine( - bencher, - format!("$record{} | ignore", nested_access), - stack, - engine, - ); - } -} - -#[divan::bench_group] -mod table { - - use super::*; - - fn create_example_table_nrows(n: i32) -> String { - let mut s = String::from("let table = [[foo bar baz]; "); - for i in 0..n { - s.push_str(&format!("[0, 1, {i}]")); - if i < n - 1 { - s.push_str(", "); - } - } - s.push(']'); - s - } - - #[divan::bench(args = [1, 10, 100, 1000])] - fn create(bencher: divan::Bencher, n: i32) { - bench_command(bencher, create_example_table_nrows(n)); - } - - #[divan::bench(args = [1, 10, 100, 1000])] - fn get(bencher: divan::Bencher, n: i32) { - let (stack, engine) = setup_stack_and_engine_from_command(&create_example_table_nrows(n)); - bench_command_with_custom_stack_and_engine( - bencher, - "$table | get bar | math sum | ignore".to_string(), - stack, - engine, - ); - } - - #[divan::bench(args = [1, 10, 100, 1000])] - fn select(bencher: divan::Bencher, n: i32) { - let (stack, engine) = setup_stack_and_engine_from_command(&create_example_table_nrows(n)); - bench_command_with_custom_stack_and_engine( - bencher, - "$table | select foo baz | ignore".to_string(), - stack, - engine, - ); - } -} - -#[divan::bench_group] -mod eval_commands { - use super::*; - - #[divan::bench(args = [100, 1_000, 10_000])] - fn interleave(bencher: divan::Bencher, n: i32) { - bench_command( - bencher, - format!("seq 1 {n} | wrap a | interleave {{ seq 1 {n} | wrap b }} | ignore"), - ) - } - - #[divan::bench(args = [100, 1_000, 10_000])] - fn interleave_with_ctrlc(bencher: divan::Bencher, n: i32) { - let mut engine = setup_engine(); - engine.ctrlc = Some(std::sync::Arc::new(std::sync::atomic::AtomicBool::new( - false, - ))); - load_standard_library(&mut engine).unwrap(); - let commands = Spanned { - span: Span::unknown(), - item: format!("seq 1 {n} | wrap a | interleave {{ seq 1 {n} | wrap b }} | ignore"), - }; - - bencher - .with_inputs(|| engine.clone()) - .bench_values(|mut engine| { - evaluate_commands( - &commands, - &mut engine, - &mut nu_protocol::engine::Stack::new(), - PipelineData::empty(), - None, - false, - ) - .unwrap(); - }) - } - - #[divan::bench(args = [1, 5, 10, 100, 1_000])] - fn for_range(bencher: divan::Bencher, n: i32) { - bench_command(bencher, format!("(for $x in (1..{}) {{ sleep 50ns }})", n)) - } - - #[divan::bench(args = [1, 5, 10, 100, 1_000])] - fn each(bencher: divan::Bencher, n: i32) { - bench_command( - bencher, - format!("(1..{}) | each {{|_| sleep 50ns }} | ignore", n), - ) - } - - #[divan::bench(args = [1, 5, 10, 100, 1_000])] - fn par_each_1t(bencher: divan::Bencher, n: i32) { - bench_command( - bencher, - format!("(1..{}) | par-each -t 1 {{|_| sleep 50ns }} | ignore", n), - ) - } - - #[divan::bench(args = [1, 5, 10, 100, 1_000])] - fn par_each_2t(bencher: divan::Bencher, n: i32) { - bench_command( - bencher, - format!("(1..{}) | par-each -t 2 {{|_| sleep 50ns }} | ignore", n), - ) - } -} - -#[divan::bench_group()] -mod parser_benchmarks { - use super::*; - - #[divan::bench()] - fn parse_default_config_file(bencher: divan::Bencher) { - let engine_state = setup_engine(); - let default_env = get_default_config().as_bytes(); - - bencher - .with_inputs(|| nu_protocol::engine::StateWorkingSet::new(&engine_state)) - .bench_refs(|working_set| parse(working_set, None, default_env, false)) - } - - #[divan::bench()] - fn parse_default_env_file(bencher: divan::Bencher) { - let engine_state = setup_engine(); - let default_env = get_default_env().as_bytes(); - - bencher - .with_inputs(|| nu_protocol::engine::StateWorkingSet::new(&engine_state)) - .bench_refs(|working_set| parse(working_set, None, default_env, false)) - } -} - -#[divan::bench_group()] -mod eval_benchmarks { - use super::*; - - #[divan::bench()] - fn eval_default_env(bencher: divan::Bencher) { - let default_env = get_default_env().as_bytes(); - let fname = "default_env.nu"; - bencher - .with_inputs(|| (setup_engine(), nu_protocol::engine::Stack::new())) - .bench_values(|(mut engine_state, mut stack)| { - eval_source( - &mut engine_state, - &mut stack, - default_env, - fname, - PipelineData::empty(), - false, - ) - }) - } - - #[divan::bench()] - fn eval_default_config(bencher: divan::Bencher) { - let default_env = get_default_config().as_bytes(); - let fname = "default_config.nu"; - bencher - .with_inputs(|| (setup_engine(), nu_protocol::engine::Stack::new())) - .bench_values(|(mut engine_state, mut stack)| { - eval_source( - &mut engine_state, - &mut stack, - default_env, - fname, - PipelineData::empty(), - false, - ) - }) - } -} - // generate a new table data with `row_cnt` rows, `col_cnt` columns. fn encoding_test_data(row_cnt: usize, col_cnt: usize) -> Value { let record = Value::test_record( @@ -380,76 +91,423 @@ fn encoding_test_data(row_cnt: usize, col_cnt: usize) -> Value { Value::list(vec![record; row_cnt], Span::test_data()) } -#[divan::bench_group()] -mod encoding_benchmarks { - use super::*; - - #[divan::bench(args = [(100, 5), (10000, 15)])] - fn json_encode(bencher: divan::Bencher, (row_cnt, col_cnt): (usize, usize)) { - let test_data = PluginOutput::CallResponse( - 0, - PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), - ); - let encoder = EncodingType::try_from_bytes(b"json").unwrap(); - bencher - .with_inputs(Vec::new) - .bench_values(|mut res| encoder.encode(&test_data, &mut res)) - } - - #[divan::bench(args = [(100, 5), (10000, 15)])] - fn msgpack_encode(bencher: divan::Bencher, (row_cnt, col_cnt): (usize, usize)) { - let test_data = PluginOutput::CallResponse( - 0, - PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), - ); - let encoder = EncodingType::try_from_bytes(b"msgpack").unwrap(); - bencher - .with_inputs(Vec::new) - .bench_values(|mut res| encoder.encode(&test_data, &mut res)) - } +fn bench_command( + name: &str, + command: &str, + stack: Stack, + engine: EngineState, +) -> impl IntoBenchmarks { + let commands = Spanned { + span: Span::unknown(), + item: command.to_string(), + }; + [benchmark_fn(name, move |b| { + let commands = commands.clone(); + let stack = stack.clone(); + let engine = engine.clone(); + b.iter(move || { + let mut stack = stack.clone(); + let mut engine = engine.clone(); + black_box( + evaluate_commands( + &commands, + &mut engine, + &mut stack, + PipelineData::empty(), + None, + false, + ) + .unwrap(), + ); + }) + })] } -#[divan::bench_group()] -mod decoding_benchmarks { - use super::*; - - #[divan::bench(args = [(100, 5), (10000, 15)])] - fn json_decode(bencher: divan::Bencher, (row_cnt, col_cnt): (usize, usize)) { - let test_data = PluginOutput::CallResponse( - 0, - PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), - ); - let encoder = EncodingType::try_from_bytes(b"json").unwrap(); - let mut res = vec![]; - encoder.encode(&test_data, &mut res).unwrap(); - bencher - .with_inputs(|| { - let mut binary_data = std::io::Cursor::new(res.clone()); - binary_data.set_position(0); - binary_data - }) - .bench_values(|mut binary_data| -> Result, _> { - encoder.decode(&mut binary_data) - }) - } - - #[divan::bench(args = [(100, 5), (10000, 15)])] - fn msgpack_decode(bencher: divan::Bencher, (row_cnt, col_cnt): (usize, usize)) { - let test_data = PluginOutput::CallResponse( - 0, - PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), - ); - let encoder = EncodingType::try_from_bytes(b"msgpack").unwrap(); - let mut res = vec![]; - encoder.encode(&test_data, &mut res).unwrap(); - bencher - .with_inputs(|| { - let mut binary_data = std::io::Cursor::new(res.clone()); - binary_data.set_position(0); - binary_data - }) - .bench_values(|mut binary_data| -> Result, _> { - encoder.decode(&mut binary_data) - }) - } +fn bench_eval_source( + name: &str, + fname: String, + source: Vec, + stack: Stack, + engine: EngineState, +) -> impl IntoBenchmarks { + [benchmark_fn(name, move |b| { + let stack = stack.clone(); + let engine = engine.clone(); + let fname = fname.clone(); + let source = source.clone(); + b.iter(move || { + let mut stack = stack.clone(); + let mut engine = engine.clone(); + let fname: &str = &fname.clone(); + let source: &[u8] = &source.clone(); + black_box(eval_source( + &mut engine, + &mut stack, + source, + fname, + PipelineData::empty(), + false, + )); + }) + })] } + +/// Load the standard library into the engine. +fn bench_load_standard_lib() -> impl IntoBenchmarks { + [benchmark_fn("load_standard_lib", move |b| { + let engine = setup_engine(); + b.iter(move || { + let mut engine = engine.clone(); + load_standard_library(&mut engine) + }) + })] +} + +fn create_flat_record_string(n: i32) -> String { + let mut s = String::from("let record = {"); + for i in 0..n { + s.push_str(&format!("col_{}: {}", i, i)); + if i < n - 1 { + s.push_str(", "); + } + } + s.push('}'); + s +} + +fn create_nested_record_string(depth: i32) -> String { + let mut s = String::from("let record = {"); + for _ in 0..depth { + s.push_str("col: {"); + } + s.push_str("col_final: 0"); + for _ in 0..depth { + s.push('}'); + } + s.push('}'); + s +} + +fn create_example_table_nrows(n: i32) -> String { + let mut s = String::from("let table = [[foo bar baz]; "); + for i in 0..n { + s.push_str(&format!("[0, 1, {i}]")); + if i < n - 1 { + s.push_str(", "); + } + } + s.push(']'); + s +} + +fn bench_record_create(n: i32) -> impl IntoBenchmarks { + bench_command( + &format!("record_create_{n}"), + &create_flat_record_string(n), + Stack::new(), + setup_engine(), + ) +} + +fn bench_record_flat_access(n: i32) -> impl IntoBenchmarks { + let setup_command = create_flat_record_string(n); + let (stack, engine) = setup_stack_and_engine_from_command(&setup_command); + bench_command( + &format!("record_flat_access_{n}"), + "$record.col_0 | ignore", + stack, + engine, + ) +} + +fn bench_record_nested_access(n: i32) -> impl IntoBenchmarks { + let setup_command = create_nested_record_string(n); + let (stack, engine) = setup_stack_and_engine_from_command(&setup_command); + let nested_access = ".col".repeat(n as usize); + bench_command( + &format!("record_nested_access_{n}"), + &format!("$record{} | ignore", nested_access), + stack, + engine, + ) +} + +fn bench_table_create(n: i32) -> impl IntoBenchmarks { + bench_command( + &format!("table_create_{n}"), + &create_example_table_nrows(n), + Stack::new(), + setup_engine(), + ) +} + +fn bench_table_get(n: i32) -> impl IntoBenchmarks { + let setup_command = create_example_table_nrows(n); + let (stack, engine) = setup_stack_and_engine_from_command(&setup_command); + bench_command( + &format!("table_get_{n}"), + "$table | get bar | math sum | ignore", + stack, + engine, + ) +} + +fn bench_table_select(n: i32) -> impl IntoBenchmarks { + let setup_command = create_example_table_nrows(n); + let (stack, engine) = setup_stack_and_engine_from_command(&setup_command); + bench_command( + &format!("table_select_{n}"), + "$table | select foo baz | ignore", + stack, + engine, + ) +} + +fn bench_eval_interleave(n: i32) -> impl IntoBenchmarks { + let engine = setup_engine(); + let stack = Stack::new(); + bench_command( + &format!("eval_interleave_{n}"), + &format!("seq 1 {n} | wrap a | interleave {{ seq 1 {n} | wrap b }} | ignore"), + stack, + engine, + ) +} + +fn bench_eval_interleave_with_ctrlc(n: i32) -> impl IntoBenchmarks { + let mut engine = setup_engine(); + engine.ctrlc = Some(std::sync::Arc::new(std::sync::atomic::AtomicBool::new( + false, + ))); + let stack = Stack::new(); + bench_command( + &format!("eval_interleave_with_ctrlc_{n}"), + &format!("seq 1 {n} | wrap a | interleave {{ seq 1 {n} | wrap b }} | ignore"), + stack, + engine, + ) +} + +fn bench_eval_for(n: i32) -> impl IntoBenchmarks { + let engine = setup_engine(); + let stack = Stack::new(); + bench_command( + &format!("eval_for_{n}"), + &format!("(for $x in (1..{n}) {{ 1 }}) | ignore"), + stack, + engine, + ) +} + +fn bench_eval_each(n: i32) -> impl IntoBenchmarks { + let engine = setup_engine(); + let stack = Stack::new(); + bench_command( + &format!("eval_each_{n}"), + &format!("(1..{n}) | each {{|_| 1 }} | ignore"), + stack, + engine, + ) +} + +fn bench_eval_par_each(n: i32) -> impl IntoBenchmarks { + let engine = setup_engine(); + let stack = Stack::new(); + bench_command( + &format!("eval_par_each_{n}"), + &format!("(1..{}) | par-each -t 2 {{|_| 1 }} | ignore", n), + stack, + engine, + ) +} + +fn bench_eval_default_config() -> impl IntoBenchmarks { + let default_env = get_default_config().as_bytes().to_vec(); + let fname = "default_config.nu".to_string(); + bench_eval_source( + "eval_default_config", + fname, + default_env, + Stack::new(), + setup_engine(), + ) +} + +fn bench_eval_default_env() -> impl IntoBenchmarks { + let default_env = get_default_env().as_bytes().to_vec(); + let fname = "default_env.nu".to_string(); + bench_eval_source( + "eval_default_env", + fname, + default_env, + Stack::new(), + setup_engine(), + ) +} + +fn encode_json(row_cnt: usize, col_cnt: usize) -> impl IntoBenchmarks { + let test_data = Rc::new(PluginOutput::CallResponse( + 0, + PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), + )); + let encoder = Rc::new(EncodingType::try_from_bytes(b"json").unwrap()); + + [benchmark_fn( + format!("encode_json_{}_{}", row_cnt, col_cnt), + move |b| { + let encoder = encoder.clone(); + let test_data = test_data.clone(); + b.iter(move || { + let mut res = Vec::new(); + encoder.encode(&*test_data, &mut res).unwrap(); + }) + }, + )] +} + +fn encode_msgpack(row_cnt: usize, col_cnt: usize) -> impl IntoBenchmarks { + let test_data = Rc::new(PluginOutput::CallResponse( + 0, + PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), + )); + let encoder = Rc::new(EncodingType::try_from_bytes(b"msgpack").unwrap()); + + [benchmark_fn( + format!("encode_msgpack_{}_{}", row_cnt, col_cnt), + move |b| { + let encoder = encoder.clone(); + let test_data = test_data.clone(); + b.iter(move || { + let mut res = Vec::new(); + encoder.encode(&*test_data, &mut res).unwrap(); + }) + }, + )] +} + +fn decode_json(row_cnt: usize, col_cnt: usize) -> impl IntoBenchmarks { + let test_data = PluginOutput::CallResponse( + 0, + PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), + ); + let encoder = EncodingType::try_from_bytes(b"json").unwrap(); + let mut res = vec![]; + encoder.encode(&test_data, &mut res).unwrap(); + + [benchmark_fn( + format!("decode_json_{}_{}", row_cnt, col_cnt), + move |b| { + let res = res.clone(); + b.iter(move || { + let mut binary_data = std::io::Cursor::new(res.clone()); + binary_data.set_position(0); + let _: Result, _> = + black_box(encoder.decode(&mut binary_data)); + }) + }, + )] +} + +fn decode_msgpack(row_cnt: usize, col_cnt: usize) -> impl IntoBenchmarks { + let test_data = PluginOutput::CallResponse( + 0, + PluginCallResponse::value(encoding_test_data(row_cnt, col_cnt)), + ); + let encoder = EncodingType::try_from_bytes(b"msgpack").unwrap(); + let mut res = vec![]; + encoder.encode(&test_data, &mut res).unwrap(); + + [benchmark_fn( + format!("decode_msgpack_{}_{}", row_cnt, col_cnt), + move |b| { + let res = res.clone(); + b.iter(move || { + let mut binary_data = std::io::Cursor::new(res.clone()); + binary_data.set_position(0); + let _: Result, _> = + black_box(encoder.decode(&mut binary_data)); + }) + }, + )] +} + +tango_benchmarks!( + bench_load_standard_lib(), + // Data types + // Record + bench_record_create(1), + bench_record_create(10), + bench_record_create(100), + bench_record_create(1_000), + bench_record_flat_access(1), + bench_record_flat_access(10), + bench_record_flat_access(100), + bench_record_flat_access(1_000), + bench_record_nested_access(1), + bench_record_nested_access(2), + bench_record_nested_access(4), + bench_record_nested_access(8), + bench_record_nested_access(16), + bench_record_nested_access(32), + bench_record_nested_access(64), + bench_record_nested_access(128), + // Table + bench_table_create(1), + bench_table_create(10), + bench_table_create(100), + bench_table_create(1_000), + bench_table_get(1), + bench_table_get(10), + bench_table_get(100), + bench_table_get(1_000), + bench_table_select(1), + bench_table_select(10), + bench_table_select(100), + bench_table_select(1_000), + // Eval + // Interleave + bench_eval_interleave(100), + bench_eval_interleave(1_000), + bench_eval_interleave(10_000), + bench_eval_interleave_with_ctrlc(100), + bench_eval_interleave_with_ctrlc(1_000), + bench_eval_interleave_with_ctrlc(10_000), + // For + bench_eval_for(1), + bench_eval_for(10), + bench_eval_for(100), + bench_eval_for(1_000), + bench_eval_for(10_000), + // Each + bench_eval_each(1), + bench_eval_each(10), + bench_eval_each(100), + bench_eval_each(1_000), + bench_eval_each(10_000), + // Par-Each + bench_eval_par_each(1), + bench_eval_par_each(10), + bench_eval_par_each(100), + bench_eval_par_each(1_000), + bench_eval_par_each(10_000), + // Config + bench_eval_default_config(), + // Env + bench_eval_default_env(), + // Encode + // Json + encode_json(100, 5), + encode_json(10000, 15), + // MsgPack + encode_msgpack(100, 5), + encode_msgpack(10000, 15), + // Decode + // Json + decode_json(100, 5), + decode_json(10000, 15), + // MsgPack + decode_msgpack(100, 5), + decode_msgpack(10000, 15) +); + +tango_main!(); diff --git a/scripts/build.rs b/scripts/build.rs index f5823043e0..beabba80dc 100644 --- a/scripts/build.rs +++ b/scripts/build.rs @@ -10,4 +10,9 @@ fn main() { } #[cfg(not(windows))] -fn main() {} +fn main() { + // Tango uses dynamic linking, to allow us to dynamically change between two bench suit at runtime. + // This is currently not supported on non nightly rust, on windows. + println!("cargo:rustc-link-arg-benches=-rdynamic"); + println!("cargo:rerun-if-changed=build.rs"); +} diff --git a/toolkit.nu b/toolkit.nu index 98fcd4400b..407998c514 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -491,6 +491,31 @@ export def cov [] { print $"Coverage generation took ($end - $start)." } + +# Benchmark the current branch against the main branch +# Ensure you have `cargo-export` installed to generate separate artifacts for each branch. +export def "benchmark-current-branch-with-main" [] { + let main = "main" + let current_branch = (git branch --show-current) + + cargo export $"target/($current_branch)" -- bench + git checkout $main + cargo export $"target/($main)" -- bench + git checkout $current_branch + ^$"./target/($current_branch)/benchmarks" compare $"./target/($main)/benchmarks" -o -s 50 +} + +# Benchmark the current branch and logs the result in `./target/samples` +# Ensure you have `cargo-export` installed to generate separate artifacts for each branch. +export def "benchmark-and-log-result" [] { + let current_branch = (git branch --show-current) + let current_dir = "./" | path expand + let res_path = $"($current_dir)/target/samples" + + cargo export $"target/($current_branch)" -- bench + ^$"./target/($current_branch)/benchmarks" compare -o -s 50 --dump $res_path +} + # Build all Windows archives and MSIs for release manually # # This builds std and full distributions for both aarch64 and x86_64.