Skip to content

Issue #224: Add task load metric#225

Open
jaypha wants to merge 2 commits into
MOODLE_500_STABLEfrom
224-task-load-metric
Open

Issue #224: Add task load metric#225
jaypha wants to merge 2 commits into
MOODLE_500_STABLEfrom
224-task-load-metric

Conversation

@jaypha

@jaypha jaypha commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Resolves #224

Includes support for MDL-85173, with a fallback to using the task log database.
Fixes database collector to convert to floats rather than ints.

Testing:

Keep the metric constant, also set it to be every minute:

watch -n 15 "php admin/cli/scheduled_task.php --execute='\tool_cloudmetrics\task\collect_metrics_task'"

Loading tasks and running tasks

php public/admin/tool/testtasks/cli/queue_adhoc_tasks.php -n=350 -c='\tool_testtasks\task\two_second_task'
php public/admin/tool/testtasks/cli/queue_adhoc_tasks.php -n=350 -c='\tool_testtasks\task\ten_second_task'

@jaypha jaypha force-pushed the 224-task-load-metric branch 5 times, most recently from 1942d0e to 555800a Compare June 20, 2026 10:42
@jaypha jaypha marked this pull request as ready for review June 20, 2026 10:47
Comment thread classes/metric/task_load_metric.php Outdated
@jaypha jaypha force-pushed the 224-task-load-metric branch 4 times, most recently from 86207da to 2126cbe Compare July 2, 2026 23:59
@jaypha jaypha force-pushed the 224-task-load-metric branch from 2126cbe to b8a8868 Compare July 3, 2026 00:07
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.

Add a metric for anticipated task load.

2 participants