diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-16 11:43:58 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-16 11:43:58 +0100 |
commit | 515029d026937d29395379c76188f509984b8ace (patch) | |
tree | 0a89cd87079f330d1021a1954a1328654b236e65 /src/garage/admin_rpc.rs | |
parent | 1d9961e4118af0e26068e1d6c5c6c009a1292a88 (diff) | |
download | garage-515029d026937d29395379c76188f509984b8ace.tar.gz garage-515029d026937d29395379c76188f509984b8ace.zip |
Refactor code
Diffstat (limited to 'src/garage/admin_rpc.rs')
-rw-r--r-- | src/garage/admin_rpc.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index b2145ca5..aec791a4 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -463,24 +463,28 @@ impl AdminRpcHandler { Ok(ret) } - fn gather_table_stats<F: TableSchema, R: TableReplication>( + fn gather_table_stats<F, R>( &self, to: &mut String, t: &Arc<Table<F, R>>, _opt: &StatsOpt, - ) -> Result<(), Error> { + ) -> Result<(), Error> + where + F: TableSchema + 'static, + R: TableReplication + 'static, + { writeln!(to, "\nTable stats for {}", t.data.name).unwrap(); writeln!(to, " number of items: {}", t.data.store.len()).unwrap(); writeln!( to, " Merkle updater todo queue length: {}", - t.data.merkle_updater.todo_len() + t.merkle_updater.todo_len() ) .unwrap(); writeln!( to, " Merkle tree size: {}", - t.data.merkle_updater.merkle_tree_len() + t.merkle_updater.merkle_tree_len() ) .unwrap(); writeln!(to, " GC todo queue length: {}", t.data.gc_todo_len()).unwrap(); |