From 6912a7a57bdd54b86e311580c26635d1cfa3b742 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Tue, 16 Apr 2024 14:15:19 +0200 Subject: [PATCH] bench: add divan back Divan doesn't need nightly rust anymore. --- Cargo.lock | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 8 +------- 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7703fe1..fea6f4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -193,6 +193,7 @@ checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstyle", "clap_lex", + "terminal_size", ] [[package]] @@ -214,6 +215,12 @@ 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" @@ -318,6 +325,31 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[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", +] + [[package]] name = "downcast-rs" version = "1.2.0" @@ -809,6 +841,12 @@ 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.2" @@ -1060,6 +1098,16 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "termios" version = "0.2.2" @@ -1203,6 +1251,7 @@ dependencies = [ "bytes", "criterion", "crossterm", + "divan", "iai", "insta", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 81a8420..e755d44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,12 +26,6 @@ keywords = ["tui", "terminal", "ratatui", "tty", "multiplexer"] categories = ["command-line-interface", "command-line-utilities"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -# [workspace] -# members = [ -# "bench", -# ] - [features] default = ["vt100"] unstable = ["dep:portable-pty"] @@ -45,7 +39,7 @@ portable-pty = { version = "0.8.1", optional = true } bytes = "1.6.0" criterion = { version = "0.5.1", features = ["html_reports"] } # divan now needs unstable rust, activate manually for now -# divan = "0.1.7" +divan = "0.1.14" #TODO: go back to release version, once it is fixed # iai = "0.1.1" iai = { git = "https://github.com/sigaloid/iai", rev = "6c83e942" }