2021-03-04 14:00:16 +00:00
|
|
|
use crate::vsystem::CpuTimeline;
|
|
|
|
use std::{
|
|
|
|
collections::HashMap,
|
|
|
|
sync::{atomic::AtomicU64, Mutex},
|
|
|
|
};
|
2020-09-14 12:56:05 +00:00
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
pub struct SysMetrics {
|
2021-03-04 14:00:16 +00:00
|
|
|
pub stats: Mutex<HashMap<String, CpuTimeline>>,
|
2020-12-15 23:51:07 +00:00
|
|
|
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,
|
2020-09-14 12:56:05 +00:00
|
|
|
}
|
2020-10-20 16:31:19 +00:00
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
pub struct PhysicsMetrics {
|
2020-12-15 23:51:07 +00:00
|
|
|
pub entity_entity_collision_checks: u64,
|
|
|
|
pub entity_entity_collisions: u64,
|
2020-10-20 16:31:19 +00:00
|
|
|
}
|