[Bf-blender-cvs] [e0315a5ef0f] master: Cycles: add profiling command line argument to standalone

Brecht Van Lommel noreply at git.blender.org
Fri Apr 29 18:08:49 CEST 2022


Commit: e0315a5ef0fda1773d27c61f439b5598937a3357
Author: Brecht Van Lommel
Date:   Fri Apr 29 18:00:38 2022 +0200
Branches: master
https://developer.blender.org/rBe0315a5ef0fda1773d27c61f439b5598937a3357

Cycles: add profiling command line argument to standalone

Like --cycles-print-stats for Blender.

===================================================================

M	intern/cycles/app/cycles_standalone.cpp

===================================================================

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")



More information about the Bf-blender-cvs mailing list