Commit 701c5d7
committed
[Util] Introducing RoughTimestamp for second-level granularity timestamps
This timestamp type is intended to be used for invocation scheduling and the `RunAt` field of vqueues.
While it's internally represented as 4-byte integer, it'll be serialized as u63 (yes, missing one bit) in
EntryKey. This is done to allow future expansion of the granularity if needed.
The granularity is chosen to be second-level to (a) reflect the realistic expecations of invocation scheduling
and (b) to allow invocations in queues to be reordered dynamically withing a single-second window based on
their sequence ordering.
Some helpers in this type are not used (floor_to_minute, smear_to_minute) but are kept for future use if we need to
use this type for coarse jittering or if we need to expand the window-bucketing further.1 parent 5560b2f commit 701c5d7
4 files changed
+471
-1
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments