File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 66from __future__ import annotations
77
88import sys
9+ import timeit
910
1011import click
1112import cloup
1213
13- from .checks import HEALTH_CHECKS
14+ from manim . cli . checkhealth .checks import HEALTH_CHECKS
1415
1516__all__ = ["checkhealth" ]
1617
@@ -62,7 +63,7 @@ def checkhealth():
6263 import manim as mn
6364
6465 class CheckHealthDemo (mn .Scene ):
65- def construct (self ):
66+ def _inner_construct (self ):
6667 banner = mn .ManimBanner ().shift (mn .UP * 0.5 )
6768 self .play (banner .create ())
6869 self .wait (0.5 )
@@ -79,5 +80,11 @@ def construct(self):
7980 mn .FadeOut (text_tex_group , shift = mn .DOWN ),
8081 )
8182
83+ def construct (self ):
84+ self .execution_time = timeit .timeit (self ._inner_construct , number = 1 )
85+
8286 with mn .tempconfig ({"preview" : True , "disable_caching" : True }):
83- CheckHealthDemo ().render ()
87+ scene = CheckHealthDemo ()
88+ scene .render ()
89+
90+ click .echo (f"Scene rendered in { scene .execution_time :.2f} seconds." )
You can’t perform that action at this time.
0 commit comments