Compare commits
No commits in common. "af6cda7349996d53da1d79ccb7e2e92abd50c058" and "5d9e180817887ba69b4c6d67d71db4ff12707f68" have entirely different histories.
af6cda7349
...
5d9e180817
@ -122,7 +122,6 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
let start_time: DateTime<Utc> = Utc::now();
|
let start_time: DateTime<Utc> = Utc::now();
|
||||||
let opt = Opt::from_args();
|
let opt = Opt::from_args();
|
||||||
info!("{:?}", opt);
|
|
||||||
let scene = opt.model.scene(&opt);
|
let scene = opt.model.scene(&opt);
|
||||||
fs::create_dir_all(&opt.output)?;
|
fs::create_dir_all(&opt.output)?;
|
||||||
if opt.pprof.is_some() && !cfg!(feature = "profile") {
|
if opt.pprof.is_some() && !cfg!(feature = "profile") {
|
||||||
|
|||||||
@ -139,10 +139,10 @@ pub struct Opt {
|
|||||||
)]
|
)]
|
||||||
pub push_gateway: String,
|
pub push_gateway: String,
|
||||||
/// Image width
|
/// Image width
|
||||||
#[structopt(short = "w", long = "width", default_value = "512")]
|
#[structopt(short = "w", long = "width", default_value = "1024")]
|
||||||
pub width: usize,
|
pub width: usize,
|
||||||
/// Image height
|
/// Image height
|
||||||
#[structopt(short = "h", long = "height", default_value = "512")]
|
#[structopt(short = "h", long = "height", default_value = "1024")]
|
||||||
pub height: usize,
|
pub height: usize,
|
||||||
/// Number of threads
|
/// Number of threads
|
||||||
#[structopt(short = "t", long = "num_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_req_rx);
|
||||||
drop(pixel_resp_tx);
|
drop(pixel_resp_tx);
|
||||||
|
|
||||||
let start_time = time::Instant::now();
|
|
||||||
let (w, h) = (scene.width, scene.height);
|
let (w, h) = (scene.width, scene.height);
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
let batch_line_requests = true;
|
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)
|
output::write_images(output_dir)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user