Skip to content

fix: do not invoke debug traps during completion funcs#163

Merged
reubeno merged 1 commit into
mainfrom
no-debug-traps-during-completion
Sep 17, 2024
Merged

fix: do not invoke debug traps during completion funcs#163
reubeno merged 1 commit into
mainfrom
no-debug-traps-during-completion

Conversation

@reubeno
Copy link
Copy Markdown
Owner

@reubeno reubeno commented Sep 17, 2024

Not the best implementation, but this seems to match what bash does and can speed up completion when using debug traps (such as the one that starship installs).

@github-actions
Copy link
Copy Markdown

Test Results

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

Results for commit 1587bd5.

@github-actions
Copy link
Copy Markdown

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.60 μs 3.60 μs -0.00 μs ⚪ Unchanged
instantiate_shell 60.16 μs 60.38 μs 0.22 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 27943.91 μs 27389.76 μs -554.14 μs 🟢 -1.98%
parse_bash_completion 5541.92 μs 5577.60 μs 35.68 μs 🟠 +0.64%
parse_sample_script 8.79 μs 8.86 μs 0.07 μs 🟠 +0.83%
run_echo_builtin_command 94.73 μs 93.01 μs -1.72 μs 🟢 -1.82%
run_one_builtin_command 114.24 μs 111.85 μs -2.39 μs 🟢 -2.09%
run_one_external_command 1939.63 μs 1945.86 μs 6.23 μs ⚪ Unchanged
run_one_external_command_directly 999.22 μs 993.70 μs -5.52 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/completion.rs 🔴 42.92% 🔴 42.64% 🔴 -0.28%
brush-core/src/shell.rs 🟢 78.21% 🟢 77.59% 🔴 -0.62%
brush-shell/src/main.rs 🟢 89.6% 🟢 88.8% 🔴 -0.8%
Overall Coverage 🟢 76.27% 🟢 76.21% 🔴 -0.06%

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

@reubeno reubeno merged commit 9a03628 into main Sep 17, 2024
@reubeno reubeno deleted the no-debug-traps-during-completion branch September 17, 2024 23:20
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