Skip to content

Commit

Permalink
Optimize the codes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmqtt committed Jan 16, 2024
1 parent 17f9ee9 commit d55535f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/storage_sled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,12 +1462,12 @@ impl StorageDB for SledStorageDB {
#[inline]
async fn info(&self) -> Result<Value> {
let active_count = self.active_count.load(Ordering::Relaxed);
let this = self.clone();
// let this = self.clone();
Ok(spawn_blocking(move || {
let size_on_disk = this.db.size_on_disk().unwrap_or_default();
let db_size = this.db_size();
let map_size = this.map_size();
let list_size = this.list_size();
// let size_on_disk = this.db.size_on_disk().unwrap_or_default();
// let db_size = this.db_size();
// let map_size = this.map_size();
// let list_size = this.list_size();

// let limit = 20;

Expand Down Expand Up @@ -1507,10 +1507,10 @@ impl StorageDB for SledStorageDB {
serde_json::json!({
"storage_engine": "Sled",
"active_count": active_count,
"db_size": db_size,
"map_size": map_size,
"list_size": list_size,
"size_on_disk": size_on_disk,
// "db_size": db_size,
// "map_size": map_size,
// "list_size": list_size,
// "size_on_disk": size_on_disk,
// "db_keys": db_keys,
// "map_names": map_names,
// "list_names": list_names,
Expand Down

0 comments on commit d55535f

Please sign in to comment.