You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(l1): remove Mutex from profiling metrics (#5031)
**Motivation**
Having a centralized `Mutex` in the profiling metrics could potentially
make code slower, the more functions we instrument. Removing it reduces
the noise we have in our measurements.
**Description**
This PR replaces the singleton `Mutex` by using the internal `RwLock`
that spans already have for layers to store things. Disabling metrics
doesn't seem to increase performance in a noticeable manner, so this
shouldn't increase performance.
---------
Co-authored-by: Edgar <[email protected]>
// We use this struct to simplify accumulating the time spent doing each task and publishing the metric only when the sync cycle is finished
24
21
// We need to do this because things like database reads and writes are spread out throughout the code, so we need to gather multiple measurements to publish
0 commit comments