From bc097d90cb48c0408f8a7beb52e6a2f1597b2338 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 1 Feb 2024 16:48:08 +0100 Subject: [PATCH] tracing-trace: Spanstats deserializable + public fields --- tracing-trace/src/processor/span_stats.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tracing-trace/src/processor/span_stats.rs b/tracing-trace/src/processor/span_stats.rs index 63b6ae5c1..0d6d2f4e2 100644 --- a/tracing-trace/src/processor/span_stats.rs +++ b/tracing-trace/src/processor/span_stats.rs @@ -1,7 +1,7 @@ use std::collections::{BTreeMap, HashMap}; use std::time::Duration; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use crate::entry::{Entry, NewCallsite, SpanClose, SpanEnter, SpanExit}; use crate::{Error, TraceReader}; @@ -12,10 +12,10 @@ enum SpanStatus { Inside(std::time::Duration), } -#[derive(Serialize)] +#[derive(Serialize, Deserialize)] pub struct CallStats { - nb: usize, - ns: u64, + pub nb: usize, + pub ns: u64, } pub fn to_call_stats(