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

feat: pallet benchmarking interactive UI #420

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
051d5ed
feat: add bench subcommand
chungquantin Feb 10, 2025
23ba99f
Merge branch 'r0gue-io:main' into chungquantin/feat-pop_bench
chungquantin Feb 10, 2025
5987931
feat: integrates frame-benchmarking-cli
chungquantin Feb 10, 2025
0d5f5ef
refactor: PalletCmd run with spec
chungquantin Feb 10, 2025
f6a8f06
feat: set RUST_LOG=info for benchmarking display
chungquantin Feb 10, 2025
a3139e4
feat: add CLI messages and tests
chungquantin Feb 10, 2025
45c6ade
feat: add benchmark runtime wasm test
chungquantin Feb 11, 2025
53258ac
chore: fix comment
chungquantin Feb 11, 2025
8f82fde
fix: operator cannot be applied to type
chungquantin Feb 11, 2025
fa2db46
chore: display error and refactor test file
chungquantin Feb 12, 2025
907696a
feat: auto detect wasm blob and build runtime
chungquantin Feb 12, 2025
7011eab
feat: build runtime wasm blob
chungquantin Feb 13, 2025
28c637a
refactor: build binary path method
chungquantin Feb 13, 2025
dc63358
fix: runtime path test
chungquantin Feb 13, 2025
6f17808
refactor: feature gating for benchmarking feature
chungquantin Feb 13, 2025
557cdaa
chore: remove unused argument
chungquantin Feb 13, 2025
2306420
fix: comment
chungquantin Feb 13, 2025
667e997
chore: rename `bench` file
chungquantin Feb 13, 2025
646d6f5
chore: rename `bench` file
chungquantin Feb 13, 2025
5863fd3
feat: auto detect wasm blob and build runtime
chungquantin Feb 12, 2025
b09800e
feat: build runtime wasm blob
chungquantin Feb 13, 2025
299b60e
refactor: build binary path method
chungquantin Feb 13, 2025
f879739
feat: list and select runtimes
chungquantin Feb 17, 2025
5c9c4b4
chore: remove unused code
chungquantin Feb 17, 2025
c343380
feat: auto detect wasm blob and build runtime
chungquantin Feb 12, 2025
81d93e2
feat: build runtime wasm blob
chungquantin Feb 13, 2025
aa4cbb5
refactor: build binary path method
chungquantin Feb 13, 2025
1b5dae9
chore: removed duplicate code
chungquantin Feb 17, 2025
42d134a
chore: remove spinner
chungquantin Feb 17, 2025
bdcfd06
Merge branch 'chungquantin/feat-pop_bench' into chugnquantin/feat-bui…
chungquantin Feb 17, 2025
3463d88
chore: clippy warning
chungquantin Feb 17, 2025
899f8b5
Merge branch 'chungquantin/feat-pop_bench' into chugnquantin/feat-bui…
chungquantin Feb 17, 2025
234daf3
chore: clippy warning
chungquantin Feb 17, 2025
293922d
Merge remote-tracking branch 'upstream' into chungquantin/feat-pop_bench
chungquantin Feb 17, 2025
5856e58
Merge branch 'chungquantin/feat-pop_bench' into chugnquantin/feat-bui…
chungquantin Feb 17, 2025
0b724b1
refactor: parachain feature in bench command
chungquantin Feb 17, 2025
f48eede
Merge branch 'chungquantin/feat-pop_bench' into chugnquantin/feat-bui…
chungquantin Feb 17, 2025
2f195cc
chore: reorder imports
chungquantin Feb 17, 2025
d051d35
feat: add bench subcommand
chungquantin Feb 10, 2025
0cb63a0
feat: integrates frame-benchmarking-cli
chungquantin Feb 10, 2025
9798c5d
refactor: PalletCmd run with spec
chungquantin Feb 10, 2025
9719f05
feat: set RUST_LOG=info for benchmarking display
chungquantin Feb 10, 2025
9b94bbf
feat: add CLI messages and tests
chungquantin Feb 10, 2025
5bd6946
feat: add benchmark runtime wasm test
chungquantin Feb 11, 2025
949f972
chore: fix comment
chungquantin Feb 11, 2025
7dbe642
fix: operator cannot be applied to type
chungquantin Feb 11, 2025
1285436
chore: display error and refactor test file
chungquantin Feb 12, 2025
52760a4
chore: rename `bench` file
chungquantin Feb 13, 2025
d6a4c19
chore: clippy warning
chungquantin Feb 17, 2025
2d618e6
refactor: parachain feature in bench command
chungquantin Feb 17, 2025
760e8df
feat: add bench subcommand
chungquantin Feb 10, 2025
89eb0a5
feat: integrates frame-benchmarking-cli
chungquantin Feb 10, 2025
0aa7bcb
refactor: PalletCmd run with spec
chungquantin Feb 10, 2025
a24205a
feat: add CLI messages and tests
chungquantin Feb 10, 2025
33d6544
feat: add benchmark runtime wasm test
chungquantin Feb 11, 2025
001afac
chore: fix comment
chungquantin Feb 11, 2025
4d53b7c
fix: operator cannot be applied to type
chungquantin Feb 11, 2025
1fe3728
chore: display error and refactor test file
chungquantin Feb 12, 2025
c1f84a4
chore: rename `bench` file
chungquantin Feb 13, 2025
8a2a0d8
chore: clippy warning
chungquantin Feb 17, 2025
3ca377a
refactor: parachain feature in bench command
chungquantin Feb 17, 2025
5a33cb5
chore: revert mod.rs
chungquantin Feb 17, 2025
89cacb1
Merge branch 'chungquantin/feat-pop_bench' into chugnquantin/feat-bui…
chungquantin Feb 17, 2025
6ecad59
feat: select genesis builder
chungquantin Feb 18, 2025
f5a5be2
refactor: test helpers
chungquantin Feb 18, 2025
346576f
chore: remove output display
chungquantin Feb 18, 2025
20e85e4
chore: update parse genesis builder comment
chungquantin Feb 18, 2025
7804787
feat: list benchmark pallets & extrinsics
chungquantin Feb 17, 2025
015d32a
feat: list pallets and extrinsics
chungquantin Feb 17, 2025
1b850a5
feat: refactor pallet mod and add parameter menu
chungquantin Feb 18, 2025
ad01e52
fix: locate runtime and help command
chungquantin Feb 18, 2025
d27b9de
chore: clippy warning
chungquantin Feb 18, 2025
2b42f3a
chore: display error message on binary check
chungquantin Feb 18, 2025
9652926
fix: comment
chungquantin Feb 19, 2025
70c33e9
Merge branch 'chugnquantin/feat-build_runtime' into chungquantin/refa…
chungquantin Feb 19, 2025
a56c6aa
refactor: separate pallet logic from entry file
chungquantin Feb 19, 2025
f50d0b0
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 19, 2025
0b1aac1
chore: add and hide global genesis_builder
chungquantin Feb 19, 2025
7d51a6f
fix: clippy warnings and benchmark tests
chungquantin Feb 19, 2025
7f1e148
refactor: flatten PalletCmd to add extra arguments
chungquantin Feb 19, 2025
e9cf4b6
feat: select and update parameter menu
chungquantin Feb 19, 2025
713ace9
feat: add genesis preset check (#422)
chungquantin Feb 19, 2025
e256e47
refactor: get_runtime_path
chungquantin Feb 19, 2025
356a664
chore: rebase
chungquantin Feb 20, 2025
db1957b
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 20, 2025
48d086c
chore: rebase
chungquantin Feb 20, 2025
7df1b5f
refactor: code order
chungquantin Feb 20, 2025
22695e7
chore: rebase
chungquantin Feb 20, 2025
1a3d9c8
chore: reformat
chungquantin Feb 20, 2025
b8bc2ff
chore: reformat
chungquantin Feb 20, 2025
b11b2de
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 20, 2025
97f8e04
chore: reformat
chungquantin Feb 20, 2025
6581902
refactor: test files
chungquantin Feb 20, 2025
b7bdbc7
chore: rebase
chungquantin Feb 20, 2025
ec54645
chore: reformat
chungquantin Feb 20, 2025
91a23fb
chore: reformat
chungquantin Feb 20, 2025
be7a6db
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 20, 2025
047bb6a
chore: clippy warning
chungquantin Feb 20, 2025
31adc67
chore: rebase
chungquantin Feb 20, 2025
4a47599
chore: reformat
chungquantin Feb 20, 2025
cbfed52
chore: reformat
chungquantin Feb 20, 2025
c07bc68
chore: rebase
chungquantin Feb 20, 2025
6134e53
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 20, 2025
a5b95a3
chore: clippy warning
chungquantin Feb 20, 2025
a0fcc5c
feat: enter runtime path manually
chungquantin Feb 20, 2025
796e3d6
refactor: list presets instead of manual input
chungquantin Feb 21, 2025
13be09e
feat: default to `none` if no presets found
chungquantin Feb 21, 2025
7aa9f63
refactor: build project test instead of runtime
chungquantin Feb 24, 2025
31e1fb8
chore: rebase
chungquantin Feb 20, 2025
33e766f
chore: reformat
chungquantin Feb 20, 2025
a1fdbb5
chore: reformat
chungquantin Feb 20, 2025
80d7460
chore: rebase
chungquantin Feb 24, 2025
f58b7e0
Merge branch 'chungquantin/refactor-build_runtime' into chungquantin/…
chungquantin Feb 24, 2025
1673095
fix: rebase
chungquantin Feb 24, 2025
0d9df52
feat: `pop bench pallet` logic implementation (#407)
chungquantin Feb 24, 2025
7c1433f
feat: update menu to confirm the boolean option
chungquantin Feb 24, 2025
0cc4dd3
refactor: separate pallet logic from entry file (#421)
chungquantin Feb 24, 2025
8e126ac
Merge branch 'chungquantin/feat-pop_bench_command' into chungquantin/…
chungquantin Feb 24, 2025
8d1d990
Merge branch 'chungquantin/feat-pop_bench_command' into chungquantin/…
chungquantin Feb 24, 2025
0290245
feat: add print command method
chungquantin Feb 24, 2025
29cef0a
feat: add excluded pallets and print command
chungquantin Feb 24, 2025
57da1f3
refactor: move methods to pop-parachains
chungquantin Feb 25, 2025
3f75b1e
refactor: get runtime arguments & genesis disabled
chungquantin Feb 25, 2025
f4f9ff8
chore: fix tests and new tests for runtime input
chungquantin Feb 25, 2025
a28af80
chore: add tests for search pallets & extrinsics
chungquantin Feb 25, 2025
ecd2b43
chore: add tests for select pallet & extrinsics
chungquantin Feb 25, 2025
e8eea1f
chore: remove fuzzy search crate and fix stdout err
chungquantin Feb 25, 2025
5d4938d
chore: remove guard drop
chungquantin Feb 25, 2025
6dd0926
chore: clippy warnings
chungquantin Feb 25, 2025
faf3ce5
fix: stdio override
chungquantin Feb 26, 2025
f2ee2f2
refactor: load pallets from subwasm
chungquantin Feb 26, 2025
7cd681f
chore: revert changes made to load pallets
chungquantin Feb 26, 2025
04e1e47
chore: remove stdio-overide crate and add alternatives
chungquantin Feb 26, 2025
36cc56b
chore: add print to debug CI
chungquantin Feb 26, 2025
49fd484
feat: add code to source omni bencher (#428)
chungquantin Feb 27, 2025
99c905e
chore: remove println!
chungquantin Feb 27, 2025
1c69741
chore: fix tests
chungquantin Feb 27, 2025
6b088f3
refactor: PalletCmd to BenchmarkPallet
chungquantin Feb 27, 2025
6d08056
feat: select single pallet
chungquantin Feb 27, 2025
19f1814
chore: test ensure pallet registry
chungquantin Feb 28, 2025
4c6e3a2
feat: add output file
chungquantin Feb 28, 2025
298e12b
chore: resolve clippy warnings
chungquantin Feb 28, 2025
6f95508
refactor: shared methods with other commands
chungquantin Mar 3, 2025
9bcda1e
chore: clippy warning of direct ToString impl
chungquantin Mar 4, 2025
b5747fb
chore: add public module document
chungquantin Mar 4, 2025
f4b8c77
chore: clippy warning of `current_preset`
chungquantin Mar 4, 2025
d8b53d4
chore: set `RUST_LOG` to original value
chungquantin Mar 4, 2025
36130e7
refactor: display with `--skip` argument
chungquantin Mar 4, 2025
112f982
chore: remove `which` crate and implement with cmd
chungquantin Mar 4, 2025
32bc553
fix: test of display()
chungquantin Mar 4, 2025
c79db16
refactor: get_mock_runtime
chungquantin Mar 4, 2025
3e14cc0
chore: test for inputting output file
chungquantin Mar 4, 2025
6681706
chore: test for list, fix binary run
chungquantin Mar 4, 2025
953690c
feat: `pop bench pallet` logic implementation (#407)
chungquantin Feb 24, 2025
3fa974c
refactor: separate pallet logic from entry file (#421)
chungquantin Feb 24, 2025
fdb3c71
chore: update cargo.lock
chungquantin Mar 5, 2025
07a2677
feat: add the filter mode to cli
chungquantin Mar 4, 2025
efe52b1
chore: rebase
chungquantin Mar 5, 2025
22a859f
chore: revert cargo.lock and add more ignore
chungquantin Mar 4, 2025
6cbb384
chore: update cargo-deny-action@v2
chungquantin Mar 4, 2025
a3dde29
chore: revert relay.rs changes
chungquantin Mar 4, 2025
e6ae10b
chore: remove vulnerabilities by upgrade zombienet
chungquantin Mar 4, 2025
7fe9bb7
chore: rebase
chungquantin Mar 5, 2025
70d7c46
chore: clippy warning
chungquantin Mar 5, 2025
c803631
chore: revert not relevant changes
chungquantin Mar 5, 2025
c4c98e6
chore: rebase to add filter mode
chungquantin Mar 5, 2025
af80f6b
chore: update cargo-deny-action@v2 (#439)
chungquantin Mar 4, 2025
759ad6c
feat: `pop bench pallet` logic implementation (#407)
chungquantin Feb 24, 2025
aedf8bc
chore: rebase
chungquantin Mar 5, 2025
16525fb
chore: rebase
chungquantin Mar 5, 2025
7385186
chore: revert cargo.lock and add more ignore
chungquantin Mar 4, 2025
ecc9849
chore: update cargo-deny-action@v2
chungquantin Mar 4, 2025
93bb2fd
chore: revert relay.rs changes
chungquantin Mar 4, 2025
6961279
chore: remove vulnerabilities by upgrade zombienet
chungquantin Mar 4, 2025
0621a08
chore: rebase
chungquantin Mar 5, 2025
fef73a2
chore: revert not relevant changes
chungquantin Mar 5, 2025
3acdb69
Merge branch 'chungquantin/feat-pop_bench_command' into chungquantin/…
chungquantin Mar 5, 2025
f9dbc20
fix: expect_select missing filter_mode
chungquantin Mar 5, 2025
97af117
refactor: fuzzy search pallets and extrinsics with `filter_mode` (#442)
chungquantin Mar 5, 2025
4d96402
Merge branch 'chungquantin/feat-pop_bench_command' into chungquantin/…
chungquantin Mar 5, 2025
7641a8a
chore: test for `get_relative_or_absolute_path`
chungquantin Mar 5, 2025
5181c5a
refactor: remove methods only used once
chungquantin Mar 5, 2025
e9553d7
refactor: get arguments `ok_or_else`
chungquantin Mar 6, 2025
89791b8
refactor: `TryFrom<String>` for genesis builder
chungquantin Mar 6, 2025
40a80c6
chore: comments
chungquantin Mar 6, 2025
ff2f39d
chore: return error if is not provided
chungquantin Mar 6, 2025
9030238
fix: unit tests adapt to new changes
chungquantin Mar 6, 2025
8e3fee3
chore: ensure runtime binary exists test
chungquantin Mar 6, 2025
0a40834
chore: clippy warning
chungquantin Mar 7, 2025
3061efd
chore: apply suggestions & test for menu
chungquantin Mar 10, 2025
d08a749
chore: remove weights.rs
chungquantin Mar 10, 2025
9275cf0
chore: fix test to log single line command
chungquantin Mar 10, 2025
96e872a
Merge branch 'chungquantin/feat-pop_bench_command' into chungquantin/…
chungquantin Mar 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions crates/pop-cli/src/commands/bench/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{
common::prompt::display_message,
};
use clap::{Args, Subcommand};
use frame_benchmarking_cli::PalletCmd;
use pallet::BenchmarkPallet;

mod pallet;
Expand All @@ -23,15 +22,15 @@ pub struct BenchmarkArgs {
pub enum Command {
/// Benchmark the extrinsic weight of FRAME Pallets
#[clap(alias = "p")]
Pallet(PalletCmd),
Pallet(BenchmarkPallet),
}

impl Command {
/// Executes the command.
pub(crate) fn execute(args: BenchmarkArgs) -> anyhow::Result<()> {
pub(crate) async fn execute(args: BenchmarkArgs) -> anyhow::Result<()> {
let mut cli = cli::Cli;
match args.command {
Command::Pallet(mut cmd) => BenchmarkPallet.execute(&mut cmd, &mut cli),
Command::Pallet(mut cmd) => cmd.execute(&mut cli).await,
}
}
}
Loading
Loading