How to get execution time on dynamo

Hi
Can you help me to find how to get the execution time of a dynamo script ?

My script dynamo write to excel the quantity of all element in my revit model

Thank you

Hi @REH
Depending on your version of Dynamo, the easiest way would be to use the Tube Up extension. :smile:

2 Likes

Hi Ewan_Opie
Thank you for your answer but this extension is too difficult for me.
this is my Python script : BUT I DONT KOWN HOW I GET START TIME AND END TIME OF THE EXECUTION

Import Time

import time

Start Run-time

start = time.time()

??? HOW GET START TIME AND END TIME OF THE EXECUTION

Calculate Run-time

time = ("%s s" % (time.time()-start))

Get run time

OUT = time

Thank you

The tune up extension would be a preference because it gives you run time of each node and the overall run time. So you can concentrate on areas that will give you the most benefit from a time point of view(eg You could work to refine a node/code that takes 10 seconds to run to take it to 8 seconds when it would be better to work on the node/code that takes 10 minutes to run to refine that).

On the code you have provided, you have to get it to run before anything else in your script runs, then get it to run again at the end then minus one from the other.

Ah its too simple :blush:
There is no nodes to use : a simple click . i just see because i am using now revit 2021

Thank you