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:
Oliver Tale-Yazdi
2022-09-07 23:16:54 +02:00
committed by GitHub
parent 99d8111c67
commit 09ec484139
9 changed files with 41 additions and 39 deletions
@@ -28,7 +28,7 @@ use sp_runtime::{traits::Block as BlockT, DigestItem, OpaqueExtrinsic};
use clap::{Args, Parser};
use log::info;
use serde::Serialize;
use std::{fmt::Debug, sync::Arc};
use std::{fmt::Debug, path::PathBuf, sync::Arc};
use crate::{
extrinsic::{
@@ -69,6 +69,12 @@ pub struct OverheadParams {
#[allow(missing_docs)]
#[clap(flatten)]
pub hostinfo: HostInfoParams,
/// Add a header to the generated weight output file.
///
/// Good for adding LICENSE headers.
#[clap(long, value_name = "PATH")]
pub header: Option<PathBuf>,
}
/// Type of a benchmark.