Commit 96b0d8b
committed
Extend NIOEventLoopTickInfo with end-time and loop sleep time
Motivation:
NIO’s event loop can emit metrics. Currently, this includes the start time (i.e. when the loop started working) and the number of tasks which were executed in that tick.
It would be useful to collect the time the loop tick ended and the length of time the loop was asleep before starting the tick.
Modifications:
The event loop has a new property to track the time between runs. The tick info collects two new values:
* The time since the last run.
* The time the loop finished.
Result:
The new metrics are available for collection.1 parent c9e2ac1 commit 96b0d8b
File tree
2 files changed
+42
-8
lines changed- Sources/NIOPosix
- Tests/NIOPosixTests
2 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
| 72 | + | |
62 | 73 | | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
| 184 | + | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
| |||
246 | 260 | | |
247 | 261 | | |
248 | 262 | | |
| 263 | + | |
249 | 264 | | |
250 | 265 | | |
251 | 266 | | |
| |||
722 | 737 | | |
723 | 738 | | |
724 | 739 | | |
| 740 | + | |
725 | 741 | | |
726 | 742 | | |
| 743 | + | |
727 | 744 | | |
728 | 745 | | |
729 | 746 | | |
730 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
731 | 750 | | |
732 | 751 | | |
| 752 | + | |
733 | 753 | | |
734 | 754 | | |
735 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| 58 | + | |
55 | 59 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | | - | |
67 | | - | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
| |||
0 commit comments