How to help Instrument's Swift task task lifetime summary group the same tasks so that the count for tasks is not always 1.

This is a screenshot from the Swift Task track in Xcode.

I made these tasks with

public actor ResourceManager {
    func foo() {
            for observer in observers {
                Task(name: "ResourceManager notify observers") {
                    await notification(observer)
                }
            }
    }
}

I am confused why each of the task is showing as a separate task in the task lifetime summary. Is there a way to queue the trace in Instruments into the fact that these are indeed the same task?

Hi CalebAKA,

This view is breaking down these statistics per unique task. If you expand the "Swift Task" column you should see that these names have the task id as the suffix. However, adding an additional layer of grouping by developer provided task names seems reasonable. I would encourage you to file a feedback report using the feedback assistant.

How to help Instrument's Swift task task lifetime summary group the same tasks so that the count for tasks is not always 1.
 
 
Q