Compare commits

..

No commits in common. "af6cda7349996d53da1d79ccb7e2e92abd50c058" and "5d9e180817887ba69b4c6d67d71db4ff12707f68" have entirely different histories.

2 changed files with 2 additions and 15 deletions

View File

@ -122,7 +122,6 @@ fn main() -> Result<(), std::io::Error> {
.unwrap();
let start_time: DateTime<Utc> = Utc::now();
let opt = Opt::from_args();
info!("{:?}", opt);
let scene = opt.model.scene(&opt);
fs::create_dir_all(&opt.output)?;
if opt.pprof.is_some() && !cfg!(feature = "profile") {

View File

@ -139,10 +139,10 @@ pub struct Opt {
)]
pub push_gateway: String,
/// Image width
#[structopt(short = "w", long = "width", default_value = "512")]
#[structopt(short = "w", long = "width", default_value = "1024")]
pub width: usize,
/// Image height
#[structopt(short = "h", long = "height", default_value = "512")]
#[structopt(short = "h", long = "height", default_value = "1024")]
pub height: usize,
/// Number of threads
#[structopt(short = "t", long = "num_threads")]
@ -474,7 +474,6 @@ pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::i
drop(pixel_req_rx);
drop(pixel_resp_tx);
let start_time = time::Instant::now();
let (w, h) = (scene.width, scene.height);
thread::spawn(move || {
let batch_line_requests = true;
@ -549,16 +548,5 @@ pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::i
}
}
}
let human = human::Formatter::new();
let time_diff = time::Instant::now() - start_time;
let ray_count = RAY_COUNT.load(Ordering::SeqCst);
info!(
"{} pixels {} {}s pixels/s {} rays/s",
human.format(pixel_total as f64),
time_diff.as_secs_f64(),
human.format(pixel_total as f64 / time_diff.as_secs_f64()),
human.format(ray_count as f64 / time_diff.as_secs_f64())
);
output::write_images(output_dir)
}