Skip to content
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

Relationships between tasks and resources #155

Open
zaharidichev opened this issue Sep 20, 2021 · 0 comments
Open

Relationships between tasks and resources #155

zaharidichev opened this issue Sep 20, 2021 · 0 comments
Labels
C-console Crate: console. S-feature Severity: feature. This is adding a new feature.

Comments

@zaharidichev
Copy link
Collaborator

zaharidichev commented Sep 20, 2021

Tasks and their parents

To build the tree of tasks, we need to know that a task has been spawned in the context of another task. For that purpose, we can introduce a parent_id field in the Task message. This will be optional and will contain the span if of the parent of the task. We should apply the filtering necessary to ensure that this field is populated only with IDs that correspond to tasks, not other spans.

Resources and async ops

Each async op should be associated with one resource. We already have this data as each async op has a resource_id field.

Resources and other resources

There are cases when a resource can be a child of another resource. One such example is RwLock which uses a Semaphore internally. It feels like we want to capture this relationship. That being said, each resource should have an optional parent_id field.

Tasks and resources.

We want to be able to show the interaction between resources and tasks. More precisely, we want to show that a task is waiting on a resource. Multiple tasks can wait on a single resource at a time. This association is done via async ops. Each async operation message has a task_id field. This means that we now have all the data to show when a task is awaiting on a resource and which resource/async op that is.

Potential UI changes:

Waiting on section in Task details

The most noninvasive change we can do is to add a section in the task details view that shows us the resources this particular task is waiting on. I assume that the mechanics of doing that is looking at all pending async ops that are present and showing the resource information for both the resource as well as the async op.

Tree view

Tasks tree view

This will show a tree view of tasks and their children, we will be able to collapse/expand nodes and navigate through the tree. Each time we select a task from the tree, we can show its details in a side pain.

Resource tree view

This will show a tree of resource and their children. The leaf nodes can be either other resources or async ops that are currently live for this resource. Again selecting any of the nodes will show the details. Of course, details will be different based on whether this is an async op or a resource.

@hawkw hawkw added C-console Crate: console. S-feature Severity: feature. This is adding a new feature. labels Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-console Crate: console. S-feature Severity: feature. This is adding a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants