Measuring the time from automation is triggered, to it's done

I apologise if this have been asked before, I searched but didn’t find anything.

is it possible to measure the the time it takes from automation is triggered, until it is finished, preferably sent to prometheus or logger, for further analysis.
I haven’t been able to find anything.

“Why” you ask?
Well. from time to time I hear people “shouting” that running Home Assistant on an “i9” (ok, maybe a bit excaturation) or NUC, is alot better and faster that just running it from a Raspberry Pi.
This is of course very dependent on amount of automations and entities, but it could be interesting to actually measure if there is any real difference.
I myself is running it from a Pi4b, but have also used a NUC i3, and 8 threaded Atom CPU,
and I only notice the difference when installing add-ons or restarting/updating the docker container.