Skip to content
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

Merged
merged 10 commits into from
Jul 23, 2024
Merged

Implements per tube statistics #19

merged 10 commits into from
Jul 23, 2024

Conversation

ochaton
Copy link
Member

@ochaton ochaton commented Mar 21, 2023

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 field tube along with counts and transition. Each value for tube is table of counts and transition 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 tube A 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)

@@ -44,8 +44,8 @@ do
end

require 'xqueue'.upgrade(box.space.utube, {
format = box.space.utube:format(),
Copy link
Contributor

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

Copy link
Member Author

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?

xqueue.lua Show resolved Hide resolved
xqueue.lua Outdated Show resolved Hide resolved
@ochaton ochaton merged commit 577b9ea into master Jul 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants