From e0315a5ef0fda1773d27c61f439b5598937a3357 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 29 Apr 2022 18:00:38 +0200 Subject: Cycles: add profiling command line argument to standalone Like --cycles-print-stats for Blender. --- intern/cycles/app/cycles_standalone.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index ed512aa2330..87ab84eb209 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -369,7 +369,7 @@ static void options_parse(int argc, const char **argv) /* parse options */ ArgParse ap; - bool help = false, debug = false, version = false; + bool help = false, profile = false, debug = false, version = false; int verbosity = 1; ap.options("Usage: cycles [options] file.xml", @@ -411,6 +411,9 @@ static void options_parse(int argc, const char **argv) "--list-devices", &list, "List information about all available devices", + "--profile", + &profile, + "Enable profile logging", #ifdef WITH_CYCLES_LOGGING "--debug", &debug, @@ -460,6 +463,8 @@ static void options_parse(int argc, const char **argv) exit(EXIT_SUCCESS); } + options.session_params.use_profiling = profile; + if (ssname == "osl") options.scene_params.shadingsystem = SHADINGSYSTEM_OSL; else if (ssname == "svm") -- cgit v1.2.3