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

perf: reimplement colon command as a "simple builtin" #315

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

reubeno
Copy link
Owner

@reubeno reubeno commented Jan 9, 2025

No description provided.

Copy link

github-actions bot commented Jan 9, 2025

Test Results

    2 files      9 suites   1m 22s ⏱️
  574 tests   574 ✅ 0 💤 0 ❌
1 134 runs  1 134 ✅ 0 💤 0 ❌

Results for commit 95acf24.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 9, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 16.98 μs 17.72 μs 0.74 μs 🟠 +4.37%
eval_arithmetic 0.19 μs 0.18 μs -0.00 μs ⚪ Unchanged
expand_one_string 1.65 μs 1.60 μs -0.04 μs ⚪ Unchanged
for_loop 40.86 μs 32.90 μs -7.96 μs 🟢 -19.48%
function_call 3.52 μs 3.32 μs -0.20 μs ⚪ Unchanged
instantiate_shell 47.52 μs 48.45 μs 0.93 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 24499.91 μs 22372.51 μs -2127.40 μs 🟢 -8.68%
parse_bash_completion 1683.97 μs 1686.11 μs 2.15 μs ⚪ Unchanged
parse_sample_script 2.22 μs 2.21 μs -0.01 μs ⚪ Unchanged
run_echo_builtin_command 16.09 μs 16.18 μs 0.08 μs ⚪ Unchanged
run_one_external_command 1871.14 μs 1924.90 μs 53.76 μs 🟠 +2.87%

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins.rs 🔴 45.81% 🔴 47.57% 🟢 1.76%
brush-core/src/builtins/colon.rs 🟢 100% 🔴 44.44% 🔴 -55.56%
brush-core/src/builtins/factory.rs 🟢 82.35% 🟢 94.69% 🟢 12.34%
brush-core/src/jobs.rs 🔴 43.1% 🔴 37.07% 🔴 -6.03%
Overall Coverage 🟢 76.68% 🟢 76.72% 🟢 0.04%

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

@reubeno reubeno changed the title experiment: switch a command over to being a simple builtin perf: reimplement colon command as a "simple builtin" Jan 9, 2025
@reubeno reubeno marked this pull request as ready for review January 9, 2025 17:09
@reubeno reubeno requested a review from Copilot January 9, 2025 17:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

}
builtins::ContentType::ShortUsage => Ok(":: :".into()),
builtins::ContentType::ShortDescription => Ok(": - Null command".into()),
builtins::ContentType::ManPage => error::unimp("man page not yet implemented"),
Copy link
Preview

Copilot AI Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message 'man page not yet implemented' is unclear. It should be updated to 'Man page rendering is not yet implemented for this command.'

Suggested change
builtins::ContentType::ManPage => error::unimp("man page not yet implemented"),
builtins::ContentType::ManPage => error::unimp("Man page rendering is not yet implemented for this command."),

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@reubeno reubeno merged commit a767905 into main Jan 9, 2025
17 checks passed
@reubeno reubeno deleted the colon-builtin branch January 9, 2025 20:26
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