module Ecluse.Core.Server.MemoryModel (
expandWireBytes,
chargeForResident,
mirrorJobEstimatedBytes,
) where
expandWireBytes :: Int -> Int
expandWireBytes :: Int -> Int
expandWireBytes Int
wireBytes = Int
wireBytes Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
residentRatioNumerator Int -> Int -> Int
forall a. Integral a => a -> a -> a
`div` Int
residentRatioDenominator
chargeForResident :: Int -> Int
chargeForResident :: Int -> Int
chargeForResident Int
resident = (Int
resident Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
residentRatioDenominator Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
residentRatioNumerator Int -> Int -> Int
forall a. Num a => a -> a -> a
- Int
1) Int -> Int -> Int
forall a. Integral a => a -> a -> a
`div` Int
residentRatioNumerator
residentRatioNumerator :: Int
residentRatioNumerator :: Int
residentRatioNumerator = Int
15
residentRatioDenominator :: Int
residentRatioDenominator :: Int
residentRatioDenominator = Int
2
mirrorJobEstimatedBytes :: Int
mirrorJobEstimatedBytes :: Int
mirrorJobEstimatedBytes = Int
1024