Commit 6615373
authored
Beacon sync maint update (#3520)
* Move thread switch nano-sleep into `importBlock()` function
why
That way it becomes easier to capture internal states for
trace/replay.
Previously, the nano-sleep thread switch was stated after
`importBlock()` as a separate directive. So there is no functional
change for the production environment.
* Move async idle times from `runDaemon()` and `runPeer()` to scheduler
why
The sleep function extends the minimum idle wait imposed by the
scheduler if there is nothing to do.
By moving it there, the `runPeer()` directive becomes more environment
capture friendly for trace/replace.
The functionality of the production system is not affected.
* Dissolve generic async functions as templates
why
This change is inspired by trace/replay considerations.
For the production system, this change reduces the number of
*floating* async closures which are unnecessary and reduces the
`chronos` overhead.
These *floating* async closures appear when writing nested functions
(rather than a big one) where some leaf functions call async closures
as it is common with network communication.
* Move out most metrics gauge handling to dedicated source files
why
Reduces latency when updated right with the state/counter changes.
todo
Move some gauges to `FC` module1 parent 35b4db5 commit 6615373
File tree
18 files changed
+924
-814
lines changed- execution_chain
- core/chain
- sync
- beacon
- worker
- blocks
- headers
- update
18 files changed
+924
-814
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
318 | 322 | | |
319 | 323 | | |
320 | 324 | | |
| 325 | + | |
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| |||
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
352 | | - | |
353 | | - | |
354 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
355 | 362 | | |
356 | 363 | | |
357 | 364 | | |
| |||
543 | 550 | | |
544 | 551 | | |
545 | 552 | | |
| 553 | + | |
546 | 554 | | |
547 | 555 | | |
548 | 556 | | |
| |||
582 | 590 | | |
583 | 591 | | |
584 | 592 | | |
| 593 | + | |
585 | 594 | | |
586 | 595 | | |
587 | 596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 27 | + | |
| 28 | + | |
41 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
42 | 34 | | |
43 | 35 | | |
44 | 36 | | |
| |||
107 | 99 | | |
108 | 100 | | |
109 | 101 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
114 | 105 | | |
115 | 106 | | |
116 | 107 | | |
117 | 108 | | |
118 | 109 | | |
119 | 110 | | |
120 | 111 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
125 | 123 | | |
126 | | - | |
127 | | - | |
| 124 | + | |
| 125 | + | |
128 | 126 | | |
129 | | - | |
130 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
131 | 130 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 131 | + | |
| 132 | + | |
135 | 133 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 134 | + | |
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
| |||
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
170 | 165 | | |
171 | 166 | | |
172 | 167 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| |||
0 commit comments