chore: small replayer fixes (#3081)

This commit is contained in:
Vladislav 2024-05-25 22:48:29 +03:00 committed by GitHub
parent 42500c3d1e
commit fd5ece09fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,6 @@ import (
"fmt" "fmt"
"log" "log"
"math" "math"
"os"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
@ -108,7 +107,7 @@ func (w *FileWorker) Run(file string, wg *sync.WaitGroup) {
}) })
if err != nil { if err != nil {
log.Fatalf("Could not parse records!") log.Fatalf("Could not parse records for file %s: %v", file, err)
} }
for _, client := range clients { for _, client := range clients {
@ -139,7 +138,7 @@ func RenderTable(area *pterm.AreaPrinter, files []string, workers []FileWorker)
func main() { func main() {
flag.Parse() flag.Parse()
files := os.Args[1:] files := flag.Args()
timeOffset := time.Now().Add(500 * time.Millisecond).Sub(DetermineBaseTime(files)) timeOffset := time.Now().Add(500 * time.Millisecond).Sub(DetermineBaseTime(files))
fmt.Println("Offset -> ", timeOffset) fmt.Println("Offset -> ", timeOffset)