Skip to content

Conversation

@vm-001
Copy link
Collaborator

@vm-001 vm-001 commented Mar 14, 2025

Summary

This PR optimizes the attempt_details insertion performance.

  • using text type to get a slight performance improvement
  • using channel as queue to implement batch insertion

@vm-001 vm-001 requested a review from cchenggit March 14, 2025 08:59
@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 89 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
worker/worker.go 0.00% 62 Missing ⚠️
db/dao/attempt_detail_dao.go 0.00% 15 Missing ⚠️
db/entities/types.go 0.00% 7 Missing ⚠️
dispatcher/dispatcher.go 0.00% 4 Missing ⚠️
app/app.go 0.00% 1 Missing ⚠️
Flag Coverage Δ
integration ?
unit 12.26% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/taskqueue/queue.go 0.00% <ø> (-66.67%) ⬇️
app/app.go 0.00% <0.00%> (-74.73%) ⬇️
dispatcher/dispatcher.go 0.00% <0.00%> (-73.95%) ⬇️
db/entities/types.go 0.00% <0.00%> (-50.00%) ⬇️
db/dao/attempt_detail_dao.go 0.00% <0.00%> (-100.00%) ⬇️
worker/worker.go 0.00% <0.00%> (-77.32%) ⬇️

... and 92 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vm-001 vm-001 force-pushed the perf/batch-insert-attempt-detail branch 11 times, most recently from 7fb42c9 to 31940e1 Compare March 14, 2025 10:41
@webhookx-x webhookx-x force-pushed the perf/batch-insert-attempt-detail branch from 31940e1 to 260b074 Compare March 18, 2025 10:20
return *plugins, err
}

func (w *Worker) consumeAttemptDetails() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking: consider graceful shutdown when context done.

@vm-001 vm-001 force-pushed the perf/batch-insert-attempt-detail branch from 260b074 to 10a95f1 Compare June 6, 2025 15:22
@webhookx-x
Copy link
Contributor

bugbot run

@vm-001 vm-001 marked this pull request as draft June 26, 2025 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants