git.delta.rocks / unique-network / refs/commits / bf2e552b853c

difftreelog

refactor changed arch of bechmarks

PraetorP2023-02-06parent: #f64e9cf.patch.diff
in: master
added export to `csv` ops fees

6 files changed

modifiedtests/.gitignorediffbeforeafterboth
1/node_modules/1/node_modules/
2properties.csv2properties.csv
33erc721.csv
4erc20.csv
deletedtests/src/benchmarks/mintFee/benchmark.tsdiffbeforeafterboth

no changes

addedtests/src/benchmarks/mintFee/common.tsdiffbeforeafterboth

no changes

addedtests/src/benchmarks/mintFee/mintFee.tsdiffbeforeafterboth

no changes

addedtests/src/benchmarks/mintFee/opsFee.tsdiffbeforeafterboth

no changes

modifiedtests/src/benchmarks/mintFee/types.tsdiffbeforeafterboth
8 }8 }
99
10}10}
11export interface IFeeGasCsv extends IFeeGasVm {
12 function: string,
13}
14export interface IFeeGasVm{
15 ethFee?: number | bigint,
16 ethGas?: number | bigint,
17 substrate?: number,
18 zeppelinFee?: number | bigint,
19 zeppelinGas?: number | bigint
20}
11export interface IFunctionFee {21export interface IFunctionFee {
12 [name: string]: IFeeGas22 [name: string]: IFeeGas
13}23}
24
1425
15export abstract class FunctionFeeVM {26export abstract class FunctionFeeVM {
16 [name: string]: {27 [name: string]: IFeeGasVm
28
29 static toCsv(model: FunctionFeeVM): IFeeGasCsv[]{
17 ethFee?: number | bigint,30 const res: IFeeGasCsv[] = [];
31 Object.keys(model).forEach(key => {
32 res.push({
33 function: key,
34 ethFee: model[key].ethFee,
18 ethGas?: number | bigint,35 ethGas: model[key].ethGas,
19 substrate?: number,36 substrate: model[key].substrate,
20 zeppelinFee?: number | bigint,37 zeppelinFee: model[key].zeppelinFee,
21 zeppelinGas?: number | bigint38 zeppelinGas: model[key].zeppelinGas,
39 });
40 });
41 return res;
22 };42 }
23
24 static fromModel(model: IFunctionFee): FunctionFeeVM {43 static fromModel(model: IFunctionFee): FunctionFeeVM {
25 const res: FunctionFeeVM = {};44 const res: FunctionFeeVM = {};