Plot fixes in client and dynamic name fix in voxygen (tracy update)

This commit is contained in:
Imbris 2022-05-26 00:43:44 -04:00
parent a366fc4512
commit 5cf899c4fe
2 changed files with 7 additions and 16 deletions

View File

@ -47,6 +47,7 @@ use common::{
uid::{Uid, UidAllocator},
vol::RectVolSize,
};
#[cfg(feature = "tracy")] use common_base::plot;
use common_base::{prof_span, span};
use common_net::{
msg::{
@ -78,16 +79,6 @@ use tokio::runtime::Runtime;
use tracing::{debug, error, trace, warn};
use vek::*;
#[cfg(feature = "tracy")]
mod tracy_plots {
use common_base::tracy_client::{create_plot, Plot};
pub static TERRAIN_SENDS: Plot = create_plot!("terrain_sends");
pub static TERRAIN_RECVS: Plot = create_plot!("terrain_recvs");
pub static INGAME_SENDS: Plot = create_plot!("ingame_sends");
pub static INGAME_RECVS: Plot = create_plot!("ingame_recvs");
}
#[cfg(feature = "tracy")] use tracy_plots::*;
const PING_ROLLING_AVERAGE_SECS: usize = 10;
#[derive(Debug)]
@ -783,8 +774,8 @@ impl Client {
};
#[cfg(feature = "tracy")]
{
INGAME_SENDS.point(ingame);
TERRAIN_SENDS.point(terrain);
plot!("ingame_sends", ingame);
plot!("terrain_sends", terrain);
}
stream.send(msg)
},
@ -2197,8 +2188,8 @@ impl Client {
if cnt_start == cnt {
#[cfg(feature = "tracy")]
{
TERRAIN_RECVS.point(terrain_cnt as f64);
INGAME_RECVS.point(ingame_cnt as f64);
plot!("terrain_recvs", terrain_cnt as f64);
plot!("ingame_recvs", ingame_cnt as f64);
}
return Ok(cnt);
}

View File

@ -10,7 +10,7 @@ use super::{
shaders::Shaders,
ImmutableLayouts, Layouts,
};
use common_base::prof_span;
use common_base::{prof_span, prof_span_alloc};
use std::sync::Arc;
/// All the pipelines
@ -984,7 +984,7 @@ impl<'a> Task<'a> {
// _name only used when tracy feature is activated
StartedTask {
_span: {
prof_span!(guard, _name);
prof_span_alloc!(guard, _name);
guard
},
_task: self,