mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Rewrap all comments to 100 line width (#9490)
* reformat everything again * manual formatting * last manual fix * Fix build
This commit is contained in:
@@ -74,8 +74,8 @@ impl TryFrom<Option<String>> for AnalysisChoice {
|
||||
}
|
||||
|
||||
impl Analysis {
|
||||
// Useful for when there are no components, and we just need an median value of the benchmark results.
|
||||
// Note: We choose the median value because it is more robust to outliers.
|
||||
// Useful for when there are no components, and we just need an median value of the benchmark
|
||||
// results. Note: We choose the median value because it is more robust to outliers.
|
||||
fn median_value(r: &Vec<BenchmarkResults>, selector: BenchmarkSelector) -> Option<Self> {
|
||||
if r.is_empty() {
|
||||
return None
|
||||
|
||||
@@ -675,7 +675,7 @@ macro_rules! benchmark_backend {
|
||||
// Every variant must implement [`BenchmarkingSetup`].
|
||||
//
|
||||
// ```nocompile
|
||||
//
|
||||
//
|
||||
// struct Transfer;
|
||||
// impl BenchmarkingSetup for Transfer { ... }
|
||||
//
|
||||
@@ -1032,11 +1032,12 @@ macro_rules! impl_benchmark_test {
|
||||
/// );
|
||||
/// ```
|
||||
///
|
||||
/// There is an optional fourth argument, with keyword syntax: `benchmarks_path = path_to_benchmarks_invocation`.
|
||||
/// In the typical case in which this macro is in the same module as the `benchmarks!` invocation,
|
||||
/// you don't need to supply this. However, if the `impl_benchmark_test_suite!` invocation is in a
|
||||
/// different module than the `benchmarks!` invocation, then you should provide the path to the
|
||||
/// module containing the `benchmarks!` invocation:
|
||||
/// There is an optional fourth argument, with keyword syntax: `benchmarks_path =
|
||||
/// path_to_benchmarks_invocation`. In the typical case in which this macro is in the same module as
|
||||
/// the `benchmarks!` invocation, you don't need to supply this. However, if the
|
||||
/// `impl_benchmark_test_suite!` invocation is in a different module than the `benchmarks!`
|
||||
/// invocation, then you should provide the path to the module containing the `benchmarks!`
|
||||
/// invocation:
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// mod benches {
|
||||
@@ -1065,7 +1066,8 @@ macro_rules! impl_benchmark_test {
|
||||
/// to these restrictions:
|
||||
///
|
||||
/// - It must be the name of a method applied to the output of the `new_test_ext` argument.
|
||||
/// - That method must have a signature capable of receiving a single argument of the form `impl FnOnce()`.
|
||||
/// - That method must have a signature capable of receiving a single argument of the form `impl
|
||||
/// FnOnce()`.
|
||||
// ## Notes (not for rustdoc)
|
||||
//
|
||||
// The biggest challenge for this macro is communicating the actual test functions to be run. We
|
||||
@@ -1258,8 +1260,8 @@ pub fn show_benchmark_debug_info(
|
||||
/// ```
|
||||
///
|
||||
/// The `whitelist` is a parameter you pass to control the DB read/write tracking.
|
||||
/// We use a vector of [TrackedStorageKey](./struct.TrackedStorageKey.html), which is a simple struct used to set
|
||||
/// if a key has been read or written to.
|
||||
/// We use a vector of [TrackedStorageKey](./struct.TrackedStorageKey.html), which is a simple
|
||||
/// struct used to set if a key has been read or written to.
|
||||
///
|
||||
/// For values that should be skipped entirely, we can just pass `key.into()`. For example:
|
||||
///
|
||||
|
||||
@@ -202,7 +202,8 @@ pub trait Benchmarking {
|
||||
fn add_to_whitelist(&mut self, add: TrackedStorageKey) {
|
||||
let mut whitelist = self.get_whitelist();
|
||||
match whitelist.iter_mut().find(|x| x.key == add.key) {
|
||||
// If we already have this key in the whitelist, update to be the most constrained value.
|
||||
// If we already have this key in the whitelist, update to be the most constrained
|
||||
// value.
|
||||
Some(item) => {
|
||||
item.reads += add.reads;
|
||||
item.writes += add.writes;
|
||||
@@ -239,8 +240,8 @@ pub trait Benchmarking<T> {
|
||||
/// extrinsic, so these are sometimes just called "extrinsics".
|
||||
///
|
||||
/// Parameters
|
||||
/// - `extra`: Also return benchmarks marked "extra" which would otherwise not be
|
||||
/// needed for weight calculation.
|
||||
/// - `extra`: Also return benchmarks marked "extra" which would otherwise not be needed for
|
||||
/// weight calculation.
|
||||
fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>;
|
||||
|
||||
/// Run the benchmarks for this pallet.
|
||||
|
||||
Reference in New Issue
Block a user