near-cli icon indicating copy to clipboard operation
near-cli copied to clipboard

Run profiler with remote state and contract

Open ilblackdragon opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. Usually for profiling, developer wants to use an existing contract with some pre-existing state. For example from Testnet.

Describe the solution you'd like Add profile option to near-cli for developers:

export NEAR_ENV=<network>
near profile <contract_name> <method_name> <args>

This can pull the contract and state via RPC and leverage https://github.com/nearprotocol/nearcore/pull/3038 to run the profiler and output the profile.

Describe alternatives you've considered Alternative is that this option should be added to the runtime standalone. But developers are getting familiar with near tool so it could be good to leave it within familiar context.

ilblackdragon avatar Aug 17 '20 12:08 ilblackdragon

Profiler just got merged, so feel free to use it.

olonho avatar Aug 19 '20 11:08 olonho