Mercurial > hg
diff rust/Cargo.lock @ 49913:c15b415d1bff
rust: use `logging_timer` instead of `micro_timer`
I am the author of `micro_timer`.
I built it at the time because I couldn't find a crate that was simple to use
and flexible to do function timing with. Turns out I just couldn't find it
because crates.io's search isn't all that great, or maybe I didn't look hard
enough.
`logging_timer` is better in every way:
- supports changing the logging level
- supports start and end logging
- supports intermediary messages
- supports inline macros
- supports formatting the output
- better IDE/tree-sitter integration thanks to a more robust proc macro
I also changed all uses to one-liners, so it's easier to copy-paste.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Fri, 06 Jan 2023 18:52:04 +0100 |
parents | 37bc3edef76f |
children | da02e88b4850 |
line wrap: on
line diff
--- a/rust/Cargo.lock Thu Jan 12 16:15:51 2023 +0000 +++ b/rust/Cargo.lock Fri Jan 06 18:52:04 2023 +0100 @@ -536,8 +536,8 @@ "lazy_static", "libc", "log", + "logging_timer", "memmap2", - "micro-timer", "once_cell", "ouroboros", "pretty_assertions", @@ -705,6 +705,28 @@ ] [[package]] +name = "logging_timer" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e96f261d684b7089aa576bb74e823241dccd994b27d30fabf1dcb3af284fe9" +dependencies = [ + "log", + "logging_timer_proc_macros", +] + +[[package]] +name = "logging_timer_proc_macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9062912d7952c5588cc474795e0b9ee008e7e6781127945b85413d4b99d81" +dependencies = [ + "log", + "proc-macro2", + "quote", + "syn", +] + +[[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -730,28 +752,6 @@ ] [[package]] -name = "micro-timer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de32cb59a062672560d6f0842c4aa7714727457b9fe2daf8987d995a176a405" -dependencies = [ - "micro-timer-macros", - "scopeguard", -] - -[[package]] -name = "micro-timer-macros" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee948b94700125b52dfb68dd17c19f6326696c1df57f92c05ee857463c93ba1" -dependencies = [ - "proc-macro2", - "quote", - "scopeguard", - "syn", -] - -[[package]] name = "miniz_oxide" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1094,7 +1094,7 @@ "home", "lazy_static", "log", - "micro-timer", + "logging_timer", "rayon", "regex", "users",