Skip to main content

gear_core/gas_metering/
schedule.rs

1// Copyright (C) Gear Technologies Inc.
2// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
3
4#![allow(rustdoc::broken_intra_doc_links, missing_docs)]
5#![doc = r" This is auto-generated module that contains cost schedule from"]
6#![doc = r" `vara/pallets/gear/src/schedule.rs`."]
7#![doc = r""]
8#![doc = r" See `./scripts/weight-dump.sh` if you want to update it."]
9
10use crate::costs::*;
11
12#[derive(Debug, Clone)]
13#[doc = " Definition of the cost schedule and other parameterization for the wasm vm."]
14pub struct Schedule {
15    #[doc = " Describes the upper limits on various metrics."]
16    pub limits: Limits,
17    #[doc = " The weights for individual wasm instructions."]
18    pub instruction_weights: InstructionWeights,
19    #[doc = " The weights for each imported function a program is allowed to call."]
20    pub syscall_weights: SyscallWeights,
21    #[doc = " The weights for memory interaction."]
22    pub memory_weights: MemoryWeights,
23    #[doc = " The weights for renting."]
24    pub rent_weights: RentWeights,
25    #[doc = " The weights for database access."]
26    pub db_weights: DbWeights,
27    #[doc = " The weights for executing tasks."]
28    pub task_weights: TaskWeights,
29    #[doc = " The weights for instantiation of the module."]
30    pub instantiation_weights: InstantiationWeights,
31    #[doc = " The weights for WASM code instrumentation."]
32    pub instrumentation_weights: InstrumentationWeights,
33    #[doc = " Load allocations weight."]
34    pub load_allocations_weight: Weight,
35}
36
37impl Default for Schedule {
38    fn default() -> Self {
39        Self {
40            limits: Limits::default(),
41            instruction_weights: InstructionWeights::default(),
42            syscall_weights: SyscallWeights::default(),
43            memory_weights: MemoryWeights::default(),
44            rent_weights: RentWeights::default(),
45            db_weights: DbWeights::default(),
46            task_weights: TaskWeights::default(),
47            instantiation_weights: InstantiationWeights::default(),
48            instrumentation_weights: InstrumentationWeights::default(),
49            load_allocations_weight: Weight {
50                ref_time: 20559,
51                proof_size: 0,
52            },
53        }
54    }
55}
56
57#[derive(Debug, Clone)]
58#[doc = " Describes the upper limits on various metrics."]
59#[doc = ""]
60#[doc = " # Note"]
61#[doc = ""]
62#[doc = " The values in this struct should never be decreased. The reason is that decreasing those"]
63#[doc = " values will break existing programs which are above the new limits when a"]
64#[doc = " re-instrumentation is triggered."]
65pub struct Limits {
66    #[doc = " Maximum allowed stack height in number of elements."]
67    #[doc = ""]
68    #[doc = " See <https://wiki.parity.io/WebAssembly-StackHeight> to find out"]
69    #[doc = " how the stack frame cost is calculated. Each element can be of one of the"]
70    #[doc = " wasm value types. This means the maximum size per element is 64bit."]
71    #[doc = ""]
72    #[doc = " # Note"]
73    #[doc = ""]
74    #[doc = " It is safe to disable (pass `None`) the `stack_height` when the execution engine"]
75    #[doc = " is part of the runtime and hence there can be no indeterminism between different"]
76    #[doc = " client resident execution engines."]
77    pub stack_height: Option<u32>,
78    #[doc = " Maximum number of globals a module is allowed to declare."]
79    #[doc = ""]
80    #[doc = " Globals are not limited through the linear memory limit `memory_pages`."]
81    pub globals: u32,
82    #[doc = " Maximum number of locals a function can have."]
83    #[doc = ""]
84    #[doc = " As wasm engine initializes each of the local, we need to limit their number to confine"]
85    #[doc = " execution costs."]
86    pub locals: u32,
87    #[doc = " Maximum numbers of parameters a function can have."]
88    #[doc = ""]
89    #[doc = " Those need to be limited to prevent a potentially exploitable interaction with"]
90    #[doc = " the stack height instrumentation: The costs of executing the stack height"]
91    #[doc = " instrumentation for an indirectly called function scales linearly with the amount"]
92    #[doc = " of parameters of this function. Because the stack height instrumentation itself is"]
93    #[doc = " is not weight metered its costs must be static (via this limit) and included in"]
94    #[doc = " the costs of the instructions that cause them (call, call_indirect)."]
95    #[doc = ""]
96    #[doc = " NOTE: Also the limit checked against type in type section during a code validation."]
97    pub parameters: u32,
98    #[doc = " Maximum number of memory pages allowed for a program."]
99    pub memory_pages: u16,
100    #[doc = " Maximum number of elements allowed in a table."]
101    #[doc = ""]
102    #[doc = " Currently, the only type of element that is allowed in a table is funcref."]
103    pub table_size: u32,
104    #[doc = " Maximum number of elements that can appear as immediate value to the br_table instruction."]
105    pub br_table_size: u32,
106    #[doc = " The maximum length of a subject in bytes used for PRNG generation."]
107    pub subject_len: u32,
108    #[doc = " The maximum nesting level of the call stack."]
109    pub call_depth: u32,
110    #[doc = " The maximum size of a message payload in bytes."]
111    pub payload_len: u32,
112    #[doc = " The maximum length of a program code in bytes. This limit applies to the instrumented"]
113    #[doc = " version of the code. Therefore `instantiate_with_code` can fail even when supplying"]
114    #[doc = " a wasm binary below this maximum size."]
115    pub code_len: u32,
116    #[doc = " The maximum number of wasm data segments allowed for a program."]
117    pub data_segments_amount: u32,
118    #[doc = " The maximum length of a type section in bytes."]
119    pub type_section_len: u32,
120}
121
122impl Default for Limits {
123    fn default() -> Self {
124        Self {
125            stack_height: Some(36743),
126            globals: 256,
127            locals: 1024,
128            parameters: 128,
129            memory_pages: 32768,
130            table_size: 4096,
131            br_table_size: 256,
132            subject_len: 32,
133            call_depth: 32,
134            payload_len: 8388608,
135            code_len: 524288,
136            data_segments_amount: 1024,
137            type_section_len: 20480,
138        }
139    }
140}
141
142#[derive(Debug, Clone)]
143#[doc = " Describes the weight for all categories of supported wasm instructions."]
144#[doc = ""]
145#[doc = " There is one field for each wasm instruction that describes the weight to"]
146#[doc = " execute one instruction of that name. There are a few exceptions:"]
147#[doc = ""]
148#[doc = " 1. The following instructions are free of charge because they merely structure the"]
149#[doc = "    wasm module and cannot be spammed without making the module invalid (and rejected):"]
150#[doc = "    End, Unreachable, Return, Else"]
151#[doc = " 2. The following instructions cannot be benchmarked because they are removed by any"]
152#[doc = "    real world execution engine as a preprocessing step and therefore don't yield a"]
153#[doc = "    meaningful benchmark result. However, in contrast to the instructions mentioned in"]
154#[doc = "    1 they can be spammed. We price them with the same weight as"]
155#[doc = "    the \"default\" instruction (i64.const): Block, Loop, Nop"]
156#[doc = " 3. We cannot benchmark i64.const or i32.const on their own, but we need a const"]
157#[doc = "    weight to derive other instruction weights by subtracting supporting instructions"]
158#[doc = "    used to push benchmark arguments. Drops are inserted only to keep benchmark"]
159#[doc = "    modules valid and are charged as free instructions during instrumentation."]
160pub struct InstructionWeights {
161    #[doc = " Version of the instruction weights."]
162    #[doc = ""]
163    #[doc = " # Note"]
164    #[doc = ""]
165    #[doc = " Should be incremented whenever any instruction weight is changed. The"]
166    #[doc = " reason is that changes to instruction weights require a re-instrumentation"]
167    #[doc = " in order to apply the changes to an already deployed code. The re-instrumentation"]
168    #[doc = " is triggered by comparing the version of the current schedule with the version the code was"]
169    #[doc = " instrumented with. Changes usually happen when pallet_gear is re-benchmarked."]
170    #[doc = ""]
171    #[doc = " Changes to other parts of the schedule should not increment the version in"]
172    #[doc = " order to avoid unnecessary re-instrumentations."]
173    pub version: u32,
174    pub i64const: u32,
175    pub i64load: u32,
176    pub i32load: u32,
177    pub i64store: u32,
178    pub i32store: u32,
179    pub select: u32,
180    pub r#if: u32,
181    pub br: u32,
182    pub br_if: u32,
183    pub br_table: u32,
184    pub br_table_per_entry: u32,
185    pub call: u32,
186    pub call_indirect: u32,
187    pub call_indirect_per_param: u32,
188    pub call_per_local: u32,
189    pub local_get: u32,
190    pub local_set: u32,
191    pub local_tee: u32,
192    pub global_get: u32,
193    pub global_set: u32,
194    pub memory_current: u32,
195    pub i64clz: u32,
196    pub i32clz: u32,
197    pub i64ctz: u32,
198    pub i32ctz: u32,
199    pub i64popcnt: u32,
200    pub i32popcnt: u32,
201    pub i64eqz: u32,
202    pub i32eqz: u32,
203    pub i32extend8s: u32,
204    pub i32extend16s: u32,
205    pub i64extend8s: u32,
206    pub i64extend16s: u32,
207    pub i64extend32s: u32,
208    pub i64extendsi32: u32,
209    pub i64extendui32: u32,
210    pub i32wrapi64: u32,
211    pub i64eq: u32,
212    pub i32eq: u32,
213    pub i64ne: u32,
214    pub i32ne: u32,
215    pub i64lts: u32,
216    pub i32lts: u32,
217    pub i64ltu: u32,
218    pub i32ltu: u32,
219    pub i64gts: u32,
220    pub i32gts: u32,
221    pub i64gtu: u32,
222    pub i32gtu: u32,
223    pub i64les: u32,
224    pub i32les: u32,
225    pub i64leu: u32,
226    pub i32leu: u32,
227    pub i64ges: u32,
228    pub i32ges: u32,
229    pub i64geu: u32,
230    pub i32geu: u32,
231    pub i64add: u32,
232    pub i32add: u32,
233    pub i64sub: u32,
234    pub i32sub: u32,
235    pub i64mul: u32,
236    pub i32mul: u32,
237    pub i64divs: u32,
238    pub i32divs: u32,
239    pub i64divu: u32,
240    pub i32divu: u32,
241    pub i64rems: u32,
242    pub i32rems: u32,
243    pub i64remu: u32,
244    pub i32remu: u32,
245    pub i64and: u32,
246    pub i32and: u32,
247    pub i64or: u32,
248    pub i32or: u32,
249    pub i64xor: u32,
250    pub i32xor: u32,
251    pub i64shl: u32,
252    pub i32shl: u32,
253    pub i64shrs: u32,
254    pub i32shrs: u32,
255    pub i64shru: u32,
256    pub i32shru: u32,
257    pub i64rotl: u32,
258    pub i32rotl: u32,
259    pub i64rotr: u32,
260    pub i32rotr: u32,
261}
262
263impl Default for InstructionWeights {
264    fn default() -> Self {
265        Self {
266            version: 2000,
267            i64const: 539,
268            i64load: 4950,
269            i32load: 6194,
270            i64store: 8649,
271            i32store: 9571,
272            select: 2359,
273            r#if: 4660,
274            br: 75,
275            br_if: 2817,
276            br_table: 14024,
277            br_table_per_entry: 101,
278            call: 3113,
279            call_indirect: 31333,
280            call_indirect_per_param: 715,
281            call_per_local: 0,
282            local_get: 766,
283            local_set: 1569,
284            local_tee: 1917,
285            global_get: 647,
286            global_set: 982,
287            memory_current: 342,
288            i64clz: 785,
289            i32clz: 310,
290            i64ctz: 931,
291            i32ctz: 375,
292            i64popcnt: 881,
293            i32popcnt: 394,
294            i64eqz: 1591,
295            i32eqz: 976,
296            i32extend8s: 310,
297            i32extend16s: 321,
298            i64extend8s: 936,
299            i64extend16s: 978,
300            i64extend32s: 680,
301            i64extendsi32: 277,
302            i64extendui32: 226,
303            i32wrapi64: 627,
304            i64eq: 2003,
305            i32eq: 1199,
306            i64ne: 1895,
307            i32ne: 1117,
308            i64lts: 2232,
309            i32lts: 1099,
310            i64ltu: 1793,
311            i32ltu: 1175,
312            i64gts: 1743,
313            i32gts: 1320,
314            i64gtu: 1714,
315            i32gtu: 1052,
316            i64les: 1754,
317            i32les: 1242,
318            i64leu: 2914,
319            i32leu: 1298,
320            i64ges: 2305,
321            i32ges: 1167,
322            i64geu: 1722,
323            i32geu: 1184,
324            i64add: 1062,
325            i32add: 460,
326            i64sub: 1165,
327            i32sub: 439,
328            i64mul: 1240,
329            i32mul: 506,
330            i64divs: 2715,
331            i32divs: 1028,
332            i64divu: 1949,
333            i32divu: 716,
334            i64rems: 8224,
335            i32rems: 5862,
336            i64remu: 2082,
337            i32remu: 898,
338            i64and: 1074,
339            i32and: 422,
340            i64or: 1014,
341            i32or: 540,
342            i64xor: 1688,
343            i32xor: 520,
344            i64shl: 867,
345            i32shl: 497,
346            i64shrs: 939,
347            i32shrs: 407,
348            i64shru: 840,
349            i32shru: 314,
350            i64rotl: 879,
351            i32rotl: 310,
352            i64rotr: 1083,
353            i32rotr: 273,
354        }
355    }
356}
357
358#[derive(Debug, Clone)]
359#[doc = " Describes the weight for each imported function that a program is allowed to call."]
360pub struct SyscallWeights {
361    #[doc = " Weight of calling `alloc`."]
362    pub alloc: Weight,
363    #[doc = " Weight of calling `free`."]
364    pub free: Weight,
365    #[doc = " Weight of calling `free_range`."]
366    pub free_range: Weight,
367    #[doc = " Weight of calling `free_range` per page."]
368    pub free_range_per_page: Weight,
369    #[doc = " Weight of calling `gr_reserve_gas`."]
370    pub gr_reserve_gas: Weight,
371    #[doc = " Weight of calling `gr_unreserve_gas`"]
372    pub gr_unreserve_gas: Weight,
373    #[doc = " Weight of calling `gr_system_reserve_gas`"]
374    pub gr_system_reserve_gas: Weight,
375    #[doc = " Weight of calling `gr_gas_available`."]
376    pub gr_gas_available: Weight,
377    #[doc = " Weight of calling `gr_message_id`."]
378    pub gr_message_id: Weight,
379    #[doc = " Weight of calling `gr_program_id`."]
380    pub gr_program_id: Weight,
381    #[doc = " Weight of calling `gr_source`."]
382    pub gr_source: Weight,
383    #[doc = " Weight of calling `gr_value`."]
384    pub gr_value: Weight,
385    #[doc = " Weight of calling `gr_value_available`."]
386    pub gr_value_available: Weight,
387    #[doc = " Weight of calling `gr_size`."]
388    pub gr_size: Weight,
389    #[doc = " Weight of calling `gr_read`."]
390    pub gr_read: Weight,
391    #[doc = " Weight per payload byte by `gr_read`."]
392    pub gr_read_per_byte: Weight,
393    #[doc = " Weight of calling `gr_env_vars`."]
394    pub gr_env_vars: Weight,
395    #[doc = " Weight of calling `gr_block_height`."]
396    pub gr_block_height: Weight,
397    #[doc = " Weight of calling `gr_block_timestamp`."]
398    pub gr_block_timestamp: Weight,
399    #[doc = " Weight of calling `gr_random`."]
400    pub gr_random: Weight,
401    #[doc = " Weight of calling `gr_reply_deposit`."]
402    pub gr_reply_deposit: Weight,
403    #[doc = " Weight of calling `gr_send`."]
404    pub gr_send: Weight,
405    #[doc = " Weight per payload byte in `gr_send`."]
406    pub gr_send_per_byte: Weight,
407    #[doc = " Weight of calling `gr_send_wgas`."]
408    pub gr_send_wgas: Weight,
409    #[doc = " Weight per payload byte in `gr_send_wgas`."]
410    pub gr_send_wgas_per_byte: Weight,
411    #[doc = " Weight of calling `gr_value_available`."]
412    pub gr_send_init: Weight,
413    #[doc = " Weight of calling `gr_send_push`."]
414    pub gr_send_push: Weight,
415    #[doc = " Weight per payload byte by `gr_send_push`."]
416    pub gr_send_push_per_byte: Weight,
417    #[doc = " Weight of calling `gr_send_commit`."]
418    pub gr_send_commit: Weight,
419    #[doc = " Weight of calling `gr_send_commit_wgas`."]
420    pub gr_send_commit_wgas: Weight,
421    #[doc = " Weight of calling `gr_reservation_send`."]
422    pub gr_reservation_send: Weight,
423    #[doc = " Weight per payload byte in `gr_reservation_send`."]
424    pub gr_reservation_send_per_byte: Weight,
425    #[doc = " Weight of calling `gr_reservation_send_commit`."]
426    pub gr_reservation_send_commit: Weight,
427    #[doc = " Weight of calling `gr_reply_commit`."]
428    pub gr_reply_commit: Weight,
429    #[doc = " Weight of calling `gr_reply_commit_wgas`."]
430    pub gr_reply_commit_wgas: Weight,
431    #[doc = " Weight of calling `gr_reservation_reply`."]
432    pub gr_reservation_reply: Weight,
433    #[doc = " Weight of calling `gr_reservation_reply` per one payload byte."]
434    pub gr_reservation_reply_per_byte: Weight,
435    #[doc = " Weight of calling `gr_reservation_reply_commit`."]
436    pub gr_reservation_reply_commit: Weight,
437    #[doc = " Weight of calling `gr_reply_push`."]
438    pub gr_reply_push: Weight,
439    #[doc = " Weight of calling `gr_reply`."]
440    pub gr_reply: Weight,
441    #[doc = " Weight of calling `gr_reply` per one payload byte."]
442    pub gr_reply_per_byte: Weight,
443    #[doc = " Weight of calling `gr_reply_wgas`."]
444    pub gr_reply_wgas: Weight,
445    #[doc = " Weight of calling `gr_reply_wgas` per one payload byte."]
446    pub gr_reply_wgas_per_byte: Weight,
447    #[doc = " Weight per payload byte by `gr_reply_push`."]
448    pub gr_reply_push_per_byte: Weight,
449    #[doc = " Weight of calling `gr_reply_to`."]
450    pub gr_reply_to: Weight,
451    #[doc = " Weight of calling `gr_signal_code`."]
452    pub gr_signal_code: Weight,
453    #[doc = " Weight of calling `gr_signal_from`."]
454    pub gr_signal_from: Weight,
455    #[doc = " Weight of calling `gr_reply_input`."]
456    pub gr_reply_input: Weight,
457    #[doc = " Weight of calling `gr_reply_input_wgas`."]
458    pub gr_reply_input_wgas: Weight,
459    #[doc = " Weight of calling `gr_reply_push_input`."]
460    pub gr_reply_push_input: Weight,
461    #[doc = " Weight per payload byte by `gr_reply_push_input`."]
462    pub gr_reply_push_input_per_byte: Weight,
463    #[doc = " Weight of calling `gr_send_input`."]
464    pub gr_send_input: Weight,
465    #[doc = " Weight of calling `gr_send_input_wgas`."]
466    pub gr_send_input_wgas: Weight,
467    #[doc = " Weight of calling `gr_send_push_input`."]
468    pub gr_send_push_input: Weight,
469    #[doc = " Weight per payload byte by `gr_send_push_input`."]
470    pub gr_send_push_input_per_byte: Weight,
471    #[doc = " Weight of calling `gr_debug`."]
472    pub gr_debug: Weight,
473    #[doc = " Weight per payload byte by `gr_debug_per_byte`."]
474    pub gr_debug_per_byte: Weight,
475    #[doc = " Weight of calling `gr_reply_code`."]
476    pub gr_reply_code: Weight,
477    #[doc = " Weight of calling `gr_exit`."]
478    pub gr_exit: Weight,
479    #[doc = " Weight of calling `gr_leave`."]
480    pub gr_leave: Weight,
481    #[doc = " Weight of calling `gr_wait`."]
482    pub gr_wait: Weight,
483    #[doc = " Weight of calling `gr_wait_for`."]
484    pub gr_wait_for: Weight,
485    #[doc = " Weight of calling `gr_wait_up_to`."]
486    pub gr_wait_up_to: Weight,
487    #[doc = " Weight of calling `gr_wake`."]
488    pub gr_wake: Weight,
489    #[doc = " Weight of calling `gr_create_program`."]
490    pub gr_create_program: Weight,
491    #[doc = " Weight per payload byte in `gr_create_program`."]
492    pub gr_create_program_payload_per_byte: Weight,
493    #[doc = " Weight per salt byte in `gr_create_program`"]
494    pub gr_create_program_salt_per_byte: Weight,
495    #[doc = " Weight of calling `create_program_wgas`."]
496    pub gr_create_program_wgas: Weight,
497    #[doc = " Weight per payload byte by `create_program_wgas`."]
498    pub gr_create_program_wgas_payload_per_byte: Weight,
499    #[doc = " Weight per salt byte by `create_program_wgas`."]
500    pub gr_create_program_wgas_salt_per_byte: Weight,
501}
502
503impl Default for SyscallWeights {
504    fn default() -> Self {
505        Self {
506            alloc: Weight {
507                ref_time: 1368698,
508                proof_size: 0,
509            },
510            free: Weight {
511                ref_time: 846782,
512                proof_size: 0,
513            },
514            free_range: Weight {
515                ref_time: 873826,
516                proof_size: 0,
517            },
518            free_range_per_page: Weight {
519                ref_time: 35668,
520                proof_size: 0,
521            },
522            gr_reserve_gas: Weight {
523                ref_time: 1918172,
524                proof_size: 0,
525            },
526            gr_unreserve_gas: Weight {
527                ref_time: 1873602,
528                proof_size: 0,
529            },
530            gr_system_reserve_gas: Weight {
531                ref_time: 974566,
532                proof_size: 0,
533            },
534            gr_gas_available: Weight {
535                ref_time: 959492,
536                proof_size: 0,
537            },
538            gr_message_id: Weight {
539                ref_time: 970380,
540                proof_size: 0,
541            },
542            gr_program_id: Weight {
543                ref_time: 951514,
544                proof_size: 0,
545            },
546            gr_source: Weight {
547                ref_time: 959814,
548                proof_size: 0,
549            },
550            gr_value: Weight {
551                ref_time: 936151,
552                proof_size: 0,
553            },
554            gr_value_available: Weight {
555                ref_time: 984048,
556                proof_size: 0,
557            },
558            gr_size: Weight {
559                ref_time: 962155,
560                proof_size: 0,
561            },
562            gr_read: Weight {
563                ref_time: 1406423,
564                proof_size: 0,
565            },
566            gr_read_per_byte: Weight {
567                ref_time: 162,
568                proof_size: 0,
569            },
570            gr_env_vars: Weight {
571                ref_time: 992225,
572                proof_size: 0,
573            },
574            gr_block_height: Weight {
575                ref_time: 1001754,
576                proof_size: 0,
577            },
578            gr_block_timestamp: Weight {
579                ref_time: 960966,
580                proof_size: 0,
581            },
582            gr_random: Weight {
583                ref_time: 1668151,
584                proof_size: 0,
585            },
586            gr_reply_deposit: Weight {
587                ref_time: 4133750,
588                proof_size: 0,
589            },
590            gr_send: Weight {
591                ref_time: 2467510,
592                proof_size: 0,
593            },
594            gr_send_per_byte: Weight {
595                ref_time: 302,
596                proof_size: 0,
597            },
598            gr_send_wgas: Weight {
599                ref_time: 2504950,
600                proof_size: 0,
601            },
602            gr_send_wgas_per_byte: Weight {
603                ref_time: 300,
604                proof_size: 0,
605            },
606            gr_send_init: Weight {
607                ref_time: 1078023,
608                proof_size: 0,
609            },
610            gr_send_push: Weight {
611                ref_time: 1755035,
612                proof_size: 0,
613            },
614            gr_send_push_per_byte: Weight {
615                ref_time: 302,
616                proof_size: 0,
617            },
618            gr_send_commit: Weight {
619                ref_time: 1938302,
620                proof_size: 0,
621            },
622            gr_send_commit_wgas: Weight {
623                ref_time: 2033886,
624                proof_size: 0,
625            },
626            gr_reservation_send: Weight {
627                ref_time: 2917265,
628                proof_size: 0,
629            },
630            gr_reservation_send_per_byte: Weight {
631                ref_time: 304,
632                proof_size: 0,
633            },
634            gr_reservation_send_commit: Weight {
635                ref_time: 2398214,
636                proof_size: 0,
637            },
638            gr_reply_commit: Weight {
639                ref_time: 24565346,
640                proof_size: 0,
641            },
642            gr_reply_commit_wgas: Weight {
643                ref_time: 26699262,
644                proof_size: 0,
645            },
646            gr_reservation_reply: Weight {
647                ref_time: 15622176,
648                proof_size: 0,
649            },
650            gr_reservation_reply_per_byte: Weight {
651                ref_time: 511,
652                proof_size: 0,
653            },
654            gr_reservation_reply_commit: Weight {
655                ref_time: 9866788,
656                proof_size: 0,
657            },
658            gr_reply_push: Weight {
659                ref_time: 1530857,
660                proof_size: 0,
661            },
662            gr_reply: Weight {
663                ref_time: 26327624,
664                proof_size: 0,
665            },
666            gr_reply_per_byte: Weight {
667                ref_time: 503,
668                proof_size: 0,
669            },
670            gr_reply_wgas: Weight {
671                ref_time: 24633378,
672                proof_size: 0,
673            },
674            gr_reply_wgas_per_byte: Weight {
675                ref_time: 513,
676                proof_size: 0,
677            },
678            gr_reply_push_per_byte: Weight {
679                ref_time: 504,
680                proof_size: 0,
681            },
682            gr_reply_to: Weight {
683                ref_time: 1046085,
684                proof_size: 0,
685            },
686            gr_signal_code: Weight {
687                ref_time: 1038509,
688                proof_size: 0,
689            },
690            gr_signal_from: Weight {
691                ref_time: 1017360,
692                proof_size: 0,
693            },
694            gr_reply_input: Weight {
695                ref_time: 33962090,
696                proof_size: 0,
697            },
698            gr_reply_input_wgas: Weight {
699                ref_time: 41166482,
700                proof_size: 0,
701            },
702            gr_reply_push_input: Weight {
703                ref_time: 1118619,
704                proof_size: 0,
705            },
706            gr_reply_push_input_per_byte: Weight {
707                ref_time: 105,
708                proof_size: 0,
709            },
710            gr_send_input: Weight {
711                ref_time: 2369529,
712                proof_size: 0,
713            },
714            gr_send_input_wgas: Weight {
715                ref_time: 2455528,
716                proof_size: 0,
717            },
718            gr_send_push_input: Weight {
719                ref_time: 1270244,
720                proof_size: 0,
721            },
722            gr_send_push_input_per_byte: Weight {
723                ref_time: 93,
724                proof_size: 0,
725            },
726            gr_debug: Weight {
727                ref_time: 1056804,
728                proof_size: 0,
729            },
730            gr_debug_per_byte: Weight {
731                ref_time: 280,
732                proof_size: 0,
733            },
734            gr_reply_code: Weight {
735                ref_time: 1002478,
736                proof_size: 0,
737            },
738            gr_exit: Weight {
739                ref_time: 17513156,
740                proof_size: 0,
741            },
742            gr_leave: Weight {
743                ref_time: 7935870,
744                proof_size: 0,
745            },
746            gr_wait: Weight {
747                ref_time: 9248904,
748                proof_size: 0,
749            },
750            gr_wait_for: Weight {
751                ref_time: 9231352,
752                proof_size: 0,
753            },
754            gr_wait_up_to: Weight {
755                ref_time: 7345560,
756                proof_size: 0,
757            },
758            gr_wake: Weight {
759                ref_time: 2359007,
760                proof_size: 0,
761            },
762            gr_create_program: Weight {
763                ref_time: 3057045,
764                proof_size: 0,
765            },
766            gr_create_program_payload_per_byte: Weight {
767                ref_time: 226,
768                proof_size: 0,
769            },
770            gr_create_program_salt_per_byte: Weight {
771                ref_time: 1227,
772                proof_size: 0,
773            },
774            gr_create_program_wgas: Weight {
775                ref_time: 3158869,
776                proof_size: 0,
777            },
778            gr_create_program_wgas_payload_per_byte: Weight {
779                ref_time: 239,
780                proof_size: 0,
781            },
782            gr_create_program_wgas_salt_per_byte: Weight {
783                ref_time: 1238,
784                proof_size: 0,
785            },
786        }
787    }
788}
789
790#[derive(Debug, Clone)]
791#[doc = " Describes the weight for memory interaction."]
792#[doc = ""]
793#[doc = " Each weight with `lazy_pages_` prefix includes weight for storage read,"]
794#[doc = " because for each first page access we need to at least check whether page exists in storage."]
795#[doc = " But they do not include cost for loading page data from storage into program memory."]
796#[doc = " This weight is taken in account separately, when loading occurs."]
797#[doc = ""]
798#[doc = " Lazy-pages write accesses does not include cost for uploading page data to storage,"]
799#[doc = " because uploading happens after execution, so benchmarks do not include this cost."]
800#[doc = " But they include cost for processing changed page data in runtime."]
801pub struct MemoryWeights {
802    #[doc = " Cost per one [GearPage] signal `read` processing in lazy-pages,"]
803    pub lazy_pages_signal_read: Weight,
804    #[doc = " Cost per one [GearPage] signal `write` processing in lazy-pages,"]
805    pub lazy_pages_signal_write: Weight,
806    #[doc = " Cost per one [GearPage] signal `write after read` processing in lazy-pages,"]
807    pub lazy_pages_signal_write_after_read: Weight,
808    #[doc = " Cost per one [GearPage] host func `read` access processing in lazy-pages,"]
809    pub lazy_pages_host_func_read: Weight,
810    #[doc = " Cost per one [GearPage] host func `write` access processing in lazy-pages,"]
811    pub lazy_pages_host_func_write: Weight,
812    #[doc = " Cost per one [GearPage] host func `write after read` access processing in lazy-pages,"]
813    pub lazy_pages_host_func_write_after_read: Weight,
814    #[doc = " Cost per one [GearPage] data loading from storage and moving it in program memory."]
815    #[doc = " Does not include cost for storage read, because it is taken in account separately."]
816    pub load_page_data: Weight,
817    #[doc = " Cost per one [GearPage] uploading data to storage."]
818    #[doc = " Does not include cost for processing changed page data in runtime,"]
819    #[doc = " cause it is taken in account separately."]
820    pub upload_page_data: Weight,
821    #[doc = " Cost per one [WasmPage] for memory growing."]
822    pub mem_grow: Weight,
823    #[doc = " Cost per one [WasmPage] for memory growing."]
824    pub mem_grow_per_page: Weight,
825    #[doc = " Cost per one [GearPage]."]
826    #[doc = " When we read page data from storage in para-chain, then it should be sent to relay-chain,"]
827    #[doc = " in order to use it for process queue execution. So, reading from storage cause"]
828    #[doc = " additional resources consumption after block(s) production on para-chain."]
829    pub parachain_read_heuristic: Weight,
830}
831
832impl Default for MemoryWeights {
833    fn default() -> Self {
834        Self {
835            lazy_pages_signal_read: Weight {
836                ref_time: 28491385,
837                proof_size: 0,
838            },
839            lazy_pages_signal_write: Weight {
840                ref_time: 34056454,
841                proof_size: 0,
842            },
843            lazy_pages_signal_write_after_read: Weight {
844                ref_time: 9410406,
845                proof_size: 0,
846            },
847            lazy_pages_host_func_read: Weight {
848                ref_time: 29807270,
849                proof_size: 0,
850            },
851            lazy_pages_host_func_write: Weight {
852                ref_time: 35496571,
853                proof_size: 0,
854            },
855            lazy_pages_host_func_write_after_read: Weight {
856                ref_time: 10638755,
857                proof_size: 0,
858            },
859            load_page_data: Weight {
860                ref_time: 10014933,
861                proof_size: 0,
862            },
863            upload_page_data: Weight {
864                ref_time: 102822864,
865                proof_size: 0,
866            },
867            mem_grow: Weight {
868                ref_time: 611771,
869                proof_size: 0,
870            },
871            mem_grow_per_page: Weight {
872                ref_time: 23,
873                proof_size: 0,
874            },
875            parachain_read_heuristic: Weight {
876                ref_time: 0,
877                proof_size: 0,
878            },
879        }
880    }
881}
882
883#[derive(Debug, Clone)]
884#[doc = " Describes the weight for instantiation of the module."]
885pub struct InstantiationWeights {
886    #[doc = " WASM module code section instantiation per byte cost."]
887    pub code_section_per_byte: Weight,
888    #[doc = " WASM module data section instantiation per byte cost."]
889    pub data_section_per_byte: Weight,
890    #[doc = " WASM module global section instantiation per byte cost."]
891    pub global_section_per_byte: Weight,
892    #[doc = " WASM module table section instantiation per byte cost."]
893    pub table_section_per_byte: Weight,
894    #[doc = " WASM module element section instantiation per byte cost."]
895    pub element_section_per_byte: Weight,
896    #[doc = " WASM module type section instantiation per byte cost."]
897    pub type_section_per_byte: Weight,
898}
899
900impl Default for InstantiationWeights {
901    fn default() -> Self {
902        Self {
903            code_section_per_byte: Weight {
904                ref_time: 368,
905                proof_size: 0,
906            },
907            data_section_per_byte: Weight {
908                ref_time: 616,
909                proof_size: 0,
910            },
911            global_section_per_byte: Weight {
912                ref_time: 1361,
913                proof_size: 0,
914            },
915            table_section_per_byte: Weight {
916                ref_time: 574,
917                proof_size: 0,
918            },
919            element_section_per_byte: Weight {
920                ref_time: 222,
921                proof_size: 0,
922            },
923            type_section_per_byte: Weight {
924                ref_time: 1056,
925                proof_size: 0,
926            },
927        }
928    }
929}
930
931#[derive(Debug, Clone)]
932#[doc = " Describes the weight for renting."]
933pub struct RentWeights {
934    #[doc = " Holding message in waitlist weight."]
935    pub waitlist: Weight,
936    #[doc = " Holding message in dispatch stash weight."]
937    pub dispatch_stash: Weight,
938    #[doc = " Holding reservation weight."]
939    pub reservation: Weight,
940    #[doc = " Holding message in mailbox weight."]
941    pub mailbox: Weight,
942    #[doc = " The minimal gas amount for message to be inserted in mailbox."]
943    pub mailbox_threshold: Weight,
944}
945
946impl Default for RentWeights {
947    fn default() -> Self {
948        Self {
949            waitlist: Weight {
950                ref_time: 100,
951                proof_size: 0,
952            },
953            dispatch_stash: Weight {
954                ref_time: 100,
955                proof_size: 0,
956            },
957            reservation: Weight {
958                ref_time: 100,
959                proof_size: 0,
960            },
961            mailbox: Weight {
962                ref_time: 100,
963                proof_size: 0,
964            },
965            mailbox_threshold: Weight {
966                ref_time: 3000,
967                proof_size: 0,
968            },
969        }
970    }
971}
972
973#[derive(Debug, Clone)]
974#[doc = " Describes DB access weights."]
975pub struct DbWeights {
976    pub read: Weight,
977    pub read_per_byte: Weight,
978    pub write: Weight,
979    pub write_per_byte: Weight,
980}
981
982impl Default for DbWeights {
983    fn default() -> Self {
984        Self {
985            read: Weight {
986                ref_time: 25000000,
987                proof_size: 0,
988            },
989            read_per_byte: Weight {
990                ref_time: 501,
991                proof_size: 0,
992            },
993            write: Weight {
994                ref_time: 100000000,
995                proof_size: 0,
996            },
997            write_per_byte: Weight {
998                ref_time: 172,
999                proof_size: 0,
1000            },
1001        }
1002    }
1003}
1004
1005#[derive(Debug, Clone)]
1006#[doc = " Describes weights for running tasks."]
1007pub struct TaskWeights {
1008    pub remove_gas_reservation: Weight,
1009    pub send_user_message_to_mailbox: Weight,
1010    pub send_user_message: Weight,
1011    pub send_dispatch: Weight,
1012    pub wake_message: Weight,
1013    pub wake_message_no_wake: Weight,
1014    pub remove_from_waitlist: Weight,
1015    pub remove_from_mailbox: Weight,
1016}
1017
1018impl Default for TaskWeights {
1019    fn default() -> Self {
1020        Self {
1021            remove_gas_reservation: Weight {
1022                ref_time: 941085000,
1023                proof_size: 6196,
1024            },
1025            send_user_message_to_mailbox: Weight {
1026                ref_time: 699873000,
1027                proof_size: 4290,
1028            },
1029            send_user_message: Weight {
1030                ref_time: 1457731000,
1031                proof_size: 6196,
1032            },
1033            send_dispatch: Weight {
1034                ref_time: 809788000,
1035                proof_size: 4126,
1036            },
1037            wake_message: Weight {
1038                ref_time: 850858000,
1039                proof_size: 4371,
1040            },
1041            wake_message_no_wake: Weight {
1042                ref_time: 30460000,
1043                proof_size: 3545,
1044            },
1045            remove_from_waitlist: Weight {
1046                ref_time: 1884961000,
1047                proof_size: 7561,
1048            },
1049            remove_from_mailbox: Weight {
1050                ref_time: 1841478000,
1051                proof_size: 7321,
1052            },
1053        }
1054    }
1055}
1056
1057#[derive(Debug, Clone)]
1058#[doc = " Describes WASM code instrumentation weights."]
1059pub struct InstrumentationWeights {
1060    #[doc = " WASM code instrumentation base cost."]
1061    pub base: Weight,
1062    #[doc = " WASM code instrumentation per-byte cost."]
1063    pub per_byte: Weight,
1064}
1065
1066impl Default for InstrumentationWeights {
1067    fn default() -> Self {
1068        Self {
1069            base: Weight {
1070                ref_time: 282459000,
1071                proof_size: 3760,
1072            },
1073            per_byte: Weight {
1074                ref_time: 508124,
1075                proof_size: 0,
1076            },
1077        }
1078    }
1079}
1080
1081#[doc = r" Represents the computational time and storage space required for an operation."]
1082#[derive(Debug, Clone, Copy)]
1083pub struct Weight {
1084    #[doc = r" The weight of computational time used based on some reference hardware."]
1085    pub ref_time: u64,
1086    #[doc = r" The weight of storage space used by proof of validity."]
1087    pub proof_size: u64,
1088}
1089
1090impl Weight {
1091    #[doc = r" Return the reference time part of the weight."]
1092    #[doc(hidden)]
1093    pub const fn ref_time(&self) -> u64 {
1094        self.ref_time
1095    }
1096    #[doc = r" Saturating [`Weight`] addition. Computes `self + rhs`, saturating at the numeric bounds of"]
1097    #[doc = r" all fields instead of overflowing."]
1098    #[doc(hidden)]
1099    pub const fn saturating_add(&self, other: Self) -> Self {
1100        Self {
1101            ref_time: self.ref_time.saturating_add(other.ref_time),
1102            proof_size: self.proof_size.saturating_add(other.proof_size),
1103        }
1104    }
1105}
1106
1107impl From<InstrumentationWeights> for InstrumentationCosts {
1108    fn from(val: InstrumentationWeights) -> Self {
1109        Self {
1110            base: val.base.ref_time().into(),
1111            per_byte: val.per_byte.ref_time().into(),
1112        }
1113    }
1114}
1115
1116impl From<SyscallWeights> for SyscallCosts {
1117    fn from(val: SyscallWeights) -> Self {
1118        Self {
1119            alloc: val.alloc.ref_time().into(),
1120            free: val.free.ref_time().into(),
1121            free_range: val.free_range.ref_time().into(),
1122            free_range_per_page: val.free_range_per_page.ref_time().into(),
1123            gr_reserve_gas: val.gr_reserve_gas.ref_time().into(),
1124            gr_unreserve_gas: val.gr_unreserve_gas.ref_time().into(),
1125            gr_system_reserve_gas: val.gr_system_reserve_gas.ref_time().into(),
1126            gr_gas_available: val.gr_gas_available.ref_time().into(),
1127            gr_message_id: val.gr_message_id.ref_time().into(),
1128            gr_program_id: val.gr_program_id.ref_time().into(),
1129            gr_source: val.gr_source.ref_time().into(),
1130            gr_value: val.gr_value.ref_time().into(),
1131            gr_value_available: val.gr_value_available.ref_time().into(),
1132            gr_size: val.gr_size.ref_time().into(),
1133            gr_read: val.gr_read.ref_time().into(),
1134            gr_read_per_byte: val.gr_read_per_byte.ref_time().into(),
1135            gr_env_vars: val.gr_env_vars.ref_time().into(),
1136            gr_block_height: val.gr_block_height.ref_time().into(),
1137            gr_block_timestamp: val.gr_block_timestamp.ref_time().into(),
1138            gr_random: val.gr_random.ref_time().into(),
1139            gr_reply_deposit: val.gr_reply_deposit.ref_time().into(),
1140            gr_send: val.gr_send.ref_time().into(),
1141            gr_send_per_byte: val.gr_send_per_byte.ref_time().into(),
1142            gr_send_wgas: val.gr_send_wgas.ref_time().into(),
1143            gr_send_wgas_per_byte: val.gr_send_wgas_per_byte.ref_time().into(),
1144            gr_send_init: val.gr_send_init.ref_time().into(),
1145            gr_send_push: val.gr_send_push.ref_time().into(),
1146            gr_send_push_per_byte: val.gr_send_push_per_byte.ref_time().into(),
1147            gr_send_commit: val.gr_send_commit.ref_time().into(),
1148            gr_send_commit_wgas: val.gr_send_commit_wgas.ref_time().into(),
1149            gr_reservation_send: val.gr_reservation_send.ref_time().into(),
1150            gr_reservation_send_per_byte: val.gr_reservation_send_per_byte.ref_time().into(),
1151            gr_reservation_send_commit: val.gr_reservation_send_commit.ref_time().into(),
1152            gr_send_input: val.gr_send_input.ref_time().into(),
1153            gr_send_input_wgas: val.gr_send_input_wgas.ref_time().into(),
1154            gr_send_push_input: val.gr_send_push_input.ref_time().into(),
1155            gr_send_push_input_per_byte: val.gr_send_push_input_per_byte.ref_time().into(),
1156            gr_reply: val.gr_reply.ref_time().into(),
1157            gr_reply_per_byte: val.gr_reply_per_byte.ref_time().into(),
1158            gr_reply_wgas: val.gr_reply_wgas.ref_time().into(),
1159            gr_reply_wgas_per_byte: val.gr_reply_wgas_per_byte.ref_time().into(),
1160            gr_reply_push: val.gr_reply_push.ref_time().into(),
1161            gr_reply_push_per_byte: val.gr_reply_push_per_byte.ref_time().into(),
1162            gr_reply_commit: val.gr_reply_commit.ref_time().into(),
1163            gr_reply_commit_wgas: val.gr_reply_commit_wgas.ref_time().into(),
1164            gr_reservation_reply: val.gr_reservation_reply.ref_time().into(),
1165            gr_reservation_reply_per_byte: val.gr_reservation_reply_per_byte.ref_time().into(),
1166            gr_reservation_reply_commit: val.gr_reservation_reply_commit.ref_time().into(),
1167            gr_reply_input: val.gr_reply_input.ref_time().into(),
1168            gr_reply_input_wgas: val.gr_reply_input_wgas.ref_time().into(),
1169            gr_reply_push_input: val.gr_reply_push_input.ref_time().into(),
1170            gr_reply_push_input_per_byte: val.gr_reply_push_input_per_byte.ref_time().into(),
1171            gr_debug: val.gr_debug.ref_time().into(),
1172            gr_debug_per_byte: val.gr_debug_per_byte.ref_time().into(),
1173            gr_reply_to: val.gr_reply_to.ref_time().into(),
1174            gr_signal_code: val.gr_signal_code.ref_time().into(),
1175            gr_signal_from: val.gr_signal_from.ref_time().into(),
1176            gr_reply_code: val.gr_reply_code.ref_time().into(),
1177            gr_exit: val.gr_exit.ref_time().into(),
1178            gr_leave: val.gr_leave.ref_time().into(),
1179            gr_wait: val.gr_wait.ref_time().into(),
1180            gr_wait_for: val.gr_wait_for.ref_time().into(),
1181            gr_wait_up_to: val.gr_wait_up_to.ref_time().into(),
1182            gr_wake: val.gr_wake.ref_time().into(),
1183            gr_create_program: val.gr_create_program.ref_time().into(),
1184            gr_create_program_payload_per_byte: val
1185                .gr_create_program_payload_per_byte
1186                .ref_time()
1187                .into(),
1188            gr_create_program_salt_per_byte: val.gr_create_program_salt_per_byte.ref_time().into(),
1189            gr_create_program_wgas: val.gr_create_program_wgas.ref_time().into(),
1190            gr_create_program_wgas_payload_per_byte: val
1191                .gr_create_program_wgas_payload_per_byte
1192                .ref_time()
1193                .into(),
1194            gr_create_program_wgas_salt_per_byte: val
1195                .gr_create_program_wgas_salt_per_byte
1196                .ref_time()
1197                .into(),
1198        }
1199    }
1200}
1201
1202impl From<MemoryWeights> for IoCosts {
1203    fn from(val: MemoryWeights) -> Self {
1204        Self {
1205            common: PagesCosts::from(val.clone()),
1206            lazy_pages: LazyPagesCosts::from(val),
1207        }
1208    }
1209}
1210
1211impl From<MemoryWeights> for PagesCosts {
1212    fn from(val: MemoryWeights) -> Self {
1213        Self {
1214            load_page_data: val.load_page_data.ref_time().into(),
1215            upload_page_data: val.upload_page_data.ref_time().into(),
1216            mem_grow: val.mem_grow.ref_time().into(),
1217            mem_grow_per_page: val.mem_grow_per_page.ref_time().into(),
1218            parachain_read_heuristic: val.parachain_read_heuristic.ref_time().into(),
1219        }
1220    }
1221}
1222
1223impl From<MemoryWeights> for LazyPagesCosts {
1224    fn from(val: MemoryWeights) -> Self {
1225        Self {
1226            signal_read: val.lazy_pages_signal_read.ref_time().into(),
1227            signal_write: val
1228                .lazy_pages_signal_write
1229                .saturating_add(val.upload_page_data)
1230                .ref_time()
1231                .into(),
1232            signal_write_after_read: val
1233                .lazy_pages_signal_write_after_read
1234                .saturating_add(val.upload_page_data)
1235                .ref_time()
1236                .into(),
1237            host_func_read: val.lazy_pages_host_func_read.ref_time().into(),
1238            host_func_write: val
1239                .lazy_pages_host_func_write
1240                .saturating_add(val.upload_page_data)
1241                .ref_time()
1242                .into(),
1243            host_func_write_after_read: val
1244                .lazy_pages_host_func_write_after_read
1245                .saturating_add(val.upload_page_data)
1246                .ref_time()
1247                .into(),
1248            load_page_storage_data: val
1249                .load_page_data
1250                .saturating_add(val.parachain_read_heuristic)
1251                .ref_time()
1252                .into(),
1253        }
1254    }
1255}
1256
1257impl From<RentWeights> for RentCosts {
1258    fn from(val: RentWeights) -> Self {
1259        Self {
1260            waitlist: val.waitlist.ref_time().into(),
1261            dispatch_stash: val.dispatch_stash.ref_time().into(),
1262            reservation: val.reservation.ref_time().into(),
1263        }
1264    }
1265}
1266
1267impl From<DbWeights> for DbCosts {
1268    fn from(val: DbWeights) -> Self {
1269        Self {
1270            write: val.write.ref_time().into(),
1271            read: val.read.ref_time().into(),
1272            write_per_byte: val.write_per_byte.ref_time().into(),
1273            read_per_byte: val.read_per_byte.ref_time().into(),
1274        }
1275    }
1276}
1277
1278impl From<InstantiationWeights> for InstantiationCosts {
1279    fn from(val: InstantiationWeights) -> Self {
1280        Self {
1281            code_section_per_byte: val.code_section_per_byte.ref_time().into(),
1282            data_section_per_byte: val.data_section_per_byte.ref_time().into(),
1283            global_section_per_byte: val.global_section_per_byte.ref_time().into(),
1284            table_section_per_byte: val.table_section_per_byte.ref_time().into(),
1285            element_section_per_byte: val.element_section_per_byte.ref_time().into(),
1286            type_section_per_byte: val.type_section_per_byte.ref_time().into(),
1287        }
1288    }
1289}
1290
1291impl Schedule {
1292    pub fn process_costs(&self) -> ProcessCosts {
1293        ProcessCosts {
1294            ext: ExtCosts {
1295                syscalls: self.syscall_weights.clone().into(),
1296                rent: self.rent_weights.clone().into(),
1297                mem_grow: self.memory_weights.mem_grow.ref_time().into(),
1298                mem_grow_per_page: self.memory_weights.mem_grow_per_page.ref_time().into(),
1299            },
1300            db: self.db_weights.clone().into(),
1301            instrumentation: self.instrumentation_weights.clone().into(),
1302            lazy_pages: self.memory_weights.clone().into(),
1303            instantiation: self.instantiation_weights.clone().into(),
1304            load_allocations_per_interval: self.load_allocations_weight.ref_time().into(),
1305        }
1306    }
1307}