mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
c515fece28
It will autodo some things, like track start and time and export those in system metrics Add a origin and implement it for all Systems in Veloren
25 lines
597 B
Rust
25 lines
597 B
Rust
use crate::vsystem::CpuTimeline;
|
|
use std::{
|
|
collections::HashMap,
|
|
sync::{atomic::AtomicU64, Mutex},
|
|
};
|
|
|
|
#[derive(Default)]
|
|
pub struct SysMetrics {
|
|
pub stats: Mutex<HashMap<String, CpuTimeline>>,
|
|
pub agent_ns: AtomicU64,
|
|
pub mount_ns: AtomicU64,
|
|
pub controller_ns: AtomicU64,
|
|
pub character_behavior_ns: AtomicU64,
|
|
pub stats_ns: AtomicU64,
|
|
pub phys_ns: AtomicU64,
|
|
pub projectile_ns: AtomicU64,
|
|
pub melee_ns: AtomicU64,
|
|
}
|
|
|
|
#[derive(Default)]
|
|
pub struct PhysicsMetrics {
|
|
pub entity_entity_collision_checks: u64,
|
|
pub entity_entity_collisions: u64,
|
|
}
|