From 98c217c8e302f4eaf780f9c13589e1cb5700a75f Mon Sep 17 00:00:00 2001 From: karminski Date: Mon, 7 Oct 2024 17:35:45 +0800 Subject: [PATCH] ADD leaderboard link and sample usage info --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 21 +++++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bf637d..9fcee46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -166,7 +166,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core-to-core-latency-plus" -version = "0.1.1" +version = "0.1.17" dependencies = [ "ansi_term", "cache-padded", diff --git a/Cargo.toml b/Cargo.toml index 1e2455f..508c2f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Karminski "] repository = "https://github.com/KCORES/core-to-core-latency-plus" license = "MIT" readme = "README-en-us.md" -version = "0.1.16" +version = "0.1.17" edition = "2021" exclude = ["/results"] diff --git a/src/main.rs b/src/main.rs index 70e0c60..95dbef0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,18 +3,31 @@ mod utils; use bench::Count; use std::sync::Arc; -use clap::Parser; +use clap::{Parser}; use quanta::Clock; use crate::bench::run_bench; use serde_json::json; use reqwest::blocking::Client; - const DEFAULT_NUM_SAMPLES: Count = 300; const DEFAULT_NUM_ITERATIONS_PER_SAMPLE: Count = 1000; -#[derive(Clone)] -#[derive(clap::Parser)] +#[derive(Clone, Parser)] +#[clap(name = "core-to-core-latency-plus")] +#[clap(version = env!("CARGO_PKG_VERSION"))] +#[clap(about = " + ██████╗ ██████╗ ██████╗ ███████╗ +██╔════╝██╔═══██╗██╔══██╗██╔════╝ +██║ ██║ ██║██████╔╝█████╗ +██║ ██║ ██║██╔══██╗██╔══╝ +╚██████╗╚██████╔╝██║ ██║███████╗ + ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ to Core Latency + + +For leaderboard, please visit: https://core-to-core-latency.kcores.com + +SAMPLE USAGE: + core-to-core-latency-plus 5000 300 -b 1 --upload + ")] pub struct CliArgs { /// The number of iterations per sample #[clap(default_value_t = DEFAULT_NUM_ITERATIONS_PER_SAMPLE, value_parser)]