Skip to content

Commit

Permalink
fix: duration in seconds missing fractions (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed May 9, 2024
1 parent e62f398 commit b434fb1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions uplink/src/base/serializer/metrics.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::time::Duration;

use serde::Serialize;
use serde_with::{serde_as, DurationSeconds};
use serde_with::{serde_as, DurationSecondsWithFrac};

use crate::base::clock;

Expand Down Expand Up @@ -113,15 +113,15 @@ pub struct StreamMetrics {
pub compressed_data_size: usize,
#[serde(skip)]
pub serializations: u32,
#[serde_as(as = "DurationSeconds<f64>")]
#[serde_as(as = "DurationSecondsWithFrac<f64>")]
pub total_serialization_time: Duration,
#[serde_as(as = "DurationSeconds<f64>")]
#[serde_as(as = "DurationSecondsWithFrac<f64>")]
pub avg_serialization_time: Duration,
#[serde(skip)]
pub compressions: u32,
#[serde_as(as = "DurationSeconds<f64>")]
#[serde_as(as = "DurationSecondsWithFrac<f64>")]
pub total_compression_time: Duration,
#[serde_as(as = "DurationSeconds<f64>")]
#[serde_as(as = "DurationSecondsWithFrac<f64>")]
pub avg_compression_time: Duration,
}

Expand Down

0 comments on commit b434fb1

Please sign in to comment.