File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/examples/zkprogram/runtime-table Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import { Field , verify } from 'o1js' ;
22import { PayrollRuntimeTableZkProgram } from './payroll.js' ;
3- import { perfStart , perfEnd } from '../../../lib/testing/perf-regression.js' ;
3+ import { Performance } from '../../../lib/testing/perf-regression.js' ;
44
55const cs = await PayrollRuntimeTableZkProgram . analyzeMethods ( ) ;
6+ const perfPayroll = Performance . create ( PayrollRuntimeTableZkProgram . name , cs ) ;
67
7- perfStart ( 'compile' , PayrollRuntimeTableZkProgram . name ) ;
8+ perfPayroll . start ( 'compile' ) ;
89let { verificationKey } = await PayrollRuntimeTableZkProgram . compile ( { withRuntimeTables : true } ) ;
9- perfEnd ( ) ;
10+ perfPayroll . end ( ) ;
1011
1112export const examplePayrollPublicInput = Field ( 1600_00 ) ; // total withheld (cents)
1213export 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' ) ;
2223let { proof } = await PayrollRuntimeTableZkProgram . verifyPayroll (
2324 examplePayrollPublicInput ,
2425 ...examplePayrollPrivateInputs
2526) ;
26- perfEnd ( ) ;
27+ perfPayroll . end ( ) ;
2728
2829verify ( proof , verificationKey ) ;
You can’t perform that action at this time.
0 commit comments