Skip to content

Commit

Permalink
Rename Both to Aggregate and Total to Round-trip
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Aug 21, 2024
1 parent 9299d1a commit 12fb21d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This file lists the changes that have occurred since January 2024 in the project
* Generated files will use a YYYY-MM-DD HH.MM.SS format
* Rename bandwidth to throughput
* Rename sample rate to sample interval
* Rename `Both` to `Aggregate` and `Total` to `Round-trip` in plots

## 0.0.12 - 2024-07-31

Expand Down
12 changes: 4 additions & 8 deletions src/crusader-gui-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,6 @@ impl Tester {
plot = plot.reset();
}

//if plots > 1 {
// plot = plot.height(height / (plots as f32));
//}

plot.show(ui, |plot_ui| {
if result.result.raw_result.version >= 1 {
let latency = data.up.iter().map(|v| [v.0, v.1]);
Expand All @@ -768,7 +764,7 @@ impl Tester {
let latency = data.total.iter().map(|v| [v.0, v.1]);
let latency = Line::new(PlotPoints::from_iter(latency))
.color(Color32::from_rgb(50, 50, 50))
.name("Total");
.name("Round-trip");

plot_ui.line(latency);
});
Expand Down Expand Up @@ -979,7 +975,7 @@ impl Tester {
let both = result.both.iter().map(|v| [v.0, v.1]);
let both = Line::new(PlotPoints::from_iter(both))
.color(Color32::from_rgb(149, 96, 153))
.name("Both");
.name("Aggregate");

plot_ui.line(both);
}
Expand Down Expand Up @@ -1428,7 +1424,7 @@ impl Tester {
.link_cursor(link, true, false)
.include_x(-duration)
.include_x(0.0)
.include_x(duration * 0.15)
.include_x(duration * 0.20)
.include_y(0.0)
.include_y(10.0)
.height(height - packet_loss_size)
Expand Down Expand Up @@ -1474,7 +1470,7 @@ impl Tester {
});
let latency = Line::new(PlotPoints::from_iter(latency))
.color(Color32::from_rgb(50, 50, 50))
.name("Total");
.name("Round-trip");

plot_ui.line(latency);
});
Expand Down
6 changes: 3 additions & 3 deletions src/crusader-lib/src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub(crate) fn save_graph_to_mem(

result.both_bytes.as_ref().map(|both_bytes| {
throughput.push((
"Both",
"Aggregate",
RGBColor(149, 96, 153),
to_rates(both_bytes),
vec![both_bytes.as_slice()],
Expand Down Expand Up @@ -506,7 +506,7 @@ fn latency<'a>(

draw_latency(DOWN_COLOR, "Down", |latency| latency.down());

draw_latency(RGBColor(50, 50, 50), "Total", |latency| latency.total);
draw_latency(RGBColor(50, 50, 50), "Round-trip", |latency| latency.total);

legends(&mut chart);

Expand Down Expand Up @@ -877,7 +877,7 @@ pub(crate) fn graph(
let areas = root.split_evenly((charts, 1));

// Scale to fit the legend
let duration = duration * 1.08;
let duration = duration * 1.12;

let mut chart_index = 0;

Expand Down

0 comments on commit 12fb21d

Please sign in to comment.