Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/common/pools/src/db/sqlite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ impl SqlitePoolManager {
// by calculating the size ratio
let ratio = data.len() as f64 / total_data_size;
metrics::SQLITE_UPLOAD_DB_RATE
.with_label_values(&[&hex_key])
.with_label_values(&[])
.set(data.len() as f64 / (dt * ratio));
}

Expand Down Expand Up @@ -707,7 +707,7 @@ impl SqlitePoolManager {

let dt = start_instant.elapsed();
metrics::SQLITE_DOWNLOAD_DB_RATE
.with_label_values(&[&hex_key])
.with_label_values(&[])
.set(data_len as f64 / dt.as_secs_f64());

Ok(true)
Expand Down
4 changes: 2 additions & 2 deletions packages/common/pools/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ lazy_static::lazy_static! {
pub static ref SQLITE_UPLOAD_DB_RATE: GaugeVec = register_gauge_vec_with_registry!(
"sqlite_upload_db_rate",
"Rate to read and upload to FDB an sqlite DB in bytes/s.",
&["key"],
&[],
*REGISTRY,
)
.unwrap();
pub static ref SQLITE_DOWNLOAD_DB_RATE: GaugeVec = register_gauge_vec_with_registry!(
"sqlite_download_db_rate",
"Rate to download and write to file an sqlite DB from FDB in bytes/s.",
&["key"],
&[],
*REGISTRY,
)
.unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ pub fn configure(namespace: &str, config: &Config, pool_type: PoolType) -> Globa
},
"compression": true,

//Buffer to disk for durability & reduce memory usage
// Buffer to disk for durability & reduce memory usage
"buffer": {
"type": "disk",
"max_size": 268435488, // 256 MB
"max_size": 2 * 1024 * 1024 * 1024, // 2 GiB
"when_full": "block"
}
}
Expand Down
Loading