[Util] Introducing RoughTimestamp for second-level granularity timestamps#4572
Open
AhmedSoliman wants to merge 1 commit intomainfrom
Open
[Util] Introducing RoughTimestamp for second-level granularity timestamps#4572AhmedSoliman wants to merge 1 commit intomainfrom
AhmedSoliman wants to merge 1 commit intomainfrom
Conversation
This was referenced Apr 9, 2026
Draft
Test Results 7 files - 1 7 suites - 1 5m 3s ⏱️ + 2m 25s Results for commit 701c5d7. ± Comparison against base commit 5560b2f. This pull request removes 4 tests.♻️ This comment has been updated with latest results. |
…amps 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This timestamp type is intended to be used for invocation scheduling and the
RunAtfield 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.
Stack created with Sapling. Best reviewed with ReviewStack.