Skip to content

Commit fe1417a

Browse files
committed
Update the runtime-table zkprogram example following the changes in the performance regression framework
1 parent ec34b57 commit fe1417a

File tree

1 file changed

+6
-5
lines changed
  • src/examples/zkprogram/runtime-table

1 file changed

+6
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { Field, verify } from 'o1js';
22
import { PayrollRuntimeTableZkProgram } from './payroll.js';
3-
import { perfStart, perfEnd } from '../../../lib/testing/perf-regression.js';
3+
import { Performance } from '../../../lib/testing/perf-regression.js';
44

55
const cs = await PayrollRuntimeTableZkProgram.analyzeMethods();
6+
const perfPayroll = Performance.create(PayrollRuntimeTableZkProgram.name, cs);
67

7-
perfStart('compile', PayrollRuntimeTableZkProgram.name);
8+
perfPayroll.start('compile');
89
let { verificationKey } = await PayrollRuntimeTableZkProgram.compile({ withRuntimeTables: true });
9-
perfEnd();
10+
perfPayroll.end();
1011

1112
export const examplePayrollPublicInput = Field(1600_00); // total withheld (cents)
1213
export const examplePayrollPrivateInputs = [
@@ -18,11 +19,11 @@ export const examplePayrollPrivateInputs = [
1819
Field(3_000), // Charlie rate
1920
] as const;
2021

21-
perfStart('prove', PayrollRuntimeTableZkProgram.name, cs, 'verifyPayroll');
22+
perfPayroll.start('prove', 'verifyPayroll');
2223
let { proof } = await PayrollRuntimeTableZkProgram.verifyPayroll(
2324
examplePayrollPublicInput,
2425
...examplePayrollPrivateInputs
2526
);
26-
perfEnd();
27+
perfPayroll.end();
2728

2829
verify(proof, verificationKey);

0 commit comments

Comments
 (0)