mirror of
https://github.com/Zenithsiz/ftmemsim.git
synced 2026-02-04 10:11:22 +00:00
Introduced --line-width argument for some graphs.
Fixed missing caption and wrong color for graph `page-temperature-avg`.
This commit is contained in:
parent
a8a3229527
commit
4c95ccc26a
@ -78,6 +78,10 @@ pub struct PageMigrationsHist {
|
||||
/// Output
|
||||
#[clap(flatten)]
|
||||
pub output: Output,
|
||||
|
||||
/// Line width
|
||||
#[clap(long = "line-width", default_value_t = 1.0)]
|
||||
pub line_width: f64,
|
||||
}
|
||||
|
||||
/// Creates a histogram of page migrations from multiple data
|
||||
@ -89,6 +93,10 @@ pub struct PageMigrationsHistMultiple {
|
||||
/// Output
|
||||
#[clap(flatten)]
|
||||
pub output: Output,
|
||||
|
||||
/// Line width
|
||||
#[clap(long = "line-width", default_value_t = 1.0)]
|
||||
pub line_width: f64,
|
||||
}
|
||||
|
||||
|
||||
@ -137,9 +145,9 @@ pub struct PageTemperatureAvg {
|
||||
#[clap(flatten)]
|
||||
pub output: Output,
|
||||
|
||||
/// Point size
|
||||
#[clap(long = "point-size", default_value_t = 0.5)]
|
||||
pub point_size: f64,
|
||||
/// Line width
|
||||
#[clap(long = "line-width", default_value_t = 1.0)]
|
||||
pub line_width: f64,
|
||||
}
|
||||
|
||||
/// Memory Occupancy
|
||||
@ -155,6 +163,10 @@ pub struct MemoryOccupancy {
|
||||
/// Output
|
||||
#[clap(flatten)]
|
||||
pub output: Output,
|
||||
|
||||
/// Line width
|
||||
#[clap(long = "line-width", default_value_t = 1.0)]
|
||||
pub line_width: f64,
|
||||
}
|
||||
|
||||
/// Output
|
||||
|
||||
@ -157,6 +157,7 @@ fn draw_page_migrations_hist(cmd_args: args::PageMigrationsHist) -> Result<(), a
|
||||
.lines(0..data.len(), &data, &[
|
||||
PlotOption::Caption("Migration count"),
|
||||
PlotOption::Color("black"),
|
||||
PlotOption::LineWidth(cmd_args.line_width),
|
||||
])
|
||||
.set_x_log(Some(10.0))
|
||||
.set_y_log(Some(10.0))
|
||||
@ -196,6 +197,7 @@ fn draw_page_migrations_hist_multiple(cmd_args: args::PageMigrationsHistMultiple
|
||||
fg_axes2d.lines(0..data.len(), &data, &[
|
||||
PlotOption::Caption(&format!("Migration count ({})", input_file.display())),
|
||||
PlotOption::Color(&color),
|
||||
PlotOption::LineWidth(cmd_args.line_width),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -424,7 +426,11 @@ fn draw_page_temperature_avg(cmd_args: args::PageTemperatureAvg) -> Result<(), a
|
||||
points.iter().map(|p| p.temp_avg),
|
||||
points.iter().map(|p| p.page_indexed),
|
||||
points.iter().map(|p| p.temp_err),
|
||||
&[],
|
||||
&[
|
||||
PlotOption::Caption("Page temperature (average)"),
|
||||
PlotOption::Color("black"),
|
||||
PlotOption::LineWidth(cmd_args.line_width),
|
||||
],
|
||||
)
|
||||
.set_x_label("Temperature", &[])
|
||||
.set_y_label("Page (indexed)", &[])
|
||||
@ -517,6 +523,7 @@ fn draw_memory_occupancy(cmd_args: args::MemoryOccupancy) -> Result<(), anyhow::
|
||||
&[
|
||||
PlotOption::Caption(&format!("Memory {mem_idx:?} ({})", mem.name)),
|
||||
PlotOption::Color(&color),
|
||||
PlotOption::LineWidth(cmd_args.line_width),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
5
run.sh
5
run.sh
@ -24,6 +24,7 @@ GRAPH_OUTPUT_WIDTH="4000"
|
||||
GRAPH_OUTPUT_HEIGHT="2250"
|
||||
GRAPH_OUTPUT_FORMAT="png"
|
||||
GRAPH_POINT_SIZE="2.0"
|
||||
GRAPH_LINE_WIDTH="4.0"
|
||||
|
||||
rm -rf "$LOG_FILE"
|
||||
|
||||
@ -58,6 +59,7 @@ cargo run --profile "$PROFILE" -p ftmemsim-graphs -- \
|
||||
--output "resources/data/page_migrations_hist.$GRAPH_OUTPUT_FORMAT" \
|
||||
--output-width "$GRAPH_OUTPUT_WIDTH" \
|
||||
--output-height "$GRAPH_OUTPUT_HEIGHT" \
|
||||
--line-width "$GRAPH_LINE_WIDTH" \
|
||||
&
|
||||
|
||||
cargo run --profile "$PROFILE" -p ftmemsim-graphs -- \
|
||||
@ -91,7 +93,7 @@ cargo run --profile "$PROFILE" -p ftmemsim-graphs -- \
|
||||
--output "resources/data/page_temperature_avg.$GRAPH_OUTPUT_FORMAT" \
|
||||
--output-width "$GRAPH_OUTPUT_WIDTH" \
|
||||
--output-height "$GRAPH_OUTPUT_HEIGHT" \
|
||||
--point-size "$GRAPH_POINT_SIZE" \
|
||||
--line-width "$GRAPH_LINE_WIDTH" \
|
||||
&
|
||||
|
||||
cargo run --profile "$PROFILE" -p ftmemsim-graphs -- \
|
||||
@ -103,6 +105,7 @@ cargo run --profile "$PROFILE" -p ftmemsim-graphs -- \
|
||||
--output "resources/data/memory_occupancy.$GRAPH_OUTPUT_FORMAT" \
|
||||
--output-width "$GRAPH_OUTPUT_WIDTH" \
|
||||
--output-height "$GRAPH_OUTPUT_HEIGHT" \
|
||||
--line-width "$GRAPH_LINE_WIDTH" \
|
||||
&
|
||||
|
||||
wait
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user