updates?
This commit is contained in:
parent
e7d6b74aab
commit
35413b563c
33 changed files with 10238 additions and 1891 deletions
32
models/src/dto/metrics.rs
Normal file
32
models/src/dto/metrics.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#[cfg_attr(feature = "json", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "json", serde(tag = "type", rename_all = "snake_case"))]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum EntityInfo {
|
||||
Player {
|
||||
name: String,
|
||||
id: usize,
|
||||
is_attacker: bool,
|
||||
},
|
||||
Weapon {
|
||||
name: String,
|
||||
owner: usize,
|
||||
id: usize,
|
||||
},
|
||||
Global,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "json", derive(serde::Serialize))]
|
||||
#[derive(Debug)]
|
||||
pub struct Counter {
|
||||
pub value: u64,
|
||||
pub entity: EntityInfo,
|
||||
pub label: &'static str,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "json", derive(serde::Serialize))]
|
||||
#[derive(Debug)]
|
||||
pub struct Histogram {
|
||||
pub values: Vec<u32>,
|
||||
pub entity: EntityInfo,
|
||||
pub label: &'static str,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue