mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
Make wasm runtime cache size configurable (#10177)
* Make wasm runtime cache size configurable * apply review comments * remove VersionedRuntimeValue * fix compilation * VersionedRuntime: replace clone by Arc * fmt * fix warnings * fix tests compilation * fmt
This commit is contained in:
@@ -238,6 +238,10 @@ pub struct RunCmd {
|
||||
#[structopt(long)]
|
||||
pub max_runtime_instances: Option<usize>,
|
||||
|
||||
/// Maximum number of different runtimes that can be cached.
|
||||
#[structopt(long, default_value = "2")]
|
||||
pub runtime_cache_size: u8,
|
||||
|
||||
/// Run a temporary node.
|
||||
///
|
||||
/// A temporary directory will be created to store the configuration and will be deleted
|
||||
@@ -453,6 +457,10 @@ impl CliConfiguration for RunCmd {
|
||||
Ok(self.max_runtime_instances.map(|x| x.min(256)))
|
||||
}
|
||||
|
||||
fn runtime_cache_size(&self) -> Result<u8> {
|
||||
Ok(self.runtime_cache_size)
|
||||
}
|
||||
|
||||
fn base_path(&self) -> Result<Option<BasePath>> {
|
||||
Ok(if self.tmp {
|
||||
Some(BasePath::new_temp_dir()?)
|
||||
|
||||
Reference in New Issue
Block a user