Skip to content

Commit

Permalink
udpate dal collector info logs to warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed Jul 30, 2024
1 parent 41d41fd commit 8be5161
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions node/pkg/dal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,21 @@ func (c *Collector) receiveEach(ctx context.Context, configId int32) error {

func (c *Collector) processIncomingData(ctx context.Context, data aggregator.SubmissionData) {
symbol := c.Symbols[data.GlobalAggregate.ConfigID]
log.Info().Msgf(
"%s: %.2f seconds had passed when data is received",
symbol,
time.Since(data.GlobalAggregate.Timestamp).Seconds(),
)
diff := time.Since(data.GlobalAggregate.Timestamp).Seconds()
if diff > 3 {
log.Warn().Msgf(
"%s: %.2f seconds had passed when data is received",
symbol,
diff,
)
}

start := time.Now()
result, err := c.IncomingDataToOutgoingData(ctx, data)
log.Info().Msgf("%s took %.2f seconds to process", symbol, time.Since(start).Seconds())
diff = time.Since(start).Seconds()
if diff > 3 {
log.Warn().Msgf("%s took %.2f seconds to process", symbol)
}

if err != nil {
log.Error().Err(err).Str("Player", "DalCollector").Msg("failed to convert incoming data to outgoing data")
Expand Down

0 comments on commit 8be5161

Please sign in to comment.