Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
erlang:whereis/1
for checking if a store is running
A store's process uses its `StoreId` as its registered name. This is a public interface of Ra so we can depend on it. Reading from key metrics counters is already very fast but switching to `whereis/1` eliminates basically all overhead of this function. When used heavily (for example in RabbitMQ while publishing and consuming rapidly) the CPU time spent on `is_store_running/1` disappears from the output of a perf recording and a flamegraph.
- Loading branch information