mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
Add more benchmarks
This commit is contained in:
parent
77337fdc8a
commit
a913702b63
9 changed files with 43 additions and 0 deletions
12
benchmarks/benchmarks/load_completions.fish
Normal file
12
benchmarks/benchmarks/load_completions.fish
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
set -l compdir (status dirname)/../../share/completions
|
||||||
|
cd $compdir
|
||||||
|
for file in *.fish
|
||||||
|
set -l bname (string replace -r '.fish$' '' -- $file)
|
||||||
|
if type -q $bname
|
||||||
|
source $file >/dev/null
|
||||||
|
if test $status -gt 0
|
||||||
|
echo FAILING FILE $file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
6
benchmarks/benchmarks/no_execute.fish
Normal file
6
benchmarks/benchmarks/no_execute.fish
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set -l path (status dirname)
|
||||||
|
set -l fish (status fish-path)
|
||||||
|
for f in (seq 100)
|
||||||
|
echo $fish -n $path/aliases.fish
|
||||||
|
$fish -n $path/aliases.fish
|
||||||
|
end
|
1
benchmarks/benchmarks/printf-escapes.fish
Normal file
1
benchmarks/benchmarks/printf-escapes.fish
Normal file
|
@ -0,0 +1 @@
|
||||||
|
printf (string repeat -n 200 \\x7f)%s\n (string repeat -n 2000 aaa\n)
|
5
benchmarks/benchmarks/printf.fish
Normal file
5
benchmarks/benchmarks/printf.fish
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
for i in (seq 100000)
|
||||||
|
printf '%f\n' $i.$i
|
||||||
|
end
|
||||||
|
|
||||||
|
exit 0
|
7
benchmarks/benchmarks/read.fish
Normal file
7
benchmarks/benchmarks/read.fish
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
set -l tmp (mktemp)
|
||||||
|
string repeat -n 2000 >$tmp
|
||||||
|
for i in (seq 1000)
|
||||||
|
cat $tmp | read -l foo
|
||||||
|
end
|
||||||
|
|
||||||
|
true
|
3
benchmarks/benchmarks/set_long.fish
Normal file
3
benchmarks/benchmarks/set_long.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
for abc in (seq 100000)
|
||||||
|
set -l def
|
||||||
|
end
|
3
benchmarks/benchmarks/string-repeat.fish
Normal file
3
benchmarks/benchmarks/string-repeat.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
for i in (string repeat -n 100 \n)
|
||||||
|
string repeat -n 50000 a\n
|
||||||
|
end
|
3
benchmarks/benchmarks/string-wildcard.fish
Normal file
3
benchmarks/benchmarks/string-wildcard.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
for i in (seq 100000)
|
||||||
|
string match '*o' fooooooo
|
||||||
|
end
|
3
benchmarks/benchmarks/string.fish
Normal file
3
benchmarks/benchmarks/string.fish
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
for i in (seq 100000)
|
||||||
|
string match -r '^.*$' fooooooo
|
||||||
|
end | string match -re o
|
Loading…
Reference in a new issue