Skip to content

Commit

Permalink
🧹 Log query duration (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaym authored Jan 22, 2024
1 parent 41fa67a commit baeddce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion policy/executor/internal/execution_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,13 @@ func (em *executionManager) executeCodeBundle(codeBundle *llx.CodeBundle, props
var err error

codeID := codeBundle.CodeV2.GetId()
startTime := time.Now()
log.Debug().Str("qrid", codeID).Msg("starting query execution")
defer func() {
log.Debug().Str("qrid", codeID).Msg("finished query execution")
log.Debug().
Str("qrid", codeID).
Dur("duration", time.Since(startTime)).
Msg("finished query execution")
}()
// TODO(jaym): sendResult may not be correct. We may need to fill in the
// checksum
Expand Down

0 comments on commit baeddce

Please sign in to comment.