mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 21:15:41 +00:00
Fix benchmarks: set cache_size to higher value (#5585)
* 128 -> 1024 * add trace and set = 512 * fix doc comment
This commit is contained in:
@@ -186,7 +186,7 @@ impl BenchDb {
|
|||||||
pruning: PruningMode::ArchiveAll,
|
pruning: PruningMode::ArchiveAll,
|
||||||
source: sc_client_db::DatabaseSettingsSrc::Path {
|
source: sc_client_db::DatabaseSettingsSrc::Path {
|
||||||
path: dir.into(),
|
path: dir.into(),
|
||||||
cache_size: 128,
|
cache_size: 512,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ pub enum DatabaseSettingsSrc {
|
|||||||
Path {
|
Path {
|
||||||
/// Path to the database.
|
/// Path to the database.
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
/// Cache size in bytes.
|
/// Cache size in MiB.
|
||||||
cache_size: usize,
|
cache_size: usize,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -243,6 +243,15 @@ pub fn open_database<Block: BlockT>(
|
|||||||
|
|
||||||
db_config.memory_budget = memory_budget;
|
db_config.memory_budget = memory_budget;
|
||||||
|
|
||||||
|
log::trace!(
|
||||||
|
target: "db",
|
||||||
|
"Open database at {}, state column budget: {} MiB, others({}) column cache: {} MiB",
|
||||||
|
path,
|
||||||
|
state_col_budget,
|
||||||
|
NUM_COLUMNS,
|
||||||
|
other_col_budget,
|
||||||
|
);
|
||||||
|
|
||||||
Arc::new(Database::open(&db_config, &path).map_err(db_err)?)
|
Arc::new(Database::open(&db_config, &path).map_err(db_err)?)
|
||||||
},
|
},
|
||||||
#[cfg(not(any(feature = "kvdb-rocksdb", test)))]
|
#[cfg(not(any(feature = "kvdb-rocksdb", test)))]
|
||||||
|
|||||||
Reference in New Issue
Block a user