-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Export distribution versions #2014
base: main
Are you sure you want to change the base?
Conversation
|
||
fmt.Printf( | ||
"[%s] Completed exporting distribution module from %d to %d. Total keys: %d. Duration: %s\n", | ||
time.Now().Format(time.RFC3339), startVersion, endVersion, totalExported, time.Since(startTime), |
Check warning
Code scanning / CodeQL
Calling the system time Warning
startVersion, endVersion int64, | ||
) error { | ||
fmt.Printf("Starting export at %s for versions [%d..%d]\n", | ||
time.Now().Format(time.RFC3339), startVersion, endVersion, |
Check warning
Code scanning / CodeQL
Calling the system time Warning
) | ||
|
||
var totalExported int | ||
startTime := time.Now() |
Check warning
Code scanning / CodeQL
Calling the system time Warning
// Optional progress logging every 1,000,000 keys: | ||
if totalExported%1_000_000 == 0 { | ||
fmt.Printf("[SingleWorker][%s] Exported %d distribution keys so far\n", | ||
time.Now().Format(time.RFC3339), totalExported, |
Check warning
Code scanning / CodeQL
Calling the system time Warning
} | ||
if stop { | ||
fmt.Printf("[SingleWorker][%s] Iteration stopped early; callback returned true at some point.\n", | ||
time.Now().Format(time.RFC3339), |
Check warning
Code scanning / CodeQL
Calling the system time Warning
"[%s] Completed exporting distribution store for versions [%d..%d]. Total keys: %d. Duration: %s\n", | ||
time.Now().Format(time.RFC3339), startVersion, endVersion, totalExported, time.Since(startTime), | ||
) | ||
fmt.Printf("Finished export at %s\n", time.Now().Format(time.RFC3339)) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2014 +/- ##
==========================================
- Coverage 61.64% 61.53% -0.12%
==========================================
Files 365 263 -102
Lines 26178 24525 -1653
==========================================
- Hits 16138 15091 -1047
+ Misses 8967 8309 -658
- Partials 1073 1125 +52 |
Describe your changes and provide context
Testing performed to validate your change