mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-29 13:47:25 +00:00
Add --header to benchmark overhead + storage (#12204)
* Add header to 'overhead' command Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add header to 'storage' command Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update READMEs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Bastian Köcher <info@kchr.de> * .as_ref() and fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
committed by
GitHub
parent
99d8111c67
commit
09ec484139
@@ -79,6 +79,12 @@ pub struct StorageParams {
|
||||
#[clap(long)]
|
||||
pub template_path: Option<PathBuf>,
|
||||
|
||||
/// Add a header to the generated weight output file.
|
||||
///
|
||||
/// Good for adding LICENSE headers.
|
||||
#[clap(long, value_name = "PATH")]
|
||||
pub header: Option<PathBuf>,
|
||||
|
||||
/// Path to write the raw 'read' results in JSON format to. Can be a file or directory.
|
||||
#[clap(long)]
|
||||
pub json_read_path: Option<PathBuf>,
|
||||
@@ -122,7 +128,7 @@ impl StorageCmd {
|
||||
Block: BlockT<Hash = DbHash>,
|
||||
C: UsageProvider<Block> + StorageProvider<Block, BA> + HeaderBackend<Block>,
|
||||
{
|
||||
let mut template = TemplateData::new(&cfg, &self.params);
|
||||
let mut template = TemplateData::new(&cfg, &self.params)?;
|
||||
|
||||
let block_id = BlockId::<Block>::Number(client.usage_info().chain.best_number);
|
||||
template.set_block_number(block_id.to_string());
|
||||
|
||||
Reference in New Issue
Block a user