-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements per tube statistics #19
Conversation
@@ -44,8 +44,8 @@ do | |||
end | |||
|
|||
require 'xqueue'.upgrade(box.space.utube, { | |||
format = box.space.utube:format(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have no sense.
If space has format, just omit it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think that setting format in xqueue.upgrade is useless, and maybe we should deprecate this at all?
This patch adds statistics for tubes.
Developer must set list of tubes they want to get statistics for. Initial load is performed the same way as for default by status statistics. _on_replace trigger is slightly patched to perform track status change inside tubes and records transitions.
xqueue:stats()
now returns fieldtube
along withcounts
andtransition
. Each value fortube
is table ofcounts
andtransition
with the same semantics.Also added new meta-status
S
for cross-tubes transitions (X already used as not exists). It is possible to :release() task in tubeA
with update{ '=', 'tube', 'B' }
, with this operation task will be "removed" from tube A and "placed" into tube B.It is not the same as :ack + :put. So now, in statistics, if both tubes are monitored, user may see pair of transitions T->S (for tube A) and S->R (for tube B). S for tranSition (maybe you have better letter for this)