feat: download cli command

This commit is contained in:
2022-11-28 21:59:26 +01:00
parent 000000208a
commit 0000003007
9 changed files with 1091 additions and 6 deletions

View File

@@ -54,6 +54,11 @@ fn parse_time(val: &str, postfix: &str) -> f64 {
val.split(postfix).next().unwrap().parse().unwrap()
}
pub fn parse_args() -> Result<u8, pico_args::Error> {
let mut args = pico_args::Arguments::from_env();
args.free_from_str()
}
pub fn parse_exec_time(output: &str) -> f64 {
output.lines().fold(0_f64, |acc, l| {
if !l.contains("elapsed:") {