Created
August 9, 2022 12:25
-
-
Save adamzero1/db76ee25df84f064cbd1b431b275b0d2 to your computer and use it in GitHub Desktop.
Report on average,min and max run time (in seconds) of all completed jobs in Magento 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select job_code, | |
avg(timestampdiff(second, executed_at, finished_at)) as average_run_time, | |
min(timestampdiff(second, executed_at, finished_at)) as min_run_time, | |
max(timestampdiff(second, executed_at, finished_at)) as max_run_time | |
from cron_schedule where executed_at is not null and finished_at is not null group by job_code order by max(timestampdiff(second, executed_at, finished_at)) desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment