Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mathis Rosenhauer
libaec
Commits
e3d026ae
Commit
e3d026ae
authored
Oct 13, 2017
by
Mathis Rosenhauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
benchmarking: use awk instead of bc
parent
0d0684ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/bdec.sh
src/bdec.sh
+1
-1
src/benc.sh
src/benc.sh
+2
-1
No files found.
src/bdec.sh
View file @
e3d026ae
...
...
@@ -7,7 +7,7 @@ fi
rm
-f
dec.dat
bsize
=
$(
wc
-c
bench.dat |
awk
'{print $1}'
)
utime
=
$(
./utime ./aec
-d
-n16
-j64
-r256
-m
bench.rz dec.dat 2>&1
)
perf
=
$(
echo
"
$
bsize
/1048576/
$utime
"
| bc
)
perf
=
$(
awk
"BEGIN {print
${
bsize
}
/1048576/
$
{
utime
}
}"
)
echo
"[0;32m*** Decoding with
$perf
MiB/s user time ***[0m"
cmp bench.dat dec.dat
rm
-f
dec.dat
src/benc.sh
View file @
e3d026ae
...
...
@@ -13,6 +13,7 @@ if [ ! -f bench.dat ]; then
fi
rm
-f
bench.rz
utime
=
$(
./utime
$AEC
-n16
-j64
-r256
-m
bench.dat bench.rz 2>&1
)
echo
$utime
bsize
=
$(
wc
-c
bench.dat |
awk
'{print $1}'
)
perf
=
$(
echo
"
$
bsize
/1048576/
$utime
"
| bc
)
perf
=
$(
awk
"BEGIN {print
${
bsize
}
/1048576/
$
{
utime
}
}"
)
echo
"[0;32m*** Encoding with
$perf
MiB/s user time ***[0m"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment