Skip to main content

windmill_api/models/
pool_stats.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.634.4
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PoolStats : Database connection pool statistics
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PoolStats {
17    /// Current number of connections in the pool
18    #[serde(rename = "size")]
19    pub size: i32,
20    /// Number of idle connections
21    #[serde(rename = "idle")]
22    pub idle: i32,
23    /// Maximum number of connections allowed
24    #[serde(rename = "max_connections")]
25    pub max_connections: i32,
26}
27
28impl PoolStats {
29    /// Database connection pool statistics
30    pub fn new(size: i32, idle: i32, max_connections: i32) -> PoolStats {
31        PoolStats {
32            size,
33            idle,
34            max_connections,
35        }
36    }
37}
38