Skip to content

Commit

Permalink
ui/profiler: Plot NaNs as normal measurements
Browse files Browse the repository at this point in the history
This makes the plot visually continue moving even if the producer has stopped and empty profilings are being added on it
  • Loading branch information
dimtpap committed Aug 25, 2023
1 parent 0dc59dc commit 7c2c013
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ui/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ mod data {
}

fn generate_plot_points(points: impl Iterator<Item = f64>) -> PlotPoints {
PlotPoints::from_iter(points.enumerate().map(|(i, x)| {
if x.is_nan() {
[f64::NAN, f64::NAN]
} else {
[i as f64, x]
}
}))
PlotPoints::from_iter(points.enumerate().map(|(i, x)| [i as f64, x]))
}

struct ClientMeasurement {
Expand Down

0 comments on commit 7c2c013

Please sign in to comment.