Skip to content

Fine performance metrics: seceded tasks #7675

@crusaderky

Description

@crusaderky

As of #7586, seceded tasks don't receive any special treatment. This means that, when there are seceded tasks, the sum of Worker.digests_total["execute", *, *, "seconds"] could exceed the number of threads * worker uptime.

Add special consideration for seceded and rejoined tasks, so that only the time that is spent while not seceded goes into Worker.digests_total["execute", *, *, "seconds"].

Bonus deliverable

A CPU-heavy seceded task can cause regular tasks to exhibit a very high thread-noncpu time.
Measure CPU usage (time.thread_time()) while seceded and log it somewhere separate.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions