1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! Mode-dependent operator step counts for profiler address tracking.
//!
//! **WARNING**: The step counts below have only been verified for `DatalogBatch`
//! and `DatalogInc` modes. Extended semantics (`ExtendBatch`, `ExtendInc`) may
//! generate additional operators (e.g. loop conditions, UDF pipelines) that are
//! not yet tracked by the profiler. Using `-P` with extended modes may produce
//! incorrect address mappings.
//!
//! Each count reflects the number of timely operators that DD
//! internally creates for the corresponding codegen pattern.
//!
//! Key facts:
//! - `stream.as_collection()` = 0 ops (just wraps)
//! - `arrangement.as_collection(|k,v|...)` = 1 op (AsCollection)
//! - `.inner.map(...).as_collection()` = 1 op (only the map)
//! - `.consolidate()` = 3 ops (FlatMap + Consolidate + AsCollection)
//! - `.threshold(...)` = 4 ops (FlatMap + Arrange:Threshold + Threshold + AsCollection)
//! - `.threshold_semigroup(...)` = 3 ops (FlatMap + Arrange:ThresholdTotal + ThresholdTotal)
use crateExecutionMode;
use crateProfiler;