Measure response time in gradio ap

Hello, I’d like to use gradio.app to demo a reinforcement learning environment. I’d like to measure the response time for people to pick different actions. How do I get a measurement of how long between when something was presented to somebody and the time to click a key?

1 Like

Hi @wcarvalho good question. Do you need this app to work for many users concurrently or a single user at a time? I may be able to suggest a solution with more information

i only need the app to work with 1 user at a time. i just want to log (a) when they observe images and (b) when they select a key which is an action.

I’m guessing its not a problem to have persistent jax.numpy arrays in between user clicks?