Skip to content

Commit 97e2b54

Browse files
committed
Add render prefix to path to match other render statistics
1 parent 1ecaaea commit 97e2b54

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crates/bevy_render/src/diagnostic/internal.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,10 @@ impl FrameData {
535535
for (buffer, diagnostic_path, is_f32) in self.value_buffers.drain(..) {
536536
let buffer = buffer.get_mapped_range(..);
537537
diagnostics.push(RenderDiagnostic {
538-
path: DiagnosticPath::new(diagnostic_path),
538+
path: DiagnosticPath::from_components(
539+
core::iter::once("render")
540+
.chain(core::iter::once(diagnostic_path.as_ref())),
541+
),
539542
suffix: "",
540543
value: if is_f32 {
541544
f32::from_le_bytes((*buffer).try_into().unwrap()) as f64
@@ -668,7 +671,9 @@ impl FrameData {
668671
for (buffer, diagnostic_path, is_f32) in self.value_buffers.drain(..) {
669672
let buffer = buffer.get_mapped_range(..);
670673
diagnostics.push(RenderDiagnostic {
671-
path: DiagnosticPath::new(diagnostic_path),
674+
path: DiagnosticPath::from_components(
675+
core::iter::once("render").chain(core::iter::once(diagnostic_path.as_ref())),
676+
),
672677
suffix: "",
673678
value: if is_f32 {
674679
f32::from_le_bytes((*buffer).try_into().unwrap()) as f64

0 commit comments

Comments
 (0)