Error if profiling disabled and -pprof specifed.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bill Thiede 2019-10-10 19:55:25 -07:00
parent 53e0230852
commit c929f5c967

View File

@ -97,6 +97,9 @@ fn main() -> Result<(), std::io::Error> {
let opt = Opt::from_args(); let opt = Opt::from_args();
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") {
panic!("profiling disabled at compile time, but -pprof specified");
}
if let Some(ref pprof_path) = opt.pprof { if let Some(ref pprof_path) = opt.pprof {
PROFILER PROFILER
.lock() .lock()