pub fn freeze_threshold_cycles(
        &self,
        system_state: &SystemState,
        memory_usage: NumBytes,
        compute_allocation: ComputeAllocation,
    ) -> Cycles {
        let one_gib = 1 << 30;

        let memory_fee = {
            let memory = match system_state.memory_allocation {
                MemoryAllocation::Reserved(bytes) => bytes,
                MemoryAllocation::BestEffort => memory_usage,
            };
            Cycles::from(
                (memory.get() as u128
                    * self.config.gib_storage_per_second_fee.get()
                    * system_state.freeze_threshold.get() as u128)
                    / one_gib,
            )
        };

        let compute_fee = {
            Cycles::from(
                compute_allocation.as_percent() as u128
                    * self.config.compute_percent_allocated_per_second_fee.get()
                    * system_state.freeze_threshold.get() as u128,
            )
        };

        memory_fee + compute_fee
    }
/// Returns the freezing threshold for this canister in Cycles.
Returns the freezing threshold for this canister in Cycles.
Returns the freezing threshold for this canister in Cycles .
pub fn freeze_threshold_cycles(
        &self,
        system_state: &SystemState,
        memory_usage: NumBytes,
        compute_allocation: ComputeAllocation,
    ) -> Cycles {
        let one_gib = 1 << 30;
        let memory_fee = {
            let memory = match system_state.memory_allocation {
                MemoryAllocation::Reserved(bytes) => bytes,
                MemoryAllocation::BestEffort => memory_usage,
            };
            Cycles::from(
                (memory.get() as u128
                    * self.config.gib_storage_per_second_fee.get()
                    * system_state.freeze_threshold.get() as u128)
                    / one_gib,
            )
        };
        let compute_fee = {
            Cycles::from(
                compute_allocation.as_percent() as u128
                    * self.config.compute_percent_allocated_per_second_fee.get()
                    * system_state.freeze_threshold.get() as u128,
            )
        };
        memory_fee + compute_fee
    }
pub fn freeze_threshold_cycles ( & self , system_state : & SystemState , memory_usage : NumBytes , compute_allocation : ComputeAllocation , ) -> Cycles { let one_gib = 1 << 30 ; let memory_fee = { let memory = match system_state . memory_allocation { MemoryAllocation :: Reserved ( bytes ) => bytes , MemoryAllocation :: BestEffort => memory_usage , } ; Cycles :: from ( ( memory . get ( ) as u128 * self . config . gib_storage_per_second_fee . get ( ) * system_state . freeze_threshold . get ( ) as u128 ) / one_gib , ) } ; let compute_fee = { Cycles :: from ( compute_allocation . as_percent ( ) as u128 * self . config . compute_percent_allocated_per_second_fee . get ( ) * system_state . freeze_threshold . get ( ) as u128 , ) } ; memory_fee + compute_fee }
Returns the freezing threshold for this canister in Cycles.
Returns the freezing threshold for this canister in Cycles .
&self
system_state
&SystemState
memory_usage
NumBytes
compute_allocation
ComputeAllocation
&self
system_state
&SystemState
memory_usage
NumBytes
compute_allocation
ComputeAllocation