Use CLI to configure max instances cache (#5177)

* Use CLI to configure max instances cache

* Fix tests

* Move default value into CLI

* Use SmallVec

* Apply review comments

* Get rid of `SmallVec`

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Stanislav Tkach
2020-03-11 10:43:37 +02:00
committed by GitHub
parent f21680209f
commit 93ee3104e7
23 changed files with 139 additions and 71 deletions
+2 -1
View File
@@ -170,7 +170,8 @@ fn bench_execute_block(c: &mut Criterion) {
ExecutionMethod::Native => (true, WasmExecutionMethod::Interpreted),
ExecutionMethod::Wasm(wasm_method) => (false, *wasm_method),
};
let executor = NativeExecutor::new(wasm_method, None);
let executor = NativeExecutor::new(wasm_method, None, 8);
let runtime_code = RuntimeCode {
code_fetcher: &sp_core::traits::WrappedRuntimeCode(COMPACT_CODE.into()),
hash: vec![1, 2, 3],
+1 -1
View File
@@ -58,7 +58,7 @@ pub fn from_block_number(n: u32) -> Header {
}
pub fn executor() -> NativeExecutor<Executor> {
NativeExecutor::new(WasmExecutionMethod::Interpreted, None)
NativeExecutor::new(WasmExecutionMethod::Interpreted, None, 8)
}
pub fn executor_call<