Good day, everyone! Can somebody explain how I can calculate or forecast of my contract CPU usage in mainnet on some period? I want to understand the process of identification the factors that define real values of cpu bandwith in the future.
As far as i know, You cannot calculate exactly CPU usage. With the same transaction will have different cost depending on BPs and network condition.
But you can forecast your CPU usage in smart contract by estimate how many transactions and how much does it costs for these transactions.
Example: You Dapp will have 100 transaction/day, CPU usage average ~ 1ms/transaction. --> This mean, you need 100ms CPU/day
More detail, you can refer here https://medium.com/leclevietnam/eos-resource-allocation-98bb6cb84497
You can now estimate your costs for a transaction by using EOS New York's EOS Charge.
There is a MongoDB query that runs hourly. This query averages the CPU and NET resource costs experienced for every action performed on the EOS Mainnet within the last 100,000 blocks