Skip to content

Commit

Permalink
add duration to summary log
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthgoli committed Jan 9, 2025
1 parent aa59ac1 commit 8d9bdfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/blockbuilder/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ func (i *BlockBuilder) runOne(ctx context.Context, c *kgo.Client, workerID strin

func (i *BlockBuilder) processJob(ctx context.Context, c *kgo.Client, job *types.Job, logger log.Logger) (lastOffsetConsumed int64, err error) {
level.Debug(logger).Log("msg", "beginning job")
start := time.Now()

indexer := newTsdbCreator()
appender := newAppender(i.id,
Expand Down Expand Up @@ -506,6 +507,7 @@ func (i *BlockBuilder) processJob(ctx context.Context, c *kgo.Client, job *types
level.Info(logger).Log(
"msg", "successfully processed job",
"last_offset", lastOffset,
"duration", time.Since(start),
)

return lastOffset, nil
Expand Down

0 comments on commit 8d9bdfc

Please sign in to comment.