pub struct DbStatus {
pub db_size_bytes: i64,
pub total_connections: i32,
pub max_connections: i32,
pub migration_version: Option<String>,
pub migration_applied_at: Option<DateTime<Utc>>,
pub tables: Vec<TableInfo>,
pub top_indexes: Vec<IndexInfo>,
pub active_connections: Vec<ConnInfo>,
}Expand description
数据库状态聚合数据。
Fields§
§db_size_bytes: i64当前数据库总大小(字节)。
total_connections: i32当前数据库的活跃连接数。
max_connections: i32PG 配置的最大连接数(max_connections)。
migration_version: Option<String>已应用的最新迁移版本(schema_migrations.version)。
migration_applied_at: Option<DateTime<Utc>>最新迁移的应用时间。
tables: Vec<TableInfo>用户表清单(按总大小降序)。
top_indexes: Vec<IndexInfo>索引占用 Top N。
active_connections: Vec<ConnInfo>活跃连接列表(已过滤掉自身这条查询)。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbStatus
impl<'de> Deserialize<'de> for DbStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DbStatus
impl RefUnwindSafe for DbStatus
impl Send for DbStatus
impl Sync for DbStatus
impl Unpin for DbStatus
impl UnsafeUnpin for DbStatus
impl UnwindSafe for DbStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
§impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
impl<T> Transportable for Twhere
T: Serialize + DeserializeOwned + 'static,
§fn transport_to_bytes(&self) -> Vec<u8> ⓘ
fn transport_to_bytes(&self) -> Vec<u8> ⓘ
Serialize the type to a byte vector for transport
§fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
fn transport_from_bytes(bytes: &[u8]) -> Result<T, Error<Error>>
Deserialize the type from a byte slice