Open luc-blaeser opened 1 month ago
Comparing from 247aa056afe9d5499f9f79d78d6d38117b8478ae to cd60245b38e067b3c68676b5230a928161646f5c: In terms of gas, no changes are observed in 5 tests. In terms of size, 5 tests regressed and the mean change is +0.1%.
Thank you for the review, Claudio!
Also support
Prim.rts_upgrade_instructions()
on classical persistence, to inspect the instructions consumed by the last upgrade (including stabilization plus destabilization) for performance measurements. This functionality is already supported with enhanced orthogonal persistence.Mechanism
Prim.rts_upgrade_instructions()
returns the sum of those costs.Backwards Compatibility
The record of upgrade instructions is optional in the stable memory. This is to ensure backwards compatibility to older Motoko programs that do not record this information. When upgrading from such an older Motoko program,
Prim.rts_upgrade_instructions()
returnsNat64.maximumValue
.Notes
Prim.rts_upgrade_instructions()
currently returns >0 after installation because some upgrade check needs to be performed there too.Prim
is only intended for internal use.