metrics-facade icon indicating copy to clipboard operation
metrics-facade copied to clipboard

Provide possibility to execute metrics update in the same thread

Open rc-mairovichaa opened this issue 1 year ago • 0 comments

Now ScheduledExecutorService is in use and there is no default implementation, which allows to execute metrics updates in the same thread they took place. Meantime, it seems to be bad that generation of slices, event handling and expiration will be handled in the same thread. It's suggested to introduce such implementation (or change MetricRegistry constructors to support same thread execution) considering the point about still handling other events in a different thread.

Such feature could be useful for

  • testing
  • use cases when context switching should avoided

rc-mairovichaa avatar Sep 23 '24 17:09 rc-mairovichaa