From 4e8ce7d51ee73733fe67e4fac784d361b8a4deca Mon Sep 17 00:00:00 2001 From: Walther Date: Sun, 8 Jan 2023 13:16:24 +0200 Subject: [PATCH 1/2] improvement: indicatif steady tick --- clovers-cli/Cargo.toml | 2 +- clovers-cli/src/draw_cpu.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clovers-cli/Cargo.toml b/clovers-cli/Cargo.toml index f55b057b..a357e706 100644 --- a/clovers-cli/Cargo.toml +++ b/clovers-cli/Cargo.toml @@ -18,7 +18,7 @@ human_format = "1.0.3" humantime = "2.1.0" image = { version = "0.24.5", features = ["png"], default-features = false } img-parts = "0.3.0" -indicatif = { version = "0.17.2", features = ["rayon"], default-features = false } +indicatif = { git = "https://github.com/console-rs/indicatif", rev = "2954b1a24ac5f1900a7861992e4825bff643c9e2", features = ["rayon"], default-features = false } rand = { version = "0.8.5", features = ["small_rng", "getrandom"], default-features = false } rayon = "1.6.1" serde = { version = "1.0.150", features = ["derive"], default-features = false } diff --git a/clovers-cli/src/draw_cpu.rs b/clovers-cli/src/draw_cpu.rs index 68c8c4f3..837525d8 100644 --- a/clovers-cli/src/draw_cpu.rs +++ b/clovers-cli/src/draw_cpu.rs @@ -5,6 +5,7 @@ use rand::rngs::SmallRng; use rand::{Rng, SeedableRng}; use rayon::prelude::*; use scenes::Scene; +use std::time::Duration; /// The main drawing function, returns a `Vec` as a pixelbuffer. pub fn draw(opts: RenderOpts, scene: Scene) -> Vec { @@ -18,6 +19,7 @@ pub fn draw(opts: RenderOpts, scene: Scene) -> Vec { bar.set_style(ProgressStyle::default_bar().template( "Elapsed: {elapsed_precise}\nPixels: {bar} {pos}/{len}\nETA: {eta_precise}", ).unwrap()); + bar.enable_steady_tick(Duration::from_millis(100)); } let black = Color::new(0.0, 0.0, 0.0); From 858c393eb8eb3ded1a42ba6879676dec279c65ff Mon Sep 17 00:00:00 2001 From: Walther Date: Sun, 8 Jan 2023 13:17:11 +0200 Subject: [PATCH 2/2] chore: cargo upgrade --- clovers-cli/Cargo.toml | 4 ++-- clovers/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clovers-cli/Cargo.toml b/clovers-cli/Cargo.toml index a357e706..d42753a6 100644 --- a/clovers-cli/Cargo.toml +++ b/clovers-cli/Cargo.toml @@ -13,7 +13,7 @@ path = "src/main.rs" clovers = { path = "../clovers", features = ["serde-derive", "stl", "traces", "gl_tf"], default-features = false } # External -clap = { version = "4.0.29", features = ["std", "derive"], default-features = false } +clap = { version = "4.0.32", features = ["std", "derive"], default-features = false } human_format = "1.0.3" humantime = "2.1.0" image = { version = "0.24.5", features = ["png"], default-features = false } @@ -21,7 +21,7 @@ img-parts = "0.3.0" indicatif = { git = "https://github.com/console-rs/indicatif", rev = "2954b1a24ac5f1900a7861992e4825bff643c9e2", features = ["rayon"], default-features = false } rand = { version = "0.8.5", features = ["small_rng", "getrandom"], default-features = false } rayon = "1.6.1" -serde = { version = "1.0.150", features = ["derive"], default-features = false } +serde = { version = "1.0.152", features = ["derive"], default-features = false } serde_json = { version = "1.0", features = ["alloc"], default-features = false } time = { version = "0.3.17", default-features = false } tracing = "0.1.37" diff --git a/clovers/Cargo.toml b/clovers/Cargo.toml index 00d404e1..8a301a69 100644 --- a/clovers/Cargo.toml +++ b/clovers/Cargo.toml @@ -18,12 +18,12 @@ std = [] traces = ["tracing"] [dependencies] -enum_dispatch = "0.3.8" +enum_dispatch = "0.3.9" gltf = { version = "1.0.0", optional = true } nalgebra = { version = "0.31.4", features = ["libm"], default-features = false } rand = { version = "0.8.5", features = ["small_rng"], default-features = false } rand_distr = "0.4.3" -serde = { version = "1.0.150", features = ["derive"], default-features = false, optional = true } +serde = { version = "1.0.152", features = ["derive"], default-features = false, optional = true } stl_io = { version = "0.7.0", optional = true } tracing = { version = "0.1.37", optional = true }