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

Make wasmi CLI print exported functions if func_name arg is missing #579

Merged
merged 2 commits into from Nov 27, 2022

Conversation

Robbepop
Copy link
Collaborator

@Robbepop Robbepop commented Nov 27, 2022

Before this change users had to provide a non-existing func name in order for the wasmi CLI to print out all exported function names such as wasmi_cli fibonacci.wat foo.

> wasmi_cli fibonacci.wat
Error: missing function name argument for fibonacci.wat

The Wasm module exports the following functions:

 - fn fib_recursive(i64) -> i64
 - fn fib_iterative(i64) -> i64

@Robbepop Robbepop changed the title Make wasmi CLI print exported functions if func_name arg is missing Make wasmi CLI print exported functions if func_name arg is missing Nov 27, 2022
@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Nov 27, 2022

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.01ms 1.01ms 🟢 0.13% 980.81µs 936.30µs 🟢 -4.40% 🟢 -7%
execute/
bare_call_0/typed
526.92µs 520.58µs 🟢 -1.46% 448.84µs 452.45µs ⚪ 0.92% 🟢 -13%
execute/
bare_call_1
1.09ms 1.08ms 🟢 -0.12% 1.21ms 1.17ms 🔴 -2.56% 🟢 8%
execute/
bare_call_16
2.23ms 2.19ms ⚪ -1.62% 4.60ms 4.77ms 🔴 3.88% 🔴 118%
execute/
bare_call_16/typed
1.32ms 1.30ms ⚪ -0.92% 2.25ms 2.28ms 🔴 1.56% 🟡 75%
execute/
bare_call_1/typed
645.97µs 603.81µs 🟢 -6.15% 750.94µs 745.91µs ⚪ -0.73% 🟢 24%
execute/
bare_call_4
1.21ms 1.19ms 🔴 -2.44% 1.94ms 1.92ms ⚪ -1.11% 🟡 61%
execute/
bare_call_4/typed
623.91µs 642.18µs 🔴 3.23% 896.78µs 892.64µs ⚪ -0.43% 🟢 39%
execute/
br_table
629.88µs 627.25µs ⚪ -1.31% 978.50µs 978.44µs ⚪ -0.02% 🟡 56%
execute/
count_until
682.33µs 682.00µs ⚪ -0.30% 2.21ms 2.19ms ⚪ -0.82% 🔴 221%
execute/
factorial_iterative
305.47µs 303.74µs ⚪ -0.69% 868.16µs 864.91µs ⚪ -0.27% 🔴 185%
execute/
factorial_recursive
624.20µs 610.29µs 🟢 -2.10% 1.33ms 1.30ms 🟢 -2.24% 🔴 113%
execute/
fib_iterative
1.43ms 1.43ms ⚪ -0.09% 4.73ms 4.62ms 🟢 -2.45% 🔴 223%
execute/
fib_recursive
6.14ms 5.76ms 🟢 -5.85% 12.10ms 12.00ms ⚪ -0.76% 🔴 108%
execute/
global_bump
978.63µs 977.78µs ⚪ -0.02% 3.13ms 3.15ms ⚪ 0.75% 🔴 223%
execute/
global_const
717.60µs 717.55µs ⚪ 0.00% 2.57ms 2.61ms 🔴 1.70% 🔴 263%
execute/
host_calls
28.88µs 28.68µs ⚪ -0.79% 42.63µs 42.38µs ⚪ -0.44% 🟢 48%
execute/
memory_fill
1.28ms 1.28ms ⚪ 0.02% 4.19ms 4.19ms ⚪ 0.10% 🔴 227%
execute/
memory_sum
1.27ms 1.27ms ⚪ 0.01% 4.24ms 4.24ms ⚪ 0.05% 🔴 234%
execute/
memory_vec_add
2.64ms 2.71ms ⚪ 1.81% 8.54ms 8.50ms ⚪ -0.39% 🔴 213%
execute/
recursive_is_even
1.13ms 1.11ms ⚪ -1.64% 2.11ms 2.10ms ⚪ -0.62% 🟡 89%
execute/
recursive_ok
143.24µs 144.52µs ⚪ 1.02% 297.94µs 297.58µs ⚪ -0.22% 🔴 106%
execute/
recursive_scan
187.61µs 178.68µs 🟢 -4.72% 386.85µs 393.53µs 🔴 1.94% 🔴 120%
execute/
recursive_trap
14.11µs 14.33µs 🔴 1.65% 30.59µs 30.15µs ⚪ -1.86% 🔴 110%
execute/
regex_redux
544.16µs 541.35µs ⚪ -0.48% 1.53ms 1.51ms 🟢 -1.25% 🔴 179%
execute/
rev_complement
498.08µs 497.63µs ⚪ 0.12% 1.52ms 1.52ms ⚪ 0.35% 🔴 206%
execute/
tiny_keccak
377.91µs 375.10µs ⚪ -1.01% 1.22ms 1.21ms ⚪ -0.58% 🔴 222%
execute/
trunc_f2i
919.56µs 911.78µs ⚪ -0.85% 2.51ms 2.51ms ⚪ -0.38% 🔴 175%
instantiate/
wasm_kernel
58.48µs 59.74µs ⚪ 2.28% 95.41µs 72.88µs 🟢 -23.75% 🟢 22%
translate/
erc1155
202.64µs 205.10µs ⚪ 1.15% 407.35µs 401.14µs 🟢 -1.47% 🟡 96%
translate/
erc20
99.99µs 99.66µs ⚪ -0.62% 199.59µs 198.04µs ⚪ -0.84% 🟡 99%
translate/
erc721
145.23µs 143.58µs ⚪ -3.35% 289.49µs 285.24µs 🟢 -1.56% 🟡 99%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -0.06% 0.00ns 0.00ns 🟢 -1.47% 🟢 0%
translate/
wasm_kernel
3.80ms 3.78ms ⚪ -0.57% 7.71ms 7.58ms 🟢 -1.84% 🟡 100%

Link to pipeline

@codecov-commenter
Copy link

Codecov Report

Merging #579 (9853818) into master (d799789) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #579      +/-   ##
==========================================
- Coverage   80.07%   79.96%   -0.12%     
==========================================
  Files          78       78              
  Lines        6320     6329       +9     
==========================================
  Hits         5061     5061              
- Misses       1259     1268       +9     
Impacted Files Coverage Δ
crates/cli/src/main.rs 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

The wasmi CLI is not meant to be usable within Wasm.
@Robbepop Robbepop merged commit 986fb4b into master Nov 27, 2022
@Robbepop Robbepop deleted the rf-improve-cli branch November 27, 2022 09:54
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.

None yet

3 participants