You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(console): add column descriptions for all tables (#431)
We often receive questions about the meaning of certain columns in the
different views in Tokio Console.
This change adds additional documentation to the `tokio-console` README
- which is also used in the docs.rs main page - describing each column
in the tasks, resources, and async ops tables. Where there are a fixed
set of values possible in the column, those values are also described.
Additionally, the 4 views are enumerated and separated into sections to
aid readability and allow deep linking.
Co-authored-by: Eliza Weisman <[email protected]>
*`Warn` - The number of warnings active for the task.
116
+
*`ID` - The ID of the task. This is the same as the value returned by the unstable [`tokio::task::Id`](https://docs.rs/tokio/latest/tokio/task/struct.Id.html) API (see documentation for details).
117
+
*`State` - The state of the task.
118
+
*`RUNNING`/▶ - Task is currently being polled.
119
+
*`IDLE`/⏸ - Task is waiting on some resource.
120
+
*`SCHED`/⏫ - Task is scheduled (it has been woken but not yet polled).
121
+
*`DONE`/⏹ - Task has completed.
122
+
*`Name` - The name of the task, which can be set when spawning a task using the unstable [`tokio::task::Builder::name()`](https://docs.rs/tokio/latest/tokio/task/struct.Builder.html#method.name) API.
123
+
*`Total` - Duration the task has been alive (sum of Busy, Sched, and Idle).
124
+
*`Busy` - Total duration for which the task has been actively executing.
125
+
*`Sched` - Total duration for which the task has been scheduled to be polled by the runtime.
126
+
*`Idle` - Total duration for which the task has been idle (waiting to be woken).
127
+
*`Polls` - Number of times the task has been polled.
128
+
*`Target` - The target of the span used to record the task.
129
+
*`tokio::task` - Async task.
130
+
*`tokio::task::blocking` - A blocking task (created with [tokio::task::spawn_blocking](https://docs.rs/tokio/latest/tokio/task/fn.spawn_blocking.html)).
131
+
*`Location` - The source code location where the task was spawned from.
132
+
*`Fields` - Additional fields on the task span.
133
+
*`kind` - may be `task` (for async tasks) or `blocking` (for blocking tasks).
134
+
*`fn` - function signature for blocking tasks. Async tasks don't record this field, as it is generally very large when using `async`/`await`.
135
+
105
136
Using the <kbd>↑</kbd> and <kbd>↓</kbd> arrow keys, an individual task can be highlighted.
106
137
Pressing<kbd>enter</kbd> while a task is highlighted displays details about that
Resources are displayed in a table similar to the task list.
159
+
160
+
*`ID` - The ID of the resource. This is a display ID as there is no internal resource ID to reference.
161
+
*`Parent` - The ID of the parent resource if it exists.
162
+
*`Kind` - The resource kind, this is a high level grouping of resources.
163
+
*`Sync` - Synchronization resources from [`tokio::sync`](https://docs.rs/tokio/latest/tokio/sync/index.html) such as [`Mutex`](https://docs.rs/tokio/latest/tokio/sync/struct.Mutex.html).
164
+
*`Timer` - Timer resources from [`tokio::time`](https://docs.rs/tokio/latest/tokio/time/index.html) such as [`Sleep`](https://docs.rs/tokio/latest/tokio/time/struct.Sleep.html).
165
+
*`Total` - Total duration that this resource has been alive.
166
+
*`Target` - The module path of the resource type.
167
+
*`Type` - The specific type of the resource, possible values depend on the resources instrumented in Tokio, which may vary between versions.
168
+
*`Vis` - The visibility of the resource.
169
+
*`INT`/🔒 - Internal, this resource is only used by other resources.
170
+
*`PUB`/✅ - Public, available in the public Tokio API.
171
+
*`Location` - The source code location where the resource was created.
172
+
*`Attributes` - Additional resource-dependent attributes, for example a resource of type `Sleep` record the `duration` of the sleep.
118
173
119
174
Pressing the <kbd>t</kbd> key switches the view back to the task list.
120
175
121
176
Like the task list view, the resource list view can be navigated using the
122
177
<kbd>↑</kbd> and <kbd>↓</kbd> arrow keys. Pressing <kbd>enter</kbd>
123
-
while a resource is highlighted displays details about that resource:
178
+
while a resource is highlighted displays details about that resource.
0 commit comments