-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[TaskProcessing] Add start, stop and schedule time to tasks #46359
Conversation
8c78b7f
to
6c2c31a
Compare
Can we hook into the system report command? If not, I'd vote for a separate command |
6c2c31a
to
431cc79
Compare
parent::__construct(); | ||
} | ||
|
||
protected function configure() { |
Check notice
Code scanning / Psalm
MissingReturnType Note
parent::__construct(); | ||
} | ||
|
||
protected function configure() { |
Check notice
Code scanning / Psalm
MissingReturnType Note
9a6183a
to
f69cf17
Compare
Let's make occ commands. Updates are in the PR initial comment. |
$averageUserWaitingTime = (int)($totalUserWaitingTime / $userWaitingTimeCount); | ||
$stats['Average user waiting time'] = $averageUserWaitingTime; | ||
$stats['User waiting time count'] = $userWaitingTimeCount; | ||
} |
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.
Mmh, using SQL directly may be faster and a bit more idomatic, perhaps. Not sure if it's possible, though.
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.
bah, we can do that if it becomes relevant, I guess. This is probably good enough for now
In our brainstorm we also had the idea to maybe record the I/O size. E.g. we could record the byte size of the JSON encoded input, as well as the output. What do you think? |
Fine by me. So we can take the size of the JSON but we also need the size of the input/output files, right? |
Perhaps let's leave the files out for now? |
cee79b5
to
5c8bbd9
Compare
Perhaps also an app filter? |
2076e99
to
0f2da49
Compare
$qb->andWhere($qb->expr()->isNotNull('ended_at')); | ||
$qb->andWhere($qb->expr()->lt('ended_at', $qb->createPositionalParameter($endedBefore, IQueryBuilder::PARAM_INT))); | ||
} | ||
return array_values($this->findEntities($qb)); |
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.
Should we have db indeces for these?
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 since the amount of task is limited by the cleanup bg job, it's fine. Feel free to add indices in this branch if you think it's necessary.
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
70f7a73
to
c004f53
Compare
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.
great changes, you will be able to see statistics on average how long each task was executed. nice!
taskprocessing:task:list
occ commandtaskprocessing:task:stats
occ commandBoth commands accept those filters: