Skip to content

Commit dd5f439

Browse files
committed
Further updates, gate example
1 parent 3d5f897 commit dd5f439

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

mdbook/src/chapter_5/chapter_5_4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ You would see structural events like:
175175
6. `OperatesEvent { id: _, addr: [0, 3], name: "Inspect" }` — the inspect, in the root scope.
176176

177177
Channel events in the root scope (`scope_addr: [0]`) connecting `Input` to the iterative scope:
178-
- `ChannelsEvent { scope_addr: [0], source: (1, 0), target: (2, 0), ... }` — from Input's output 0 to the iterative scope's input 0.
178+
- `ChannelsEvent { scope_addr: [0], source: (1, 0), target: (2, 0), ... }` — from Input (index 1) output 0 to the iterative scope (index 2) input 0.
179179

180180
Channel events inside the iterative scope (`scope_addr: [0, 2]`):
181181
- `ChannelsEvent { scope_addr: [0, 2], source: (0, 0), target: (1, 0), ... }` — from child zero's output 0 (= scope input 0) to Map's input 0.
@@ -195,7 +195,7 @@ To reconstruct the dataflow graph from logged events:
195195

196196
2. **Build per-scope channel graphs** from `ChannelsEvent` entries. Group channels by `scope_addr`. Within each scope, the `source` and `target` pairs give you directed edges between scope-local operator indices.
197197

198-
3. **Stitch across scope boundaries** using child zero. When a channel in scope `S` has source or target operator index 0, it connects to the scope's external interface. Find the operator in `S`'s parent whose `addr` equals `S`, and link the corresponding port.
198+
3. **Stitch across scope boundaries** using child zero. When a channel in scope `S` has source or target operator index 0, it connects to the scope's external interface. Find the operator in `S`'s parent that represents this scope, and link the corresponding port.
199199

200200
4. **Correlate runtime events** using the worker-unique `id` from `OperatesEvent` to join `ScheduleEvent`, `ShutdownEvent`, and other events. Use `ChannelsEvent::id` to join `MessagesEvent` records to their channel.
201201

timely/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ timely_communication = { path = "../communication", version = "0.27", default-fe
3737
timely_container = { path = "../container", version = "0.27" }
3838
smallvec = { version = "1.15.1", features = ["serde", "const_generics"] }
3939
tungstenite = { version = "0.26", optional = true }
40+
41+
[[example]]
42+
name = "logging-live"
43+
required-features = ["visualizer"]

timely/src/logging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<P, C> Drop for BatchLogger<P, C> where P: EventPusher<Duration, C> {
6464
pub struct OperatesEvent {
6565
/// Worker-unique identifier for the operator.
6666
pub id: usize,
67-
/// Sequence of nested scope identifiers indicating the path from the root to the scope containing this operator.
67+
/// Sequence of nested scope identifiers indicating the path from the root to this operator.
6868
pub addr: Vec<usize>,
6969
/// A helpful name.
7070
pub name: String,
@@ -85,7 +85,7 @@ pub struct OperatesSummaryEvent<TS> {
8585
pub struct ChannelsEvent {
8686
/// Worker-unique identifier for the channel
8787
pub id: usize,
88-
/// Sequence of nested scope identifiers indicating the path from the root to this instance.
88+
/// Sequence of nested scope identifiers indicating the path from the root to the scope containing this channel.
8989
pub scope_addr: Vec<usize>,
9090
/// Source descriptor, indicating operator index and output port.
9191
pub source: (usize, usize),

0 commit comments

Comments
 (0)