Record event start time in `dispatch.LogElapsedTimeContextManager`.
We want to collect timings for various stages of the jax compilation process, but `log_compiles` logs everything. It'd be nice to filter for top-level functions (or some top-n level).
We pass fun_name to the event callbacks and that's necessary for labeling, but a) not necessarily unique and b) need to know ahead of time to filter.
With just one event for start/end time, we can solve by recording metrics the entire run and do some post-processing at the end. Having a start event just makes this a little easier (in a non-free-threading world, anyway) since we can process
as we go / throw out events nested beyond the level(s) we care about.
PiperOrigin-RevId: 756297365