apollo_network_benchmark: add seconds_since_epoch helper function#11559
Conversation
This was referenced Jan 8, 2026
Contributor
Author
This was referenced Jan 8, 2026
|
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
| pub fn seconds_since_epoch() -> u64 { | ||
| let now = SystemTime::now(); | ||
| now.duration_since(UNIX_EPOCH).unwrap().as_secs() | ||
| } |
There was a problem hiding this comment.
New exported function seconds_since_epoch is unused
Low Severity
The newly added pub fn seconds_since_epoch() has no callers anywhere in the codebase. A grep for seconds_since_epoch returns only the definition itself. If this is intended for a downstream PR in the stack, it may be better to introduce it together with its usage to avoid dead code in the interim.
6e7d057 to
ffaea93
Compare
ffaea93 to
c686f08
Compare
64dcc25 to
8cd5e64
Compare
This was referenced Feb 19, 2026
8cd5e64 to
f8aaeb3
Compare
c686f08 to
a5e0165
Compare
a5e0165 to
1d13062
Compare
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.



Note
Low Risk
Adds a small utility function and adjusts imports in a benchmark binary; minimal behavioral impact aside from potential panic if system time is before the Unix epoch.
Overview
Adds
seconds_since_epoch()tobroadcast_network_stress_test_node/metrics.rsto expose the current Unix timestamp in seconds (viaSystemTime/UNIX_EPOCH). Updates the module’sstd::timeimports accordingly; no other benchmark/metrics logic changes.Written by Cursor Bugbot for commit 1d13062. This will update automatically on new commits. Configure here.