Skip to content

Commit

Permalink
minor CLI output tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyuzhao committed May 19, 2024
1 parent db89a55 commit f0825c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion harness-cli/src/commands/run/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ impl<'a> BenchRunner<'a> {
let csv_path = self.log_dir.as_ref().unwrap().join("results.csv");
print_md!("Raw benchmark results at:\n");
print_md!("* `{}`\n\n", csv_path.display());
print_md!("Please run `cargo harness report` to view results.\n");
}

fn get_inv_label(&self, index: usize, is_row_label: bool) -> String {
Expand Down
11 changes: 8 additions & 3 deletions harness-cli/src/commands/upload/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
use std::path::PathBuf;

use clap::Parser;
use colored::Colorize;
use reqwest::blocking::Client;
use serde_json::{Map, Value};

use crate::configs::run_info::{CrateInfo, RunInfo};
use crate::{
configs::run_info::{CrateInfo, RunInfo},
print_md,
};

/// Upload benchmark results to https://r.harness.rs
#[derive(Parser)]
Expand Down Expand Up @@ -77,8 +81,9 @@ impl UploadResultsArgs {
if status.as_u16() != 201 {
anyhow::bail!("Results already uploaded: {remote_url}");
}
println!("Results uploaded: {remote_url}");
println!("Please claim the results by visiting the link above. Failure to claim the results within 7 days will result in automatic deletion.");
print!("{}", "✔ Benchmark results uploaded: ".green());
print_md!("`{remote_url}`\n");
print_md!("Please claim the results by visiting the link above. Failure to claim the results within 7 days will result in automatic deletion.\n");
Ok(())
}
}

0 comments on commit f0825c9

Please sign in to comment.