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

chore: extract InteractiveShell as trait + refactor #159

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

reubeno
Copy link
Owner

@reubeno reubeno commented Sep 9, 2024

Extracts out InteractiveShell as a trait, albeit with a few default implementations. (That may be addressed in the future.)

This is intended to pave the way to allow for swapping things out for an alternate implementation experimentally.

Copy link

github-actions bot commented Sep 9, 2024

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.60 μs 3.61 μs 0.01 μs ⚪ Unchanged
instantiate_shell 59.38 μs 59.56 μs 0.18 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 27412.36 μs 27432.14 μs 19.78 μs ⚪ Unchanged
parse_bash_completion 5625.62 μs 5599.30 μs -26.32 μs ⚪ Unchanged
parse_sample_script 8.85 μs 8.88 μs 0.03 μs ⚪ Unchanged
run_echo_builtin_command 92.80 μs 92.52 μs -0.28 μs ⚪ Unchanged
run_one_builtin_command 112.20 μs 113.33 μs 1.13 μs ⚪ Unchanged
run_one_external_command 2003.51 μs 1927.08 μs -76.43 μs 🟢 -3.81%
run_one_external_command_directly 998.98 μs 1004.07 μs 5.08 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins/unalias.rs 🔴 0% 🟢 85% 🟢 85%
brush-core/src/jobs.rs 🔴 43.48% 🔴 41.3% 🔴 -2.18%
brush-core/src/shell.rs 🟢 78.01% 🟢 77.9% 🔴 -0.11%
brush-interactive/src/interactive_shell.rs 🟢 76.96% 🟠 66.1% 🔴 -10.86%
brush-interactive/src/rustyline_shell.rs 🔴 0% 🟢 81.87% 🟢 81.87%
brush-shell/src/main.rs 🟢 88.54% 🟢 89.6% 🟢 1.06%
brush-shell/src/shell_factory.rs 🔴 0% 🔴 13.04% 🟢 13.04%
Overall Coverage 🟢 76.29% 🟢 76.32% 🟢 0.03%

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

@reubeno reubeno marked this pull request as ready for review September 9, 2024 05:27
Copy link

github-actions bot commented Sep 9, 2024

Test Results

410 tests   396 ✅  25s ⏱️
 68 suites   14 💤
 11 files      0 ❌

Results for commit fd57d6b.

@reubeno reubeno merged commit cba55a8 into main Sep 9, 2024
10 checks passed
@reubeno reubeno deleted the shell-trait branch September 9, 2024 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant