Hi, We actually have something like this already bpy.ops.wm.redraw_timer() (i.e. Ctrl-Alt-T)
This can be used for testing how long it takes to do things like redrawing the screen/area/region(?) 10 times, and also for things like animation playback and undo/redo times. If you need anything else specific, it could probably be added there I guess... Joshua On Wed, Jun 10, 2015 at 10:09 PM, Martijn Berger <[email protected]> wrote: > Hello everyone, > > > Blender is evolving at a rather nice pace currently but I feel we could use > better measurements to guide its the performance aspect of this a bit > better. > > Some 3d games (like quake) have a feature called “timedemo” this basically > runs the game as fast as the hardware will let it run. I tried doing > something similar in blender and found a number of little things that maybe > could be tweaked to make this possible. > > Overview of how this would work: > > The user runs the command: > > “blender --factory-startup --python-expr="import bpy; > bpy.ops.debug_timer(type='FULLTEST', report=True); sys.exit(0);" > demo_scene.blend” > > The following happens: > > > 1. > > Blender starts and loads demo_scene.blend > 2. > > Blender executes the python expression passed to it > 3. > > debug_timer() is invoked: > 1. > > Move animation counter to the start of the range > 2. > > unlock max fps ( if vsync is disabled this allows very high > framerates) > 3. > > Gets an accurate time measurement > 4. > > Run the animation and render 1 OpenGL frame per frame of animation > 5. > > At the end of the range, capture time again > 6. > > Print this time ( to stdout ?) > 4. > > sys.exit(0), exit blender > > > What we need for this to work: > > > 1. > > implement bpy.ops.debug_timer() > 2. > > Allow higher then 120 fps for animation playback > 3. > > Not sure, if we allow gl frames to be locked to blender animation frames > 4. (optional) implement ‘python-expr’ command line argument > > > > I might have missed stuff but the purpose of this message is to inform and > discus the possibility as well as map out the bits and pieces that need to > be done in order to get this functionality. > > I think something like this could also be instrumental in achieving high > performance in the viewport project. > > > Martijn > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
