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
Is your feature request related to a problem? Please describe
I am using the dispatch method to send redis requests and I would like to monitor the command completion latency,
I have read the code and found that when latency recording is enabled, the lettuce will create another object wrapping my command, this will create too many objects especially when there is a high volume of requests.
I have seen the code and found that if the command is an instance of WithLatency, it will not create another object, which is a good way to avoid object creation.
But the WithLatency interface can't be reached out of the package because it is only visable from the same package.
Describe the solution you'd like
Make the WithLatency interface visable out side its package so that users can custmize their own commands.
By "when latency recording is enabled, the lettuce will create another object wrapping my command", I have checked the code, when commandLatencyRecorder is used, the command will be wrapped in another object, the code is in CommandHandler.potentiallyWrapLatencyCommand:
Feature Request
Is your feature request related to a problem? Please describe
I am using the
dispatch
method to send redis requests and I would like to monitor the command completion latency,I have read the code and found that when latency recording is enabled, the lettuce will create another object wrapping my command, this will create too many objects especially when there is a high volume of requests.
I have seen the code and found that if the command is an instance of WithLatency, it will not create another object, which is a good way to avoid object creation.
But the WithLatency interface can't be reached out of the package because it is only visable from the same package.
Describe the solution you'd like
Make the
WithLatency
interface visable out side its package so that users can custmize their own commands.Describe alternatives you've considered
There is no other alternatives for now.
Teachability, Documentation, Adoption, Migration Strategy
If the WithLatency interface is visable, we can implement our own commands which reduces objects creation.
The text was updated successfully, but these errors were encountered: