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

Minor optimizations for parsing #33

Merged
merged 1 commit into from
May 29, 2024
Merged

Minor optimizations for parsing #33

merged 1 commit into from
May 29, 2024

Conversation

reubeno
Copy link
Owner

@reubeno reubeno commented May 29, 2024

No description provided.

Copy link

Test Results

374 tests   357 ✅  2m 51s ⏱️
 63 suites   17 💤
  8 files      0 ❌

Results for commit a03b38f.

Copy link

Performance Benchmark Report

Benchmark name Baseline (ns) Test/PR (ns) Delta (ns) Delta %
expand_one_string 3448 ns 3441 ns -7 ns 🟢 -0.20%
instantiate_shell 60451 ns 60517 ns +66 ns 🟠 +0.11%
instantiate_shell_with_init_scripts 29271073 ns 27723958 ns -1547115 ns 🟢 -5.29%
parse_bash_completion 6594205 ns 5658012 ns -936193 ns 🟢 -14.20%
parse_sample_script 10810 ns 8952 ns -1858 ns 🟢 -17.19%
run_echo_builtin_command 102013 ns 99937 ns -2076 ns 🟢 -2.04%
run_one_builtin_command 117584 ns 117272 ns -312 ns 🟢 -0.27%
run_one_external_command 1844989 ns 1841851 ns -3138 ns 🟢 -0.17%
run_one_external_command_directly 1026854 ns 1029471 ns +2617 ns 🟠 +0.25%

Code Coverage Report

Package Base Coverage New Coverage Difference
/home/runner/work/brush/brush/cli/src/main.rs 🟠 68.55% 🟠 68.55% ⚪ 0%
/home/runner/work/brush/brush/interactive-shell/src/interactive_shell.rs 🟠 74.6% 🟠 74.6% ⚪ 0%
/home/runner/work/brush/brush/parser/src/arithmetic.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/parser/src/ast.rs 🔴 29.12% 🔴 29.12% ⚪ 0%
/home/runner/work/brush/brush/parser/src/error.rs 🟢 83.33% 🟢 83.33% ⚪ 0%
/home/runner/work/brush/brush/parser/src/parser.rs 🟢 98.53% 🟢 98.28% 🔴 -0.25%
/home/runner/work/brush/brush/parser/src/pattern.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/parser/src/prompt.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/parser/src/test_command.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/parser/src/tokenizer.rs 🟢 95.47% 🟢 95.47% ⚪ 0%
/home/runner/work/brush/brush/parser/src/word.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/arithmetic.rs 🟢 97.03% 🟢 97.03% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtin.rs 🔴 24.39% 🔴 24.39% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/alias.rs 🟢 85.71% 🟢 85.71% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/bg.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/break_.rs 🟢 90% 🟢 90% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/builtin_.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/cd.rs 🟢 88.57% 🟢 88.57% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/colon.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/complete.rs 🔴 20.79% 🔴 20.79% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/continue_.rs 🟢 90% 🟢 90% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/declare.rs 🟢 82.78% 🟢 82.78% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/dirs.rs 🟢 90.48% 🟢 90.48% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/dot.rs 🟢 95.65% 🟢 95.65% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/echo.rs 🟢 86.11% 🟢 86.11% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/enable.rs 🟢 91.07% 🟢 91.07% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/eval.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/exec.rs 🟢 88.37% 🟢 88.37% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/exit.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/export.rs 🟢 88.73% 🟢 88.73% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/false_.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/fg.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/getopts.rs 🟢 97.7% 🟢 97.7% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/help.rs 🟢 92.86% 🟢 92.86% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/jobs.rs 🟢 81.25% 🟢 81.25% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/kill.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/let_.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/mod.rs 🟢 94.61% 🟢 94.61% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/popd.rs 🟢 94.12% 🟢 94.12% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/printf.rs 🟢 96.77% 🟢 96.77% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/pushd.rs 🟢 90% 🟢 90% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/pwd.rs 🟢 89.47% 🟢 89.47% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/read.rs 🟢 96.1% 🟢 96.1% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/return_.rs 🟢 83.33% 🟢 83.33% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/set.rs 🟠 70.8% 🟠 70.8% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/shift.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/shopt.rs 🟢 88.39% 🟢 88.39% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/test.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/trap.rs 🟢 81.72% 🟢 81.72% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/true_.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/type_.rs 🟢 91.07% 🟢 91.07% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/umask.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/unalias.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/unimp.rs 🔴 0% 🔴 0% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/unset.rs 🟢 94.64% 🟢 94.64% ⚪ 0%
/home/runner/work/brush/brush/shell/src/builtins/wait.rs 🟢 85.71% 🟢 85.71% ⚪ 0%
/home/runner/work/brush/brush/shell/src/commands.rs 🟠 72.73% 🟠 72.73% ⚪ 0%
/home/runner/work/brush/brush/shell/src/completion.rs 🟠 50.79% 🟠 50.79% ⚪ 0%
/home/runner/work/brush/brush/shell/src/context.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/env.rs 🟢 87.85% 🟢 87.85% ⚪ 0%
/home/runner/work/brush/brush/shell/src/error.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/escape.rs 🔴 14.91% 🔴 14.91% ⚪ 0%
/home/runner/work/brush/brush/shell/src/expansion.rs 🟢 97.26% 🟢 97.24% 🔴 -0.02%
/home/runner/work/brush/brush/shell/src/extendedtests.rs 🟠 66.38% 🟠 66.38% ⚪ 0%
/home/runner/work/brush/brush/shell/src/interp.rs 🟢 92.68% 🟢 92.68% ⚪ 0%
/home/runner/work/brush/brush/shell/src/jobs.rs 🔴 44.23% 🔴 44.23% ⚪ 0%
/home/runner/work/brush/brush/shell/src/keywords.rs 🟢 96.88% 🟢 96.88% ⚪ 0%
/home/runner/work/brush/brush/shell/src/namedoptions.rs 🟠 52.09% 🟠 52.09% ⚪ 0%
/home/runner/work/brush/brush/shell/src/openfiles.rs 🟠 57.58% 🟠 57.58% ⚪ 0%
/home/runner/work/brush/brush/shell/src/options.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/patterns.rs 🟢 96.92% 🟢 96.92% ⚪ 0%
/home/runner/work/brush/brush/shell/src/prompt.rs 🟢 77.63% 🟢 78.48% 🟢 0.85%
/home/runner/work/brush/brush/shell/src/regex.rs 🟢 100% 🟢 100% ⚪ 0%
/home/runner/work/brush/brush/shell/src/shell.rs 🟢 78.77% 🟢 78.77% ⚪ 0%
/home/runner/work/brush/brush/shell/src/tests.rs 🟠 50% 🟠 50% ⚪ 0%
/home/runner/work/brush/brush/shell/src/traps.rs 🟢 76.92% 🟢 76.92% ⚪ 0%
/home/runner/work/brush/brush/shell/src/users.rs 🔴 20% 🔴 20% ⚪ 0%
/home/runner/work/brush/brush/shell/src/variables.rs 🟢 79.39% 🟢 79.39% ⚪ 0%
Overall Coverage 🟢 79.46% 🟢 79.45% 🔴 -0.01%

Minimum allowed coverage is 0%, this run produced 79.45%

@reubeno reubeno changed the title Adjustments to parsing Minor optimizations for parsing May 29, 2024
@reubeno reubeno merged commit f217b2c into main May 29, 2024
5 checks passed
@reubeno reubeno deleted the adjustments branch May 29, 2024 05:53
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