Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/performance/tests/animation.py')
-rw-r--r--tests/performance/tests/animation.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/performance/tests/animation.py b/tests/performance/tests/animation.py
new file mode 100644
index 00000000000..0ddec327f9f
--- /dev/null
+++ b/tests/performance/tests/animation.py
@@ -0,0 +1,32 @@
+import api
+import os
+
+def _run(args):
+ import bpy
+ import time
+
+ scene = bpy.context.scene
+ scene.frame_set(scene.frame_start)
+
+ start_time = time.time()
+ for frame in range(scene.frame_start + 1, scene.frame_end + 1):
+ scene.frame_set(frame)
+ bpy.context.evaluated_depsgraph_get()
+ elapsed_time = time.time() - start_time
+
+ result = {'time': elapsed_time}
+ return result
+
+class AnimationTest(api.Test):
+ def __init__(self, filepath):
+ self.filepath = filepath
+
+ def name(self):
+ return 'animation_' + self.filepath.stem
+
+ def run(self, env):
+ return env.run_in_blender(_run, {}, blendfile=self.filepath)
+
+def generate(env):
+ filepaths = env.find_blend_files('animation')
+ return [AnimationTest(filepath) for filepath in filepaths]