Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wasm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
wasm-watermarker
Commits
47e1218f
Verified
Commit
47e1218f
authored
Jan 24, 2021
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add speed benchmark script for method-4
parent
5f150247
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
bench-speed4.zsh
scripts/bench-speed4.zsh
+61
-0
No files found.
scripts/bench-speed4.zsh
0 → 100755
View file @
47e1218f
#!/usr/bin/env zsh
zmodload zsh/datetime
# enable EPOCHREALTIME
method4
()
{
local
proj
=
"
$1
"
local
wasm
=
"
$2
"
local
size_bits
=
"
$3
"
local
size
=
"
$((
$size_bits
/
8
))
"
local
out
=
"./out/size-bench/dyn/
$proj
/
$size_bits
/
$(
basename
"
$wasm
"
)
"
mkdir
-p
"
$(
dirname
"
$out
"
)
"
local
watermark
=
"
$(
head
-c
"
$size
"
/dev/random |
base64
|
head
-c
"
$size
"
)
"
# warm up
kyuk
-w
"
$watermark
"
-o
"
$out
"
"
$wasm
"
kyuk
-w
"
$watermark
"
-o
"
$out
"
"
$wasm
"
kyuk
-w
"
$watermark
"
-o
"
$out
"
"
$wasm
"
local times
=
100
local
start
=
"
$EPOCHREALTIME
"
for
i
in
{
1..
$times
}
;
do
kyuk
-w
"
$watermark
"
-o
"
$out
"
"
$wasm
"
done
local
end
=
"
$EPOCHREALTIME
"
local
duration_ms
=
"
$((
(
$end
-
$start
)
*
1000
/
$times
))
"
echo
"
$proj
\t
$size_bits
\t
$duration_ms
"
}
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
10
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
20
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
50
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
100
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
200
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
500
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
1000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
2000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
5000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
10000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
20000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
50000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
100000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
200000
method4
"jq-web"
"./node_modules/jq-web/jq.wasm.wasm"
500000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
10
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
20
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
50
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
100
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
200
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
500
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
1000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
2000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
5000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
10000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
20000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
50000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
100000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
200000
method4
"vim-wasm"
"./node_modules/vim-wasm/vim.wasm"
500000
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