Skip to content

Commit

Permalink
Added benchmarking code.
Browse files Browse the repository at this point in the history
Removed subdirectories of `custom-prompt` from `package` workflow sensitivity list.
  • Loading branch information
tfpf committed Jun 23, 2024
1 parent f430d1c commit a46b9f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
paths:
- '.github/workflows/package.yml'
- 'custom-prompt/**'
- 'custom-prompt/*'
workflow_dispatch:

jobs:
Expand Down
16 changes: 16 additions & 0 deletions custom-prompt/bench/bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /usr/bin/env sh

bench_str='
bench()
{
for _ in {1..400}
do
_before_command
_after_command
done
}
bench
'

time -f "Bash: %e s" bash -ic "$bench_str"
time -f "Zsh: %e s" zsh -ic "$bench_str"

0 comments on commit a46b9f5

Please sign in to comment.