Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed unnecessary waiting for 1 sec in examples #402

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions examples/backtracking/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ fn run() -> Result<(), Error> {
})
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/bfgs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/brentopt/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@ fn main() {
.run()
.unwrap();

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

println!("Result of brent:\n{res}");
}
3 changes: 0 additions & 3 deletions examples/brentroot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,5 @@ fn main() {
.run()
.unwrap();

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

println!("Result of brent:\n{res}");
}
2 changes: 0 additions & 2 deletions examples/checkpoint/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing to screen again)
std::thread::sleep(std::time::Duration::from_secs(1));
println!("{res}");
Ok(())
}
Expand Down
3 changes: 0 additions & 3 deletions examples/conjugategradient/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing to screen again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/dfp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/gaussnewton/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/gaussnewton_linesearch/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/gaussnewton_nalgebra/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/hagerzhang/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ fn run() -> Result<(), Error> {
})
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print Result
println!("{res}");
Ok(())
Expand Down
2 changes: 0 additions & 2 deletions examples/landweber/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing to screen again)
std::thread::sleep(std::time::Duration::from_secs(1));
println!("{res}");
Ok(())
}
Expand Down
3 changes: 0 additions & 3 deletions examples/lbfgs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/lbfgs_nalgebra/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/morethuente/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ fn run() -> Result<(), Error> {
})
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print Result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/neldermead/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
7 changes: 2 additions & 5 deletions examples/neldermead_cubic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!(
"Polynomial root: {}",
Expand All @@ -93,7 +90,7 @@ fn run() -> Result<(), Error> {
.configure(|state| state.max_iters(100))
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;
std::thread::sleep(std::time::Duration::from_secs(1));

println!("{res}");
println!(
"Polynomial root: {}",
Expand All @@ -109,7 +106,7 @@ fn run() -> Result<(), Error> {
.configure(|state| state.max_iters(100))
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;
std::thread::sleep(std::time::Duration::from_secs(1));

println!("{res}");
println!(
"Polynomial root: {}",
Expand Down
3 changes: 0 additions & 3 deletions examples/newton/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/newton_cg/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/nonlinear_cg/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing to screen again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/observer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ fn run() -> Result<(), Error> {

let res = executor.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print Result
println!("{res}");
}
Expand Down
3 changes: 0 additions & 3 deletions examples/owl_qn/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/simulatedannealing/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/sr1/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the observer flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/sr1_trustregion/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the observer flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/steepestdescent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything first)
std::thread::sleep(std::time::Duration::from_secs(1));

// print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/steepestdescent_manifold/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything first)
std::thread::sleep(std::time::Duration::from_secs(1));

// print result
println!("{res}");
Ok(())
Expand Down
3 changes: 0 additions & 3 deletions examples/trustregion/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ fn run() -> Result<(), Error> {
.add_observer(SlogLogger::term(), ObserverMode::Always)
.run()?;

// Wait a second (lets the logger flush everything before printing again)
std::thread::sleep(std::time::Duration::from_secs(1));

// Print result
println!("{res}");
Ok(())
Expand Down