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
Hi,
In my system I had a latency issue between my the web-server and the redis redis. This led me to discover some inefficiency in the metrics logic when updating metrics.
For each key a separate incrementation is performed which leads to multiple redis calls.
Better to use a pipe here and update all keys in a single api call.
Hi @odedfos, this seems like a great idea. Do you mind making the change, and sending me a pull request, so I can merge? Be sure to add yourself to AUTHORS.rst as well.
Hi,
In my system I had a latency issue between my the web-server and the redis redis. This led me to discover some inefficiency in the metrics logic when updating metrics.
checkout
def metric(self, slug, num=1, category=None, expire=None)
in https://github.com/bradmontgomery/django-redis-metrics/blob/master/redis_metrics/models.py [331]
For each key a separate incrementation is performed which leads to multiple redis calls.
Better to use a pipe here and update all keys in a single api call.
for example:
Cheers!
The text was updated successfully, but these errors were encountered: