Added point-size argument for page-migrations graph.

This commit is contained in:
Filipe Rodrigues 2023-06-01 14:43:42 +01:00
parent 7f73cc8a14
commit bf4b4c29c3
2 changed files with 12 additions and 4 deletions

View File

@ -36,6 +36,10 @@ pub enum SubCmd {
/// Output
#[clap(flatten)]
output: ArgsOutputFile,
/// Point size
#[clap(long = "point-size", default_value_t = 0.2)]
point_size: f64,
},
/// Creates a histogram of page migrations

View File

@ -33,7 +33,11 @@ fn main() -> Result<(), anyhow::Error> {
// Then check the sub-command
match args.sub_cmd {
args::SubCmd::PageMigrations { input_file, output } => {
args::SubCmd::PageMigrations {
input_file,
output,
point_size,
} => {
// Parse the input file
let data = self::read_data(&input_file)?;
@ -100,7 +104,7 @@ fn main() -> Result<(), anyhow::Error> {
PlotOption::Caption("Page migrations (Allocation)"),
PlotOption::Color("black"),
PlotOption::PointSymbol('O'),
PlotOption::PointSize(0.2),
PlotOption::PointSize(point_size),
])
.points(
points_migration_to_faster.iter().map(|p| p.x),
@ -109,7 +113,7 @@ fn main() -> Result<(), anyhow::Error> {
PlotOption::Caption("Page migrations (Migrations to faster)"),
PlotOption::Color("green"),
PlotOption::PointSymbol('O'),
PlotOption::PointSize(0.2),
PlotOption::PointSize(point_size),
],
)
.points(
@ -119,7 +123,7 @@ fn main() -> Result<(), anyhow::Error> {
PlotOption::Caption("Page migrations (Migrations to slower)"),
PlotOption::Color("red"),
PlotOption::PointSymbol('O'),
PlotOption::PointSize(0.2),
PlotOption::PointSize(point_size),
],
)
.set_x_label("Time (normalized)", &[])