mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
fix tracing and add graph spans
This commit is contained in:
parent
13ca00178a
commit
09043b66ce
2 changed files with 16 additions and 4 deletions
|
@ -112,7 +112,7 @@ impl Plugin for LogPlugin {
|
|||
}
|
||||
}))
|
||||
.build();
|
||||
app.world_mut().insert_non_send(guard);
|
||||
app.world.insert_non_send(guard);
|
||||
let subscriber = subscriber.with(chrome_layer);
|
||||
bevy_utils::tracing::subscriber::set_global_default(subscriber)
|
||||
.expect("Could not set global default tracing subscriber. If you've already set up a tracing subscriber, please disable LogPlugin from Bevy's DefaultPlugins");
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
use bevy_ecs::world::World;
|
||||
use bevy_utils::{tracing::debug, HashMap};
|
||||
use bevy_utils::{
|
||||
tracing::{debug, info_span},
|
||||
HashMap,
|
||||
};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use std::{borrow::Cow, collections::VecDeque};
|
||||
use thiserror::Error;
|
||||
|
@ -52,8 +55,17 @@ impl RenderGraphRunner {
|
|||
render_device,
|
||||
command_encoder,
|
||||
};
|
||||
Self::run_graph(graph, None, &mut render_context, world, &[])?;
|
||||
queue.submit(vec![render_context.command_encoder.finish()]);
|
||||
|
||||
{
|
||||
let span = info_span!("run_graph");
|
||||
let _guard = span.enter();
|
||||
Self::run_graph(graph, None, &mut render_context, world, &[])?;
|
||||
}
|
||||
{
|
||||
let span = info_span!("submit_graph_commands");
|
||||
let _guard = span.enter();
|
||||
queue.submit(vec![render_context.command_encoder.finish()]);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue