Skip to content

Commit

Permalink
docs: fix chart title
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
  • Loading branch information
explodingcamera committed Jan 28, 2024
1 parent 716b763 commit fd91a1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/tinywasm/tests/charts/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::Path;

const FONT: &str = "Victor Mono";

pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()> {
pub fn create_progress_chart(name: &str, csv_path: &Path, output_path: &Path) -> Result<()> {
let file = File::open(csv_path)?;
let reader = io::BufReader::new(file);

Expand Down Expand Up @@ -41,7 +41,7 @@ pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()>
.y_label_area_size(70)
.margin(10)
.margin_top(20)
.caption("MVP TESTSUITE", (FONT, 30.0, FontStyle::Bold))
.caption(name, (FONT, 30.0, FontStyle::Bold))
.build_cartesian_2d((0..(versions.len() - 1) as u32).into_segmented(), 0..max_tests)?;

chart
Expand Down
2 changes: 2 additions & 0 deletions crates/tinywasm/tests/generate-charts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ fn generate_charts() -> Result<()> {
}

charts::create_progress_chart(
"WebAssembly 1.0 Test Suite",
std::path::Path::new("./tests/generated/mvp.csv"),
std::path::Path::new("./tests/generated/progress-mvp.svg"),
)?;

println!("created progress chart: ./tests/generated/progress-mvp.svg");

charts::create_progress_chart(
"WebAssembly 2.0 Test Suite",
std::path::Path::new("./tests/generated/2.0.csv"),
std::path::Path::new("./tests/generated/progress-2.0.svg"),
)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/tinywasm/tests/generated/progress-2.0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions crates/tinywasm/tests/generated/progress-mvp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd91a1c

Please sign in to comment.