()
| 85 | } |
| 86 | |
| 87 | fn test_setup() -> (Engine, Module) { |
| 88 | // We only expect to create one Instance at a time, with a single memory. |
| 89 | let pool_count = 10; |
| 90 | |
| 91 | let mut pool = PoolingAllocationConfig::default(); |
| 92 | pool.total_memories(pool_count) |
| 93 | .total_stacks(pool_count) |
| 94 | .total_tables(pool_count); |
| 95 | let mut config = Config::new(); |
| 96 | config.allocation_strategy(InstanceAllocationStrategy::Pooling(pool)); |
| 97 | let engine = Engine::new(&config).unwrap(); |
| 98 | |
| 99 | // The module has a memory (shouldn't matter) and a single function which is a no-op. |
| 100 | let module = Module::new(&engine, r#"(module (memory 1) (func (export "f")))"#).unwrap(); |
| 101 | (engine, module) |
| 102 | } |
| 103 | |
| 104 | criterion_group!(benches, measure_execution_time); |
| 105 | criterion_main!(benches); |
no test coverage detected