Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Force bag changes in relevant benchmarks (targets #9507) #9529

Merged
merged 46 commits into from
Aug 28, 2021

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Aug 10, 2021

target branch: zeke-voter-bags-module
target PR: #9507

Update benchmarks to force worst case for on_update, on_remove & on_insert

on_update users:

  • unbond
  • rebond
  • bond_extra

on_remove users (via do_remove_validator):

  • kill_stash
  • chill_stash

on_insert users (via do_add_nominator)

  • nominate

(T::Currency::minimum_balance() * balance_factor).max(BalanceOf::<T>::max_value());
T::Currency::make_free_balance_be(&user, balance);
// ensure T::CurrencyToVote will work correctly.
T::Currency::issue(balance); // TODO I don't get this .. will drop NegativeImbalance which cancels itself out
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does everything work as expected without it?

@emostov
Copy link
Contributor Author

emostov commented Aug 10, 2021

/benchmark runtime pallet pallet_staking

@parity-benchapp
Copy link

parity-benchapp bot commented Aug 10, 2021

Error running benchmark: zeke-bags-list-staking-benchmarks

stdoutFrom https://github.com/paritytech/substrate * branch master -> FETCH_HEAD

@emostov
Copy link
Contributor Author

emostov commented Aug 10, 2021

/benchmark runtime pallet pallet_staking

@parity-benchapp
Copy link

parity-benchapp bot commented Aug 10, 2021

Benchmark Runtime Pallet for branch "zeke-bags-list-staking-benchmarks" with command cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

Results
Pallet: "pallet_staking", Extrinsic: "bond", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    75.09
              µs

Reads = 5
Writes = 4
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    75.09
              µs

Reads = 5
Writes = 4
Pallet: "pallet_staking", Extrinsic: "bond_extra", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    79.19
              µs

Reads = 4
Writes = 2
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    79.19
              µs

Reads = 4
Writes = 2
Pallet: "pallet_staking", Extrinsic: "unbond", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    87.32
              µs

Reads = 8
Writes = 3
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    87.32
              µs

Reads = 8
Writes = 3
Pallet: "pallet_staking", Extrinsic: "withdraw_unbonded_update", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    53.54
    + s    0.054
              µs

Reads = 4 + (0 * s)
Writes = 3 + (0 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0     52.52     0.131    0.2%
    2     52.98     0.157    0.2%
    4     53.04     0.084    0.1%
    6     53.61     0.115    0.2%
    8     53.98     0.438    0.8%
   10     53.74     0.129    0.2%
   12     54.09     0.208    0.3%
   14     54.58     0.393    0.7%
   16     54.73     0.141    0.2%
   18     54.57      0.12    0.2%
   20     54.53     0.086    0.1%
   22      54.9     0.126    0.2%
   24     54.93     0.152    0.2%
   26        55     0.448    0.8%
   28     55.08     0.136    0.2%
   30     55.46     0.327    0.5%
   32     55.42     0.269    0.4%
   34     55.49     0.207    0.3%
   36      55.2     0.171    0.3%
   38     56.13     0.185    0.3%
   40     55.89     0.139    0.2%
   42     56.07     0.115    0.2%
   44        56     0.117    0.2%
   46     57.48     0.323    0.5%
   48     56.36     0.107    0.1%
   50     56.56     0.112    0.1%
   52     56.43     0.107    0.1%
   54      57.6     0.054    0.0%
   56      56.7     0.178    0.3%
   58     56.39     0.255    0.4%
   60     56.86     0.096    0.1%
   62        58     0.501    0.8%
   64     57.15     0.157    0.2%
   66     56.92     0.202    0.3%
   68     56.45     0.189    0.3%
   70      56.9     0.353    0.6%
   72     57.73     0.149    0.2%
   74     57.86     0.158    0.2%
   76     57.52       0.1    0.1%
   78     57.55     0.326    0.5%
   80     58.35     0.174    0.2%
   82     57.91     0.131    0.2%
   84     58.01     0.184    0.3%
   86     58.43     0.144    0.2%
   88     58.04     0.185    0.3%
   90     57.66     0.606    1.0%
   92     58.03     0.179    0.3%
   94      58.3     0.122    0.2%
   96     58.41     0.223    0.3%
   98     58.89      0.14    0.2%
  100     58.53     0.127    0.2%

Quality and confidence:
param     error
s             0

Model:
Time ~=    53.55
    + s    0.054
              µs

Reads = 4 + (0 * s)
Writes = 3 + (0 * s)
Pallet: "pallet_staking", Extrinsic: "withdraw_unbonded_kill", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    88.13
    + s    2.503
              µs

Reads = 8 + (0 * s)
Writes = 6 + (1 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0     81.77     0.191    0.2%
    2     92.62     0.785    0.8%
    4     99.07     0.121    0.1%
    6     104.3     0.274    0.2%
    8     107.1     0.185    0.1%
   10     111.5     0.208    0.1%
   12     117.4     0.158    0.1%
   14     122.8     0.287    0.2%
   16     130.1     0.358    0.2%
   18     132.7     0.314    0.2%
   20     138.1     0.441    0.3%
   22     142.8       0.3    0.2%
   24     149.3     0.739    0.4%
   26     153.9     0.367    0.2%
   28     158.5     0.299    0.1%
   30     164.4     0.495    0.3%
   32     168.1     0.376    0.2%
   34     173.4      0.29    0.1%
   36     178.1     0.286    0.1%
   38     182.7      0.33    0.1%
   40     188.3     0.282    0.1%
   42     194.2     0.223    0.1%
   44     198.9     0.582    0.2%
   46     203.8     0.509    0.2%
   48       209     0.345    0.1%
   50     212.3     0.256    0.1%
   52     217.4     0.313    0.1%
   54     223.6     0.562    0.2%
   56     228.9     0.255    0.1%
   58     233.3     0.436    0.1%
   60     237.3     0.254    0.1%
   62     242.8     0.269    0.1%
   64     247.4     0.621    0.2%
   66       253     0.642    0.2%
   68     262.2     2.782    1.0%
   70     262.6     0.717    0.2%
   72     267.4     0.442    0.1%
   74     273.8     0.278    0.1%
   76     277.8     0.432    0.1%
   78     282.6     0.835    0.2%
   80     288.2     0.486    0.1%
   82     293.1     0.339    0.1%
   84     297.1     0.181    0.0%
   86     302.1     0.388    0.1%
   88     306.8     0.455    0.1%
   90     311.9     0.348    0.1%
   92     319.8     1.039    0.3%
   94     324.5     0.618    0.1%
   96     328.7     0.627    0.1%
   98     334.9     0.919    0.2%
  100     339.5     0.434    0.1%

Quality and confidence:
param     error
s         0.002

Model:
Time ~=    87.72
    + s     2.51
              µs

Reads = 8 + (0 * s)
Writes = 6 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "validate", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    36.29
              µs

Reads = 6
Writes = 2
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    36.29
              µs

Reads = 6
Writes = 2
Pallet: "pallet_staking", Extrinsic: "kick", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    26.98
    + k    16.84
              µs

Reads = 1 + (1 * k)
Writes = 0 + (1 * k)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    k   mean µs  sigma µs       %
    1     43.37     0.208    0.4%
    3     80.65     0.155    0.1%
    5     110.7     2.348    2.1%
    7       147     0.205    0.1%
    9     178.3     0.281    0.1%
   11       208     0.955    0.4%
   13     244.9     0.609    0.2%
   15       274      1.68    0.6%
   17     306.3     0.663    0.2%
   19     343.5     1.745    0.5%
   21     382.6     0.614    0.1%
   23     413.6     3.751    0.9%
   25     439.9     1.364    0.3%
   27     495.2     1.446    0.2%
   29     519.6     1.327    0.2%
   31     542.3     4.588    0.8%
   33     586.4     1.083    0.1%
   35     621.1     3.191    0.5%
   37     651.9     3.589    0.5%
   39     690.3     8.809    1.2%
   41     716.1     3.326    0.4%
   43     751.2     1.486    0.1%
   45     786.1     1.591    0.2%
   47     818.2     1.403    0.1%
   49     851.1     2.024    0.2%
   51     871.3     8.613    0.9%
   53       901     2.251    0.2%
   55     943.7     4.073    0.4%
   57     973.5     2.339    0.2%
   59      1025     3.073    0.2%
   61      1035     1.712    0.1%
   63      1072     3.484    0.3%
   65      1115     4.169    0.3%
   67      1147     11.26    0.9%
   69      1186     11.62    0.9%
   71      1216     13.09    1.0%
   73      1239      6.11    0.4%
   75      1302     9.242    0.7%
   77      1323     11.47    0.8%
   79      1349     12.37    0.9%
   81      1384     14.07    1.0%
   83      1404     1.289    0.0%
   85      1445     11.17    0.7%
   87      1485     15.15    1.0%
   89      1509      14.5    0.9%
   91      1532      1.93    0.1%
   93      1586     13.49    0.8%
   95      1619     10.32    0.6%
   97      1684     13.19    0.7%
   99      1668     1.984    0.1%
  101      1745     6.913    0.3%
  103      1776     5.207    0.2%
  105      1781     11.22    0.6%
  107      1817      15.8    0.8%
  109      1899     13.01    0.6%
  111      1938     17.06    0.8%
  113      1959     11.59    0.5%
  115      2002     10.12    0.5%
  117      1998     10.34    0.5%
  119      2026     9.763    0.4%
  121      2053     20.27    0.9%
  123      2103     16.61    0.7%
  125      2139     11.46    0.5%
  127      2160     15.99    0.7%

Quality and confidence:
param     error
k         0.017

Model:
Time ~=    22.31
    + k    16.89
              µs

Reads = 1 + (1 * k)
Writes = 0 + (1 * k)
Pallet: "pallet_staking", Extrinsic: "nominate", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    71.07
    + n    5.864
              µs

Reads = 11 + (1 * n)
Writes = 5 + (0 * n)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    1     75.04     0.134    0.1%
    2     82.22     0.176    0.2%
    3     88.15     0.192    0.2%
    4     94.83     0.169    0.1%
    5     101.2     0.384    0.3%
    6     106.8     0.275    0.2%
    7     112.1     0.282    0.2%
    8     118.2     0.252    0.2%
    9     124.2     0.164    0.1%
   10     129.4       0.4    0.3%
   11     136.5     0.167    0.1%
   12     141.3     0.541    0.3%
   13     147.1     0.469    0.3%
   14     152.3     0.294    0.1%
   15     158.5     0.312    0.1%
   16     163.7     0.529    0.3%

Quality and confidence:
param     error
n         0.013

Model:
Time ~=    70.91
    + n    5.864
              µs

Reads = 11 + (1 * n)
Writes = 5 + (0 * n)
Pallet: "pallet_staking", Extrinsic: "chill", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    18.32
              µs

Reads = 3
Writes = 0
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    18.32
              µs

Reads = 3
Writes = 0
Pallet: "pallet_staking", Extrinsic: "set_payee", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    13.47
              µs

Reads = 1
Writes = 1
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    13.47
              µs

Reads = 1
Writes = 1
Pallet: "pallet_staking", Extrinsic: "set_controller", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    29.29
              µs

Reads = 3
Writes = 3
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    29.29
              µs

Reads = 3
Writes = 3
Pallet: "pallet_staking", Extrinsic: "set_validator_count", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.571
              µs

Reads = 0
Writes = 1
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.571
              µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_no_eras", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.796
              µs

Reads = 0
Writes = 1
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.796
              µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_new_era", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.858
              µs

Reads = 0
Writes = 1
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.858
              µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "force_new_era_always", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.874
              µs

Reads = 0
Writes = 1
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    2.874
              µs

Reads = 0
Writes = 1
Pallet: "pallet_staking", Extrinsic: "set_invulnerables", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    3.394
    + v    0.055
              µs

Reads = 0 + (0 * v)
Writes = 1 + (0 * v)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    v   mean µs  sigma µs       %
    0     2.919     0.027    0.9%
   20     4.381     0.044    1.0%
   40      5.57     0.034    0.6%
   60     6.718     0.016    0.2%
   80       7.9     0.035    0.4%
  100      9.04     0.034    0.3%
  120     10.11     0.051    0.5%
  140     11.28     0.053    0.4%
  160     12.42     0.025    0.2%
  180     13.23     0.033    0.2%
  200     14.64     0.058    0.3%
  220     15.93     0.048    0.3%
  240     16.94     0.037    0.2%
  260     18.02     0.067    0.3%
  280     19.19     0.067    0.3%
  300     20.09     0.141    0.7%
  320     21.34     0.036    0.1%
  340     22.46     0.042    0.1%
  360     23.62     0.067    0.2%
  380     24.19     0.042    0.1%
  400     25.24     0.034    0.1%
  420     26.31     0.052    0.1%
  440     27.61     0.035    0.1%
  460     28.64     0.048    0.1%
  480      29.7     0.042    0.1%
  500     30.77     0.029    0.0%
  520     32.03     0.095    0.2%
  540     33.13     0.059    0.1%
  560     34.22     0.057    0.1%
  580      36.2     0.048    0.1%
  600     36.64     0.055    0.1%
  620     37.65     0.046    0.1%
  640     38.74     0.052    0.1%
  660     39.86     0.038    0.0%
  680     40.89     0.059    0.1%
  700     42.15     0.062    0.1%
  720     43.27     0.032    0.0%
  740     44.33      0.06    0.1%
  760     45.65     0.039    0.0%
  780     46.47     0.052    0.1%
  800     47.57      0.06    0.1%
  820     48.69     0.061    0.1%
  840     49.82     0.049    0.0%
  860     50.93      0.08    0.1%
  880     52.03     0.048    0.0%
  900      53.2     0.073    0.1%
  920     54.31     0.052    0.0%
  940     55.55     0.054    0.0%
  960     56.98     0.093    0.1%
  980     57.74     0.063    0.1%
 1000     58.97     0.067    0.1%

Quality and confidence:
param     error
v             0

Model:
Time ~=    3.406
    + v    0.055
              µs

Reads = 0 + (0 * v)
Writes = 1 + (0 * v)
Pallet: "pallet_staking", Extrinsic: "force_unstake", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    63.39
    + s    2.505
              µs

Reads = 6 + (0 * s)
Writes = 6 + (1 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    0      58.3     0.203    0.3%
    2     68.76     0.193    0.2%
    4     72.31     0.153    0.2%
    6     80.02     0.133    0.1%
    8     83.12     0.441    0.5%
   10     88.02     0.183    0.2%
   12     93.11     0.117    0.1%
   14     98.66     0.322    0.3%
   16     103.4     0.093    0.0%
   18     108.4     0.215    0.1%
   20     113.9     0.236    0.2%
   22     119.3     0.202    0.1%
   24     123.9     0.212    0.1%
   26     128.8     0.187    0.1%
   28     133.6     0.196    0.1%
   30     138.1      0.35    0.2%
   32     143.7     0.262    0.1%
   34     148.5     0.168    0.1%
   36     154.1      0.24    0.1%
   38     158.7     0.326    0.2%
   40     163.7     0.169    0.1%
   42     168.9     0.289    0.1%
   44     174.2     0.205    0.1%
   46       179     0.276    0.1%
   48     183.5     0.308    0.1%
   50     188.3     0.343    0.1%
   52     193.2     0.163    0.0%
   54       199     0.389    0.1%
   56     203.4      0.39    0.1%
   58     207.9     0.331    0.1%
   60     212.9     0.245    0.1%
   62     218.7      0.19    0.0%
   64       223     0.484    0.2%
   66     229.7     3.999    1.7%
   68     233.1     0.322    0.1%
   70     238.8     0.433    0.1%
   72       243     0.656    0.2%
   74     248.5     0.631    0.2%
   76     253.7     0.487    0.1%
   78     258.7     0.257    0.0%
   80     263.2     0.332    0.1%
   82     268.6     0.672    0.2%
   84     273.7     0.238    0.0%
   86     278.1     0.389    0.1%
   88     283.7     0.328    0.1%
   90     290.4     3.105    1.0%
   92     295.2     1.528    0.5%
   94     299.4     0.847    0.2%
   96     306.2     3.681    1.2%
   98     309.3     0.404    0.1%
  100     314.9     0.585    0.1%

Quality and confidence:
param     error
s         0.002

Model:
Time ~=    62.95
    + s    2.515
              µs

Reads = 6 + (0 * s)
Writes = 6 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "cancel_deferred_slash", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=     3816
    + s    19.97
              µs

Reads = 1 + (0 * s)
Writes = 1 + (0 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    1       242     0.222    0.0%
   20     986.3     10.05    1.0%
   39      1729     13.39    0.7%
   58      2446     15.52    0.6%
   77      3142     10.41    0.3%
   96      3833      13.5    0.3%
  115      4500     14.05    0.3%
  134      5157     11.72    0.2%
  153      5795     14.39    0.2%
  172      6490     31.51    0.4%
  191      7025     15.37    0.2%
  210      7671     16.75    0.2%
  229      8235     15.64    0.1%
  248      8799     15.31    0.1%
  267      9359     23.07    0.2%
  286      9889     17.98    0.1%
  305     10440     33.41    0.3%
  324     10960     30.23    0.2%
  343     11460     19.91    0.1%
  362     11920     25.26    0.2%
  381     12410     24.82    0.1%
  400     12850     24.07    0.1%
  419     13330     39.98    0.2%
  438     13720     26.19    0.1%
  457     14140     26.16    0.1%
  476     14530     21.55    0.1%
  495     14910     26.64    0.1%
  514     15320      26.1    0.1%
  533     15660     27.79    0.1%
  552     15990      24.7    0.1%
  571     16340      27.8    0.1%
  590     16650     35.68    0.2%
  609     16940     40.37    0.2%
  628     17230     43.72    0.2%
  647     17530     36.95    0.2%
  666     17750     28.31    0.1%
  685     18000     21.39    0.1%
  704     18250     15.77    0.0%
  723     18470     40.96    0.2%
  742     18630      27.9    0.1%
  761     18860      35.7    0.1%
  780     19020     26.89    0.1%
  799     19210     36.95    0.1%
  818     19360     26.97    0.1%
  837     19470     44.57    0.2%
  856     19560     33.02    0.1%
  875     19710     24.87    0.1%
  894     19760     26.82    0.1%
  913     19850     23.34    0.1%
  932     19890     34.19    0.1%
  951     19920        28    0.1%
  970     19960      33.2    0.1%
  989     19980     33.55    0.1%

Quality and confidence:
param     error
s         0.223

Model:
Time ~=     3387
    + s    19.97
              µs

Reads = 1 + (0 * s)
Writes = 1 + (0 * s)
Pallet: "pallet_staking", Extrinsic: "payout_stakers_dead_controller", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    111.5
    + n    48.68
              µs

Reads = 10 + (3 * n)
Writes = 2 + (1 * n)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    1     211.9     0.878    0.4%
    6     404.8     0.742    0.1%
   11     653.5     11.15    1.7%
   16     892.2     2.268    0.2%
   21      1144     15.62    1.3%
   26      1396     9.335    0.6%
   31      1611     1.883    0.1%
   36      1857     11.94    0.6%
   41      2096     11.47    0.5%
   46      2355     18.08    0.7%
   51      2583     13.08    0.5%
   56      2818     8.821    0.3%
   61      3072     17.49    0.5%
   66      3311     8.622    0.2%
   71      3579     10.56    0.2%
   76      3807     7.873    0.2%
   81      4011     14.28    0.3%
   86      4328     16.59    0.3%
   91      4523     21.04    0.4%
   96      4768     15.24    0.3%
  101      5022     12.16    0.2%
  106      5242     16.29    0.3%
  111      5484     11.21    0.2%
  116      5736     20.87    0.3%
  121      5970     20.81    0.3%
  126      6215     21.65    0.3%
  131      6494     19.24    0.2%
  136      6723     14.78    0.2%
  141      6976     12.13    0.1%
  146      7237     29.92    0.4%
  151      7504     12.84    0.1%
  156      7664     14.55    0.1%
  161      7950     30.32    0.3%
  166      8224     24.34    0.2%
  171      8490     20.59    0.2%
  176      8674     14.91    0.1%
  181      8917     21.18    0.2%
  186      9226     20.62    0.2%
  191      9451      31.4    0.3%
  196      9605     27.35    0.2%
  201      9941     17.32    0.1%
  206     10140     21.67    0.2%
  211     10440     42.34    0.4%
  216     10570     18.75    0.1%
  221     10880     16.99    0.1%
  226     11130     30.02    0.2%
  231     11330     17.23    0.1%
  236     11660     43.81    0.3%
  241     11830     27.85    0.2%
  246     12120      24.3    0.2%
  251     12290     46.61    0.3%
  256     12550     38.03    0.3%

Quality and confidence:
param     error
n          0.02

Model:
Time ~=    107.6
    + n    48.72
              µs

Reads = 10 + (3 * n)
Writes = 2 + (1 * n)
Pallet: "pallet_staking", Extrinsic: "payout_stakers_alive_staked", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    172.5
    + n    62.67
              µs

Reads = 11 + (5 * n)
Writes = 3 + (3 * n)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    n   mean µs  sigma µs       %
    1     217.9     0.354    0.1%
    6     532.7     1.186    0.2%
   11     851.5     9.119    1.0%
   16      1157     7.972    0.6%
   21      1483     15.85    1.0%
   26      1800     12.85    0.7%
   31      2098     14.17    0.6%
   36      2420     16.29    0.6%
   41      2737     7.024    0.2%
   46      3029     11.97    0.3%
   51      3383      19.3    0.5%
   56      3677     7.769    0.2%
   61      3974     9.181    0.2%
   66      4299     17.01    0.3%
   71      4633     17.16    0.3%
   76      4926     17.01    0.3%
   81      5253     11.28    0.2%
   86      5573      17.5    0.3%
   91      5906     19.29    0.3%
   96      6233     20.56    0.3%
  101      6525     14.48    0.2%
  106      6849     14.77    0.2%
  111      7118     19.13    0.2%
  116      7445     38.78    0.5%
  121      7777     12.63    0.1%
  126      8118     20.62    0.2%
  131      8423      17.2    0.2%
  136      8729      25.2    0.2%
  141      9003     21.36    0.2%
  146      9338     34.49    0.3%
  151      9647     12.94    0.1%
  156      9900     16.68    0.1%
  161     10270     41.51    0.4%
  166     10570      28.4    0.2%
  171     10920     19.02    0.1%
  176     11210     25.99    0.2%
  181     11500     23.97    0.2%
  186     11760     28.35    0.2%
  191     12180     34.96    0.2%
  196     12430     16.29    0.1%
  201     12790     36.24    0.2%
  206     13150     38.91    0.2%
  211     13420     22.22    0.1%
  216     13650     43.62    0.3%
  221     14020     22.85    0.1%
  226     14300     48.26    0.3%
  231     14610     38.03    0.2%
  236     14990     52.23    0.3%
  241     15290     57.92    0.3%
  246     15630     31.17    0.1%
  251     15830     41.99    0.2%
  256     16140     21.56    0.1%

Quality and confidence:
param     error
n         0.023

Model:
Time ~=    174.5
    + n    62.66
              µs

Reads = 11 + (5 * n)
Writes = 3 + (3 * n)
Pallet: "pallet_staking", Extrinsic: "rebond", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    79.82
    + l    0.095
              µs

Reads = 5 + (0 * l)
Writes = 3 + (0 * l)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    l   mean µs  sigma µs       %
    1     79.46     0.221    0.2%
    2      79.8      0.11    0.1%
    3     80.07     0.221    0.2%
    4     80.15     0.244    0.3%
    5     80.12     0.185    0.2%
    6     80.43     0.271    0.3%
    7     80.47     0.149    0.1%
    8     80.76     0.214    0.2%
    9     80.74      0.15    0.1%
   10     81.13     0.203    0.2%
   11     80.88     0.137    0.1%
   12     81.28     0.137    0.1%
   13     81.19     0.129    0.1%
   14     81.67     0.202    0.2%
   15     81.49     0.384    0.4%
   16     81.77     0.237    0.2%
   17     81.73     0.131    0.1%
   18     81.47      0.15    0.1%
   19     82.04     0.192    0.2%
   20     81.48     0.156    0.1%
   21     81.62     0.169    0.2%
   22     81.86     0.341    0.4%
   23     81.84      0.14    0.1%
   24     82.05     0.132    0.1%
   25      81.9     0.262    0.3%
   26     82.59     0.455    0.5%
   27      82.3     0.241    0.2%
   28     83.15      0.21    0.2%
   29     82.68     0.295    0.3%
   30      82.4     0.274    0.3%
   31     82.69     0.217    0.2%
   32      82.8     0.267    0.3%

Quality and confidence:
param     error
l         0.002

Model:
Time ~=    79.84
    + l    0.097
              µs

Reads = 5 + (0 * l)
Writes = 3 + (0 * l)
Pallet: "pallet_staking", Extrinsic: "set_history_depth", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + e    36.54
              µs

Reads = 2 + (0 * e)
Writes = 4 + (7 * e)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    e   mean µs  sigma µs       %
    1     43.91     0.193    0.4%
    2     72.61     0.355    0.4%
    3     100.7     0.434    0.4%
    4     129.4     1.132    0.8%
    5     154.9     0.397    0.2%
    6     182.2     0.291    0.1%
    7     210.7     0.352    0.1%
    8     237.8     0.427    0.1%
    9       266     2.071    0.7%
   10     296.4      0.54    0.1%
   11     321.5     0.683    0.2%
   12     353.5     0.702    0.1%
   13     382.3     1.066    0.2%
   14     410.7     0.786    0.1%
   15     440.6     0.975    0.2%
   16       470     1.176    0.2%
   17     502.7     0.599    0.1%
   18     528.4     0.694    0.1%
   19     568.3     4.072    0.7%
   20     591.9     3.995    0.6%
   21     631.1     2.739    0.4%
   22     664.4     6.511    0.9%
   23     697.9     11.29    1.6%
   24     729.5     11.21    1.5%
   25     755.4     1.523    0.2%
   26     792.4     1.679    0.2%
   27       829     10.22    1.2%
   28       857     5.154    0.6%
   29     897.4     11.61    1.2%
   30       929     10.72    1.1%
   31     954.4     2.709    0.2%
   32      1011      13.7    1.3%
   33      1027     13.14    1.2%
   34      1058     11.45    1.0%
   35      1101     10.87    0.9%
   36      1133     3.106    0.2%
   37      1159     11.08    0.9%
   38      1181     2.149    0.1%
   39      1237     14.98    1.2%
   40      1262     10.86    0.8%
   41      1301      12.9    0.9%
   42      1324     13.45    1.0%
   43      1362     7.928    0.5%
   44      1407        14    0.9%
   45      1439     13.36    0.9%
   46      1478     9.821    0.6%
   47      1515     9.861    0.6%
   48      1556     11.22    0.7%
   49      1599     12.64    0.7%
   50      1635     8.609    0.5%
   51      1694     4.388    0.2%
   52      1693     8.166    0.4%
   53      1748     13.38    0.7%
   54      1782     13.27    0.7%
   55      1820     14.05    0.7%
   56      1848     11.65    0.6%
   57      1889     14.84    0.7%
   58      1932     12.38    0.6%
   59      1978     7.178    0.3%
   60      1984     6.338    0.3%
   61      2039     11.55    0.5%
   62      2076     12.91    0.6%
   63      2109      10.6    0.5%
   64      2155      9.08    0.4%
   65      2210     8.655    0.3%
   66      2243     17.27    0.7%
   67      2275      13.3    0.5%
   68      2315     15.14    0.6%
   69      2385     16.65    0.6%
   70      2366     11.43    0.4%
   71      2426      16.3    0.6%
   72      2462     15.46    0.6%
   73      2504     14.02    0.5%
   74      2556     8.469    0.3%
   75      2609     13.81    0.5%
   76      2626     16.28    0.6%
   77      2674     14.29    0.5%
   78      2718      9.29    0.3%
   79      2740     11.68    0.4%
   80      2814     12.49    0.4%
   81      2835     20.77    0.7%
   82      2900     20.71    0.7%
   83      2927     9.974    0.3%
   84      2978     11.35    0.3%
   85      3006     14.74    0.4%
   86      3047     6.537    0.2%
   87      3111     13.38    0.4%
   88      3135      11.5    0.3%
   89      3188     12.56    0.3%
   90      3224     11.32    0.3%
   91      3270     5.669    0.1%
   92      3258     12.47    0.3%
   93      3384     13.69    0.4%
   94      3381      27.8    0.8%
   95      3428     16.98    0.4%
   96      3512     14.76    0.4%
   97      3557     15.33    0.4%
   98      3571     11.74    0.3%
   99      3639     11.35    0.3%
  100      3753     20.18    0.5%

Quality and confidence:
param     error
e         0.074

Model:
Time ~=        0
    + e    36.77
              µs

Reads = 2 + (0 * e)
Writes = 4 + (7 * e)
Pallet: "pallet_staking", Extrinsic: "reap_stash", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    74.97
    + s    2.505
              µs

Reads = 7 + (0 * s)
Writes = 8 + (1 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    s   mean µs  sigma µs       %
    1     76.44     0.265    0.3%
    2     78.07      0.16    0.2%
    3     81.11     0.065    0.0%
    4     84.51       0.2    0.2%
    5     87.88     0.802    0.9%
    6     89.24     0.127    0.1%
    7     91.93     0.219    0.2%
    8     94.41     0.192    0.2%
    9     96.84     0.286    0.2%
   10     99.69     0.207    0.2%
   11     102.2     0.281    0.2%
   12     104.8      0.18    0.1%
   13     107.7     0.365    0.3%
   14     109.8     0.181    0.1%
   15       112     0.186    0.1%
   16     115.1     0.247    0.2%
   17     116.8      0.26    0.2%
   18     119.9     0.315    0.2%
   19       122     0.214    0.1%
   20     124.6     0.199    0.1%
   21     127.6     0.436    0.3%
   22     129.8     0.205    0.1%
   23     132.2     0.215    0.1%
   24     136.4      0.57    0.4%
   25     138.3     0.192    0.1%
   26     141.1     0.129    0.0%
   27     143.3     0.294    0.2%
   28     146.1     0.297    0.2%
   29     149.1     0.291    0.1%
   30     150.8     0.274    0.1%
   31     153.3     0.179    0.1%
   32     155.5     0.118    0.0%
   33     158.2     0.422    0.2%
   34     160.4     0.258    0.1%
   35     162.8     0.228    0.1%
   36     165.8     0.476    0.2%
   37     168.4     0.229    0.1%
   38     170.7     0.351    0.2%
   39     173.8     0.292    0.1%
   40     175.9     0.336    0.1%
   41     178.7     0.293    0.1%
   42     181.3     0.304    0.1%
   43     183.3     0.278    0.1%
   44     186.5     0.695    0.3%
   45       188     0.265    0.1%
   46     191.1     0.483    0.2%
   47     193.9     1.904    0.9%
   48     195.7     0.307    0.1%
   49     198.1     0.289    0.1%
   50     199.4     0.417    0.2%
   51       202     0.231    0.1%
   52     204.4     0.199    0.0%
   53     207.3      0.16    0.0%
   54     209.5     0.349    0.1%
   55     213.1     0.419    0.1%
   56     215.6     0.416    0.1%
   57     217.5     0.268    0.1%
   58     219.6     0.267    0.1%
   59     222.8     0.228    0.1%
   60     224.5     0.441    0.1%
   61     227.9     0.401    0.1%
   62     231.8     1.169    0.5%
   63     233.3     0.399    0.1%
   64       235     0.387    0.1%
   65     237.5      0.21    0.0%
   66     239.6     0.282    0.1%
   67     242.6      0.32    0.1%
   68     244.6     0.453    0.1%
   69     247.4     0.413    0.1%
   70     249.9     0.252    0.1%
   71     253.1     0.834    0.3%
   72     254.3     0.574    0.2%
   73     257.4       0.4    0.1%
   74     260.4     1.123    0.4%
   75       263     0.435    0.1%
   76     264.6     0.392    0.1%
   77     266.4     0.413    0.1%
   78     270.2     0.592    0.2%
   79     273.1     1.523    0.5%
   80     274.5     0.585    0.2%
   81     276.3     0.633    0.2%
   82     279.3     0.761    0.2%
   83     282.2     0.453    0.1%
   84     284.5     0.298    0.1%
   85     288.3     0.916    0.3%
   86     289.5     0.393    0.1%
   87     292.4     0.539    0.1%
   88     295.7      0.63    0.2%
   89     298.2     0.198    0.0%
   90     298.6     0.732    0.2%
   91     302.8     0.478    0.1%
   92     306.4     0.435    0.1%
   93     308.9     0.316    0.1%
   94     310.5     0.526    0.1%
   95     311.3     0.886    0.2%
   96     315.4     0.436    0.1%
   97     318.2     0.595    0.1%
   98     321.7     0.412    0.1%
   99     323.8     0.381    0.1%
  100     327.2     0.432    0.1%

Quality and confidence:
param     error
s         0.001

Model:
Time ~=    74.97
    + s    2.505
              µs

Reads = 7 + (0 * s)
Writes = 8 + (1 * s)
Pallet: "pallet_staking", Extrinsic: "new_era", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + v    290.3
    + n     52.2
              µs

Reads = 209 + (3 * v) + (4 * n)
Writes = 4 + (3 * v) + (0 * n)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    v     n   mean µs  sigma µs       %
    1   100      3828     20.39    0.5%
    2   100      4126     15.82    0.3%
    3   100      4313     9.803    0.2%
    4   100      4578     9.531    0.2%
    5   100      4818     8.591    0.1%
    6   100      5115      19.8    0.3%
    7   100      5385     9.935    0.1%
    8   100      5693     24.22    0.4%
    9   100      6117     16.42    0.2%
   10     1      1321     9.136    0.6%
   10     2      1378     15.23    1.1%
   10     3      1428     12.84    0.8%
   10     4      1468     8.546    0.5%
   10     5      1543     6.382    0.4%
   10     6      1602     12.22    0.7%
   10     7      1639      11.7    0.7%
   10     8      1689     13.98    0.8%
   10     9      1764     11.55    0.6%
   10    10      1797     11.61    0.6%
   10    11      1840     15.64    0.8%
   10    12      1898     8.779    0.4%
   10    13      1962     9.144    0.4%
   10    14      2026     7.679    0.3%
   10    15      2070     8.659    0.4%
   10    16      2105     11.17    0.5%
   10    17      2158     8.636    0.4%
   10    18      2210      13.1    0.5%
   10    19      2260       7.9    0.3%
   10    20      2318     8.714    0.3%
   10    21      2324     8.677    0.3%
   10    22      2393     10.76    0.4%
   10    23      2448     8.475    0.3%
   10    24      2510      7.85    0.3%
   10    25      2589     17.01    0.6%
   10    26      2641      10.6    0.4%
   10    27      2647     9.787    0.3%
   10    28      2718      8.11    0.2%
   10    29      2765     10.71    0.3%
   10    30      2843     9.226    0.3%
   10    31      2861     11.81    0.4%
   10    32      2951     23.57    0.7%
   10    33      2996     7.032    0.2%
   10    34      3042     9.457    0.3%
   10    35      3101     9.209    0.2%
   10    36      3154     16.92    0.5%
   10    37      3170     8.552    0.2%
   10    38      3250     16.33    0.5%
   10    39      3303     15.96    0.4%
   10    40      3368     15.94    0.4%
   10    41      3438     11.04    0.3%
   10    42      3440     14.36    0.4%
   10    43      3478     9.636    0.2%
   10    44      3552     9.749    0.2%
   10    45      3614     12.38    0.3%
   10    46      3646     7.399    0.2%
   10    47      3710      10.8    0.2%
   10    48      3757     12.72    0.3%
   10    49      3799     12.22    0.3%
   10    50      3847     19.94    0.5%
   10    51      3892     8.175    0.2%
   10    52      3979     6.604    0.1%
   10    53      4037     19.06    0.4%
   10    54      4113      16.1    0.3%
   10    55      4206     15.75    0.3%
   10    56      4208      18.3    0.4%
   10    57      4218     14.51    0.3%
   10    58      4349     24.24    0.5%
   10    59      4426      17.7    0.4%
   10    60      4480     10.21    0.2%
   10    61      4487     9.777    0.2%
   10    62      4562     25.98    0.5%
   10    63      4627     12.64    0.2%
   10    64      4706     19.32    0.4%
   10    65      4691     19.85    0.4%
   10    66      4742     8.955    0.1%
   10    67      4794     9.491    0.1%
   10    68      4830     14.51    0.3%
   10    69      4845     16.95    0.3%
   10    70      4924     13.13    0.2%
   10    71      4945     10.14    0.2%
   10    72      5072     18.92    0.3%
   10    73      5106     13.09    0.2%
   10    74      5145     10.69    0.2%
   10    75      5222     17.81    0.3%
   10    76      5285     24.33    0.4%
   10    77      5292     10.86    0.2%
   10    78      5331     15.03    0.2%
   10    79      5344     8.639    0.1%
   10    80      5436     16.71    0.3%
   10    81      5549     20.49    0.3%
   10    82      5596     13.56    0.2%
   10    83      5659     18.28    0.3%
   10    84      5622     13.29    0.2%
   10    85      5698     12.85    0.2%
   10    86      5716     15.69    0.2%
   10    87      5839     16.44    0.2%
   10    88      5856     20.48    0.3%
   10    89      5898     18.68    0.3%
   10    90      5975     17.94    0.3%
   10    91      5957     18.37    0.3%
   10    92      6063      13.5    0.2%
   10    93      6114     22.94    0.3%
   10    94      6147      16.2    0.2%
   10    95      6256     15.48    0.2%
   10    96      6277     11.49    0.1%
   10    97      6310     13.06    0.2%
   10    98      6390     14.39    0.2%
   10    99      6422     19.43    0.3%
   10   100      6457     27.39    0.4%

Quality and confidence:
param     error
v         0.979
n         0.049

Model:
Time ~=        0
    + v    309.4
    + n    51.98
              µs

Reads = 209 + (3 * v) + (4 * n)
Writes = 4 + (3 * v) + (0 * n)
Pallet: "pallet_staking", Extrinsic: "get_npos_voters", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + v    28.49
    + n    32.93
    + s    22.18
              µs

Reads = 204 + (3 * v) + (4 * n) + (1 * s)
Writes = 0 + (0 * v) + (0 * n) + (0 * s)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    v     n     s   mean µs  sigma µs       %
  500  1000    20     45910     103.2    0.2%
  510  1000    20     45840     148.4    0.3%
  520  1000    20     46550     229.4    0.4%
  530  1000    20     46810     209.7    0.4%
  540  1000    20     47030     138.3    0.2%
  550  1000    20     47560     203.3    0.4%
  560  1000    20     48180     236.1    0.4%
  570  1000    20     48010     159.9    0.3%
  580  1000    20     48180     144.1    0.2%
  590  1000    20     48030       158    0.3%
  600  1000    20     48060     122.8    0.2%
  610  1000    20     48990     126.2    0.2%
  620  1000    20     48850     114.5    0.2%
  630  1000    20     49080     182.1    0.3%
  640  1000    20     49070       131    0.2%
  650  1000    20     49920     158.5    0.3%
  660  1000    20     50240     128.6    0.2%
  670  1000    20     50470     250.8    0.4%
  680  1000    20     50870     183.2    0.3%
  690  1000    20     50500     168.9    0.3%
  700  1000    20     51100     225.7    0.4%
  710  1000    20     51990     226.8    0.4%
  720  1000    20     51680     124.3    0.2%
  730  1000    20     52180     213.6    0.4%
  740  1000    20     52570     181.3    0.3%
  750  1000    20     52860     237.6    0.4%
  760  1000    20     53740     85.34    0.1%
  770  1000    20     53590     160.8    0.3%
  780  1000    20     53270     291.8    0.5%
  790  1000    20     54420     134.8    0.2%
  800  1000    20     53880     160.5    0.2%
  810  1000    20     54220     144.8    0.2%
  820  1000    20     54870     134.1    0.2%
  830  1000    20     55030     201.3    0.3%
  840  1000    20     55690     203.5    0.3%
  850  1000    20     55320     310.9    0.5%
  860  1000    20     56060     172.8    0.3%
  870  1000    20     56200     243.3    0.4%
  880  1000    20     57340     177.8    0.3%
  890  1000    20     56530     131.6    0.2%
  900  1000    20     56870     152.1    0.2%
  910  1000    20     57220     173.3    0.3%
  920  1000    20     58070     142.5    0.2%
  930  1000    20     57240     86.65    0.1%
  940  1000    20     58010     294.6    0.5%
  950  1000    20     58810     140.2    0.2%
  960  1000    20     58810       282    0.4%
  970  1000    20     59530     73.86    0.1%
  980  1000    20     59360     182.8    0.3%
  990  1000    20     60260       194    0.3%
 1000   500    20     43170     201.4    0.4%
 1000   510    20     44500     175.3    0.3%
 1000   520    20     43630     121.8    0.2%
 1000   530    20     44680     201.6    0.4%
 1000   540    20     45000     112.4    0.2%
 1000   550    20     44870     152.2    0.3%
 1000   560    20     45660     144.5    0.3%
 1000   570    20     45640     321.3    0.7%
 1000   580    20     45810     147.5    0.3%
 1000   590    20     46240     151.4    0.3%
 1000   600    20     46770     226.9    0.4%
 1000   610    20     46600     185.5    0.3%
 1000   620    20     47410     103.7    0.2%
 1000   630    20     47930     173.8    0.3%
 1000   640    20     48120     238.6    0.4%
 1000   650    20     48740     232.2    0.4%
 1000   660    20     48770     252.2    0.5%
 1000   670    20     48860     237.9    0.4%
 1000   680    20     48870       178    0.3%
 1000   690    20     49730     187.4    0.3%
 1000   700    20     49440     164.6    0.3%
 1000   710    20     50300     238.7    0.4%
 1000   720    20     50720     220.4    0.4%
 1000   730    20     50210     122.5    0.2%
 1000   740    20     50740     205.3    0.4%
 1000   750    20     51110     161.5    0.3%
 1000   760    20     51980     144.5    0.2%
 1000   770    20     52270     226.9    0.4%
 1000   780    20     51610     173.9    0.3%
 1000   790    20     53100       163    0.3%
 1000   800    20     53100     283.3    0.5%
 1000   810    20     53420     178.3    0.3%
 1000   820    20     54050     215.3    0.3%
 1000   830    20     53990     187.4    0.3%
 1000   840    20     54260     162.5    0.2%
 1000   850    20     54190     109.3    0.2%
 1000   860    20     55450     226.7    0.4%
 1000   870    20     55540     210.4    0.3%
 1000   880    20     55460     121.5    0.2%
 1000   890    20     56480     161.8    0.2%
 1000   900    20     56060     224.4    0.4%
 1000   910    20     57240     210.4    0.3%
 1000   920    20     57490     143.2    0.2%
 1000   930    20     57010     202.1    0.3%
 1000   940    20     57850     156.3    0.2%
 1000   950    20     58750     160.7    0.2%
 1000   960    20     58580     196.3    0.3%
 1000   970    20     58740     267.2    0.4%
 1000   980    20     59070     159.6    0.2%
 1000   990    20     60030     126.8    0.2%
 1000  1000     1     59200     193.3    0.3%
 1000  1000     2     59360     317.2    0.5%
 1000  1000     3     59930     144.2    0.2%
 1000  1000     4     59790     166.6    0.2%
 1000  1000     5     59700     175.8    0.2%
 1000  1000     6     59420     252.8    0.4%
 1000  1000     7     60040     366.1    0.6%
 1000  1000     8     59650     171.3    0.2%
 1000  1000     9     59460     343.9    0.5%
 1000  1000    10     60190     142.4    0.2%
 1000  1000    11     59920     248.4    0.4%
 1000  1000    12     59850     355.7    0.5%
 1000  1000    13     60590     244.2    0.4%
 1000  1000    14     60460     270.4    0.4%
 1000  1000    15     59300     323.2    0.5%
 1000  1000    16     59640     105.5    0.1%
 1000  1000    17     59750     130.9    0.2%
 1000  1000    18     59660     182.9    0.3%
 1000  1000    19     60510     276.4    0.4%
 1000  1000    20     59900     180.2    0.3%

Quality and confidence:
param     error
v         0.092
n         0.092
s         3.143

Model:
Time ~=        0
    + v    28.26
    + n     33.2
    + s    12.48
              µs

Reads = 204 + (3 * v) + (4 * n) + (1 * s)
Writes = 0 + (0 * v) + (0 * n) + (0 * s)
Pallet: "pallet_staking", Extrinsic: "get_npos_targets", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=        0
    + v    11.54
              µs

Reads = 1 + (1 * v)
Writes = 0 + (0 * v)
Min Squares Analysis
========
-- Extrinsic Time --

Data points distribution:
    v   mean µs  sigma µs       %
  500      5617     35.01    0.6%
  510      5663     26.64    0.4%
  520      5869     45.07    0.7%
  530      5932     26.67    0.4%
  540      5958     21.37    0.3%
  550      6157     47.28    0.7%
  560      6339     47.48    0.7%
  570      6498      22.7    0.3%
  580      6534     43.42    0.6%
  590      6800     74.09    1.0%
  600      6769      36.4    0.5%
  610      6893     48.37    0.7%
  620      7010     51.91    0.7%
  630      7041     46.43    0.6%
  640      7088     28.37    0.4%
  650      7328     62.96    0.8%
  660      7422     48.21    0.6%
  670      7578     60.88    0.8%
  680      7734     53.67    0.6%
  690      7815     32.08    0.4%
  700      7901     44.24    0.5%
  710      7975     60.67    0.7%
  720      8221     68.02    0.8%
  730      8424      64.8    0.7%
  740      8260     45.52    0.5%
  750      8511     65.02    0.7%
  760      8521     84.67    0.9%
  770      8623     50.73    0.5%
  780      8841     41.07    0.4%
  790      8950     49.01    0.5%
  800      8971     48.23    0.5%
  810      8991     63.33    0.7%
  820      9157     50.31    0.5%
  830      9448     39.72    0.4%
  840      9615      66.1    0.6%
  850      9647     62.86    0.6%
  860      9824     64.33    0.6%
  870      9981     52.75    0.5%
  880     10070     61.47    0.6%
  890     10130     43.91    0.4%
  900     10160     65.74    0.6%
  910     10260     52.33    0.5%
  920     10530     56.25    0.5%
  930     10470     62.96    0.6%
  940     10810      64.5    0.5%
  950     10810     44.35    0.4%
  960     10770     45.52    0.4%
  970     10970     49.79    0.4%
  980     11050     39.99    0.3%
  990     11550     30.19    0.2%
 1000     11360     77.69    0.6%

Quality and confidence:
param     error
v         0.031

Model:
Time ~=        0
    + v    11.56
              µs

Reads = 1 + (1 * v)
Writes = 0 + (0 * v)
Pallet: "pallet_staking", Extrinsic: "set_staking_limits", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    6.606
              µs

Reads = 0
Writes = 5
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    6.606
              µs

Reads = 0
Writes = 5
Pallet: "pallet_staking", Extrinsic: "chill_other", Lowest values: [], Highest values: [], Steps: 50, Repeat: 20
Median Slopes Analysis
========
-- Extrinsic Time --

Model:
Time ~=    59.72
              µs

Reads = 7
Writes = 2
Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=    59.72
              µs

Reads = 7
Writes = 2

@emostov emostov changed the title Force rebag in relevant benchmarks Force bag changes in relevant benchmarks (targets #9507) Aug 13, 2021
@@ -544,7 +544,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for BenchmarkingState<B> {

if tracker.writes > 0 {
writes += 1;
repeat_writes += tracker.reads - 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like a bug. should be tracker.writes - 1, which should be okay

Co-authored-by: Shawn Tabrizi <[email protected]>
Comment on lines 338 to 341
#[cfg(feature = "runtime-benchmarks")]
fn is_in_pos(_id: &AccountId, _weight: VoteWeight, mock: bool) -> bool {
mock
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks very strange to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed; the default impl here assumes this is not actually relevant to the particular list provider impl and instead returns the mock value. The mock value should always just be the expected result. I would like something better, but not sure how

Comment on lines 763 to 765
sp_std::if_std! {
println!("extra to bond_extra {:#?}", extra);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sp_std::if_std! {
println!("extra to bond_extra {:#?}", extra);
}

@@ -768,13 +771,14 @@ pub mod pallet {
Error::<T>::InsufficientBond
);

// ledger must be updated prior to calling `Self::weight_of`.
Self::update_ledger(&controller, &ledger);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kianenigma this is an important correction, since the ledger must be updated before anything that uses weight_of (like on_update here)

Comment on lines 184 to 188
log!(
info,
"A origin1 ledger active {:#?}",
Ledger::<T>::get(&origin_controller1).ok_or("ledger not created before")?.active
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log!(
info,
"A origin1 ledger active {:#?}",
Ledger::<T>::get(&origin_controller1).ok_or("ledger not created before")?.active
);

Comment on lines 200 to 205
log!(
info,
"B origin1 ledger active {:#?}",
Ledger::<T>::get(&origin_controller1).ok_or("ledger not created before")?.active
);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log!(
info,
"B origin1 ledger active {:#?}",
Ledger::<T>::get(&origin_controller1).ok_or("ledger not created before")?.active
);

Comment on lines 137 to 140
max: u32,
balance_factor: u32,
seed: u32,
) -> Result<Vec<<T::Lookup as StaticLookup>::Source>, &'static str> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could consider updating this to create_validators_with_seed, and then keeping create_validators which calls this other function with seed 0. would keep you from needing to update a lot of things.

Comment on lines 169 to 170
log!(info, "scenario origin_weight {:#?}", origin_weight);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log!(info, "scenario origin_weight {:#?}", origin_weight);

@emostov emostov merged commit bd835d4 into zeke-voter-bags-module Aug 28, 2021
@emostov emostov deleted the zeke-bags-list-staking-benchmarks branch August 28, 2021 19:27
ghost pushed a commit that referenced this pull request Sep 17, 2021
…#9507)

* remove extra whitespace

Co-authored-by: Kian Paimani <[email protected]>

* only emit rebag event on success

* add doc explaining the term voter

* revamp/simplify rebag test

* ensure genesis accounts are placed into the correct nodes/bags

* bond_extra implicitly rebags

* types at top; doc public type

* start sketching out adjustable thresholds

* add integrity test for voter bag threshold requirements

* get rid of BagIdx

This reorganizes bag storage such that bags are always referred to
by their upper threshold. This in turn means that adding and removing
bags is cheaper; you only need to migrate certain voters, not all of them.

* implement migration logic for when the threshold list changes

* start sketching out threshold proc macros

* further refine macro signatures

* WIP: implement make_ratio macro

* start rethinking the process of producing threshold lists

The macro approach seems to be a non-starter; that only really works
if we're throwing around numeric literals everywhere, and that's just
not nice in this case.

Instead, let's write helper functions and make it really easy to
generate the tables in separate, permanent files, which humans
can then edit.

* write helper functions to emit voter bags module

* WIP: demo generating voter bags for a realistic runtime

This isn't yet done, becuase it seems to take a Very Long Time to run,
and it really shouldn't. Need to look into that.

Still, it's a lot closer than it was this morning.

* rm unnecessary arg_enum

* fix voter bags math

Turns out that when you're working in exponential space, you need
to divide, not subtract, in order to keep the math working properly.

Also neaten up the output a little bit to make it easier to read.

* add computed voter bags thresholds to node

* fixup some docs

* iter from large bags to small, fulfuilling the contract

* make tests compile

* add VoterBagThresholds to some configs

* ensure that iteration covers all voters even with implied final bag

* use sp_std::boxed::Box;

* fix unused import

* add some more voter bags tests

* file_header.txt

* integrity test to ensure min bag exceeds existential weight

* add more debug assertions about node list length

* rm unused imports

* Kian enters

* Update frame/election-provider-support/src/onchain.rs

Co-authored-by: Zeke Mostov <[email protected]>

* Suggestions for #9081 (Store voters in unsorted bags) (#9328)

* Add some debug asserts to node::get and remove_node

* Improve the debug asserts in remove_node

* improve debug asserts

* Space

* Remove bad assertions

* Tests: WIP take_works

* Take test

* Doc comment

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* Test storage is cleaned up;

* formatting

* Switch to simpler thresholds

* Update the storage cleanup test

* Remove hardcoded values from benchmark to make it more robust

* Fix tests to acces bags properly

* Sanity check WIP; tests failing

* Update sanity checks to be more correct

* Improve storage cleanup tests

* WIP remote_ext_tests

* Some notes on next steps

* Remove some stuff that was for remote-ext tests

* Some more cleanup to reduce diff

* More :clean:

* Mo cleanin

* small fix

* A lot of changes from kian

Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: kianenigma <[email protected]>

* merge fallout

* Run cargo +nightly fmt

* Fix a bunch of stuff, remove not needed runtime arg of make-bags

* add logs

* Glue the new staking bags to the election snapshot (#9415)

* Glue the new staking bags to the election snapshot

* add CheckedRem (#9412)

* add CheckedRem

* fix

* Run fmt

* Test comment

Co-authored-by: Xiliang Chen <[email protected]>
Co-authored-by: emostov <[email protected]>

* Update node runtime with VoterSnapshotPerBlock

* Unit test for pallet-staking unsorted bags feature (targets #9081) (#9422)

* impl notional_bag_for_works

* Add tests: insert_as_works & insert_works

* Impl test: remove_works

* Trivial cleaning

* Add test: update_position_for_works

* Write out edge case; probably can delete later

* Add test: bags::get_works

* Add test: remove_node_happy_path_works

* Add test: remove_node_bad_paths_documented

* WIP: voting_data_works

* done

* Improve test voting_data_works

* Add comment

* Fill out test basic_setup_works

* Update: iteration_is_semi_sorted

* Improve remove_works

* Update update_position_for_works; create set_ledger_and_free_balance

* Improve get_works

* Improve storage clean up checks in remove test

* Test: impl rebag_works + insert_and_remove_works

* forgot file -  Test: impl rebag_works + insert_and_remove_works

* Small tweak

* Update voter_bags test to reflect unused bags are removed

* Unbond & Rebond: do_rebag

* Prevent infinite loops with duplicate tail insert

* Check iter.count on voter list in pre-migrate

* undo strang fmt comment stuff

* Add in todo

Co-authored-by: kianenigma <[email protected]>

* Try prepare for master merge

* Reduce diff

* Add comment for test to add

* Add in code TODO for update_position efficiency updates

* Initial impl compiles

* impl StakingVoterListStub

* Sample impl<T: Config> VoterListProvider<T> for VoterList<T>

* impl VoterListProvider for voter-bags

* WIP integrate pallet-voter-bags to staking mock

* the trait `pallet_staking::pallet::pallet::Config` is not implemented for `mock::Test`

* random

* pushing my stuff

* Mock working

* WIP voter list tests

* Add bag insert, remove tests

* Add test for bag insert and remove

* Add remaining tests for VoterList

* Add tests for node

* Add rebag works

* Add rebag extrinsic tests

* Rename to bags-list and name the list .. list!

* Rename VoterBagThresholds => BagThresholds

* Add test count_works

* Test on_update_works

* test sanity check

* a round of test fixes

* push a lot of changes

* my last changes

* all bags-list test work; fmt

* Beautify some tests

* Doc comment for bags-list

* Add insert warnings

* Setup initial benchmark

* Wire up WeightInfo

* is_terminal wip; everything broken!

* Is terminal working

* add TODOs for remove_node

* clean up remoe_node

* Fix all staking tests

* retire VoterBagFor

* commit

* bring in stashed changes

* save

* bench pipeline works now, but I can't run stuff

* sabe

* benchmarks now run, but we have a failure

* WIP: Wire up make_bags

* bags-thresholds compiles

* Fix most build issues

* This will fix all the tests

* move bag thresholds to bags-list

* Move bag-thresholds bin to within pallet-bags

* Remove some unnescary TODOs

* Impl tets wrong_rebag_is_noop

* assert remove is a noop with bad data

* Assert integrity test panics

* Return an error when inserting duplicates

* Update to handle error in staking pallet when inserting to list

* Test contains and on_insert error

* Test re-nominate does not mess up list or count

* Everything builds and works, only the benchmark...

* fuck yeah benchmarks

* more cleanup, more hardening.

* use the bags list again

* fix benhc

* Some questions and changs for List::migration

* Fix migration removed_bags and new_bags usage

* Some trivial aesthetic changes

* Some more trivial changes

* tiny changes/

* mega rename

* fix all tests and ci build

* nit

* Test and fix migration

* nit

* fmt

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fmt

* remove unused

* make a few things pub

* make node also pub.. for remote-ext test

* Fix all tests again

* Force bag changes in relevant benchmarks (targets #9507) (#9529)

* force rebag for unbond, rebond, and bond_extra

* nit

* Improve utils

* fmt

* nits

* Move generate_bags to its own pallet

* Get runtime-benchmarks feature setup with prepare_on_update_benchmark

* Withdraw unbonded kill working

* Nominate bench working

* some cleanup

* WIP

* update to check head pre & post conditions

* Add some post condition verification stuff for on_remove

* Update nominate

* fmt

* Improvements

* Fix build

* fix build with polkadot companion

* Update frame/bags-list/src/list/tests.rs

Co-authored-by: Kian Paimani <[email protected]>

* move generate-bag from frame to utils

* wip

* refactor WIP

* WIP save

* Refactor working

* some variable renaming

* WIP: prepare to remove head checks

* Finish MvP refactor

* Some cleanup

* Soem more cleanup

* save

* fix a lot of stuff

* Update client/db/src/bench.rs

Co-authored-by: Shawn Tabrizi <[email protected]>

* Apply suggestions from code review

* Apply suggestions from code review

* Fix some issues that came from trying to merge comments on github

* some small changes

* simplify it

Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: kianenigma <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>

* Build works

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Remove commented out debug assert

* Remove some unused deps and some unused benchmarking stuff

* Fix stakings ElectionDataProvider clear

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Improving staking pallet-bags-list migration

* fix build and some comments;

* comment

* Reduce visibility in bags list components

* make node.bag_upper only accesible to benchmarks

* Address some feedback; comments updates

* use nominator map comment

* fix vec capacity debug assert

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <[email protected]>

* clarify VoterSnapshotPerBlock

* Reduce diff on create_validators by wrapping with_seed

* Some small improvements to staking benches

* Soem comment updates

* fix vec capacity debug assert ... for real this time

* Reduce ListBags viz

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Remove supports_eq_unordered & Support eq_unordered

* Update utils/frame/generate-bags/src/lib.rs

Co-authored-by: Guillaume Thiolliere <[email protected]>

* Make total-issuance & minimium-balance CLI args; Dont use emptry ext

* Improve docs for generate bags CLI args

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* Don't use default bags weight in node runtime

* Feature gating sanity_check not working

* Feature gate sanity check by creating duplicate fns

* Fix line wrapping

* Document VoteWeightProvider

* Make bags ext-builder not a module

* Apply suggestions from code review

Co-authored-by: Kian Paimani <[email protected]>

* use pallet_bags_list instead of crate in mock

* Make get_bags test helper fn live in List

* use remove_from_storage_unchecked for node removal

* Remove count of ids removed in remove_many

* Add node sanity check, improve list sanity check

* Do a list sanity check after on_update

* List::migrate: clean up debug assert, exit early when no change in thresholds

* Improve public doc comments for pallet_bags_list::list::List

* Improve public doc comments for pallet_bags_list::list::List

* Update generate bags docs

* Fix grammar in bags-list benchmark

* Add benchmark case for `rebag` extrinsic

* Add count parameter to List::clear; WIP adding MaxEncodedLen to list'

* MaxEncodeLen + generate_storage_info not working for Bag or Node

* Get MaxEncodeLen derive to work

* Try to correctly feature gate SortedListProvider::clear

* Use u32::MAX, not u32::max_value

* Get up to nominators_quota noms

* SortedListProvider::clear takes an Option

* Eplicitly ignore SortedListProvider return value

* Fix doc comment

* Update node-runtime voter snapshot per block

* Add test get_max_len_voters_even_if_some_nominators_are_slashed

* Add test only_iterates_max_2_times_nominators_quota

* Fix generate bags cargo.toml

* use sp_std vec

* Remove v8 migration hooks from pallet-staking

* Update npos trait

* Try respect line width

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bags_list --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bags-list/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* Update frame/bags-list/src/benchmarks.rs

* Unwrap try-runtime error; remove sortedlistprovider pre upgrade len  check

* trigger ci

* restore

* trigger ci

* restore

* trigger ci

* revert

* trigger ci

* revert

Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
Co-authored-by: kianenigma <[email protected]>
Co-authored-by: Xiliang Chen <[email protected]>
Co-authored-by: Parity Benchmarking Bot <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants