1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Pulsar Admin REST API
 *
 * This provides the REST API for admin operations
 *
 * The version of the OpenAPI document: v2
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AllocatorStats {
    #[serde(rename = "directArenas", skip_serializing_if = "Option::is_none")]
    pub direct_arenas: Option<Vec<models::PoolArenaStats>>,
    #[serde(rename = "heapArenas", skip_serializing_if = "Option::is_none")]
    pub heap_arenas: Option<Vec<models::PoolArenaStats>>,
    #[serde(rename = "normalCacheSize", skip_serializing_if = "Option::is_none")]
    pub normal_cache_size: Option<i32>,
    #[serde(rename = "numDirectArenas", skip_serializing_if = "Option::is_none")]
    pub num_direct_arenas: Option<i32>,
    #[serde(rename = "numHeapArenas", skip_serializing_if = "Option::is_none")]
    pub num_heap_arenas: Option<i32>,
    #[serde(rename = "numThreadLocalCaches", skip_serializing_if = "Option::is_none")]
    pub num_thread_local_caches: Option<i32>,
    #[serde(rename = "smallCacheSize", skip_serializing_if = "Option::is_none")]
    pub small_cache_size: Option<i32>,
}

impl AllocatorStats {
    pub fn new() -> AllocatorStats {
        AllocatorStats {
            direct_arenas: None,
            heap_arenas: None,
            normal_cache_size: None,
            num_direct_arenas: None,
            num_heap_arenas: None,
            num_thread_local_caches: None,
            small_cache_size: None,
        }
    }
}