Closed skunert closed 1 year ago
In general, can you not just recreate the backend? As we do in the Substrate based benchmarks. Then you don't need this function.
You mean like here? https://github.com/paritytech/substrate/blob/da604f1777df6a79ad787f2d960309ffeb9dd68c/client/db/benches/state_access.rs#L212
The substrate benchmarks reset the backend once for each benchmark. For my purposes I want to reset per iteration, so I would need to create a whole new client (not only backend) for each iteration. Being able to reset the trie cache seemed like the more elegant option here. But if you prefer I can look into that.
bot merge
Waiting for commit status.
Merge cancelled due to error. Error: Statuses failed for efaeb51ddb97a26556773e075de1c15da77d4836
I have some benchmarks in cumulus where I want to reset the trie cache in between runs.