parity: improve cli help and logging (#8665)
* parity: indicate disabling ancient blocks is not recommended * parity: display decimals for stats in informant
This commit is contained in:
parent
52f10242e2
commit
3c2f13f88b
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
@ -424,7 +424,7 @@ usage! {
|
|||||||
|
|
||||||
FLAG flag_no_ancient_blocks: (bool) = false, or |_| None,
|
FLAG flag_no_ancient_blocks: (bool) = false, or |_| None,
|
||||||
"--no-ancient-blocks",
|
"--no-ancient-blocks",
|
||||||
"Disable downloading old blocks after snapshot restoration or warp sync.",
|
"Disable downloading old blocks after snapshot restoration or warp sync. Not recommended.",
|
||||||
|
|
||||||
FLAG flag_no_serve_light: (bool) = false, or |c: &Config| c.network.as_ref()?.no_serve_light.clone(),
|
FLAG flag_no_serve_light: (bool) = false, or |c: &Config| c.network.as_ref()?.no_serve_light.clone(),
|
||||||
"--no-serve-light",
|
"--no-serve-light",
|
||||||
@ -894,7 +894,7 @@ usage! {
|
|||||||
["Legacy options"]
|
["Legacy options"]
|
||||||
FLAG flag_warp: (bool) = false, or |_| None,
|
FLAG flag_warp: (bool) = false, or |_| None,
|
||||||
"--warp",
|
"--warp",
|
||||||
"Does nothing; warp sync is enabled by default.",
|
"Does nothing; warp sync is enabled by default. Use --no-warp to disable.",
|
||||||
|
|
||||||
FLAG flag_dapps_apis_all: (bool) = false, or |_| None,
|
FLAG flag_dapps_apis_all: (bool) = false, or |_| None,
|
||||||
"--dapps-apis-all",
|
"--dapps-apis-all",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2015-2017 Parity Technologies (UK) Ltd.
|
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Parity.
|
// This file is part of Parity.
|
||||||
|
|
||||||
// Parity is free software: you can redistribute it and/or modify
|
// Parity is free software: you can redistribute it and/or modify
|
||||||
@ -303,13 +303,13 @@ impl<T: InformantData> Informant<T> {
|
|||||||
paint(White.bold(), format!("{}", chain_info.best_block_hash)),
|
paint(White.bold(), format!("{}", chain_info.best_block_hash)),
|
||||||
if self.target.executes_transactions() {
|
if self.target.executes_transactions() {
|
||||||
format!("{} blk/s {} tx/s {} Mgas/s",
|
format!("{} blk/s {} tx/s {} Mgas/s",
|
||||||
paint(Yellow.bold(), format!("{:4}", (client_report.blocks_imported * 1000) as u64 / elapsed.as_milliseconds())),
|
paint(Yellow.bold(), format!("{:5.2}", (client_report.blocks_imported * 1000) as f64 / elapsed.as_milliseconds() as f64)),
|
||||||
paint(Yellow.bold(), format!("{:4}", (client_report.transactions_applied * 1000) as u64 / elapsed.as_milliseconds())),
|
paint(Yellow.bold(), format!("{:6.1}", (client_report.transactions_applied * 1000) as f64 / elapsed.as_milliseconds() as f64)),
|
||||||
paint(Yellow.bold(), format!("{:3}", (client_report.gas_processed / From::from(elapsed.as_milliseconds() * 1000)).low_u64()))
|
paint(Yellow.bold(), format!("{:4}", (client_report.gas_processed / From::from(elapsed.as_milliseconds() * 1000)).low_u64()))
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
format!("{} hdr/s",
|
format!("{} hdr/s",
|
||||||
paint(Yellow.bold(), format!("{:4}", (client_report.blocks_imported * 1000) as u64 / elapsed.as_milliseconds()))
|
paint(Yellow.bold(), format!("{:6.1}", (client_report.blocks_imported * 1000) as f64 / elapsed.as_milliseconds() as f64))
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
paint(Green.bold(), format!("{:5}", queue_info.unverified_queue_size)),
|
paint(Green.bold(), format!("{:5}", queue_info.unverified_queue_size)),
|
||||||
@ -350,8 +350,8 @@ impl<T: InformantData> Informant<T> {
|
|||||||
Some(ref rpc_stats) => format!(
|
Some(ref rpc_stats) => format!(
|
||||||
"RPC: {} conn, {} req/s, {} µs",
|
"RPC: {} conn, {} req/s, {} µs",
|
||||||
paint(Blue.bold(), format!("{:2}", rpc_stats.sessions())),
|
paint(Blue.bold(), format!("{:2}", rpc_stats.sessions())),
|
||||||
paint(Blue.bold(), format!("{:2}", rpc_stats.requests_rate())),
|
paint(Blue.bold(), format!("{:4}", rpc_stats.requests_rate())),
|
||||||
paint(Blue.bold(), format!("{:3}", rpc_stats.approximated_roundtrip())),
|
paint(Blue.bold(), format!("{:4}", rpc_stats.approximated_roundtrip())),
|
||||||
),
|
),
|
||||||
_ => String::new(),
|
_ => String::new(),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user