Hi everyone,
I’m trying to find a way to measure the time that my app takes to give me the results I ask (plot figures, tables and text). Is there any way to to this?
For the moment I just use the python’s time module in every callback that I have (see example bellow), but the result doesn’t seem to correspond to the actual time that it takes because it doesn’t take into consideration the plotting part…
@app.callback(
Output('some_figure','figure'),
[Input('some_value', 'children')],
[State('other_value', 'value')])
def total_chiffres(val, choix):
deb = time()
#some code
...
...
...
fig = px.pie(values =values, names=some_name, color_discrete_sequence=px.colors.diverging.PuOr)
print('Running this callback took :', time()-deb)
return fig