Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace lazy_static with std::sync::LazyLock #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

39555
Copy link
Contributor

@39555 39555 commented Oct 11, 2024

The functionality of lazy_static now in the core since 1.80 rust-lang/rust#121377

Copy link

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.33 μs 3.33 μs -0.00 μs ⚪ Unchanged
instantiate_shell 60.71 μs 59.29 μs -1.42 μs 🟢 -2.34%
instantiate_shell_with_init_scripts 29238.12 μs 28906.44 μs -331.68 μs 🟢 -1.13%
parse_bash_completion 2737.26 μs 2696.84 μs -40.43 μs 🟢 -1.48%
parse_sample_script 4.00 μs 3.96 μs -0.04 μs ⚪ Unchanged
run_echo_builtin_command 92.70 μs 89.44 μs -3.26 μs 🟢 -3.52%
run_one_builtin_command 108.71 μs 105.78 μs -2.93 μs 🟢 -2.69%
run_one_external_command 1958.90 μs 1906.28 μs -52.62 μs 🟢 -2.69%
run_one_external_command_directly 1010.91 μs 1011.85 μs 0.93 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins/declare.rs 🟢 81.64% 🟢 81.99% 🟢 0.35%
brush-core/src/keywords.rs 🟢 96.88% 🟢 94.12% 🔴 -2.76%
brush-core/src/namedoptions.rs 🟠 54.33% 🟢 99.72% 🟢 45.39%
brush-core/src/shell.rs 🟢 81.68% 🟢 81.56% 🔴 -0.12%
brush-core/src/sys/unix/signal.rs 🟠 72.13% 🟢 75.41% 🟢 3.28%
brush-shell/src/main.rs 🟢 90.26% 🟢 90.32% 🟢 0.06%
Overall Coverage 🟢 75.12% 🟢 76.74% 🟢 1.62%

Minimum allowed coverage is 70%, this run produced 76.74%

@reubeno
Copy link
Owner

reubeno commented Oct 11, 2024

Nice!

Our current MSRV is 1.75, which was initially released about 10 months ago, and this would force us to move that forward. What would you see as the benefits of doing so now vs. later?

More broadly, we need to establish a general procedure for when we upgrade the MSRV. I'll need to do some research to see what other projects do, but am very open to input here.

@39555
Copy link
Contributor Author

39555 commented Oct 11, 2024

We can do it later. There are no huge benefits

@reubeno reubeno added the blocked_on_msrv Items that should wait until we upgrade MSRV label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked_on_msrv Items that should wait until we upgrade MSRV
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants