Update node status

This commit is contained in:
Dominik Werder
2022-12-16 16:22:48 +01:00
parent 6c5ada63e7
commit f6d92966cd
9 changed files with 377 additions and 401 deletions

View File

@@ -8,6 +8,7 @@ pub mod pg {
use err::Error;
use netpod::log::*;
use netpod::TableSizes;
use netpod::{Channel, Database, NodeConfigCached};
use netpod::{ScalarType, Shape};
use std::sync::Arc;
@@ -102,10 +103,6 @@ pub async fn database_size(node_config: &NodeConfigCached) -> Result<u64, Error>
Ok(size)
}
pub struct TableSizes {
pub sizes: Vec<(String, String)>,
}
pub async fn table_sizes(node_config: &NodeConfigCached) -> Result<TableSizes, Error> {
let sql = format!(
"{} {} {} {} {} {} {}",