Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize DB performance #965

Merged
merged 3 commits into from
Mar 22, 2025
Merged

feat: optimize DB performance #965

merged 3 commits into from
Mar 22, 2025

Conversation

hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Mar 20, 2025

📑 Description

✅ Checks

  • Added test cases for my code

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@Copilot Copilot bot review requested due to automatic review settings March 20, 2025 15:47
@hwbrzzl hwbrzzl requested a review from a team as a code owner March 20, 2025 15:47
@hwbrzzl hwbrzzl changed the title chore: add benchmark test for DB feat: optimize DB performance Mar 20, 2025
@hwbrzzl hwbrzzl marked this pull request as draft March 20, 2025 15:47

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds benchmark tests to evaluate database operations and improves logger variable consistency while updating model struct annotations. Key changes include:

  • Addition of Benchmark_Orm benchmark in tests/query_test.go.
  • Addition of Benchmark_DB benchmark in tests/db_test.go.
  • Consolidation of trace string variables in database/logger/logger.go.
  • Update of the Author struct in tests/models.go with a db tag.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/query_test.go Introduced Benchmark_Orm for benchmarking DB operations.
tests/db_test.go Introduced Benchmark_DB for benchmarking DB operations.
database/logger/logger.go Moved trace variable declarations to package scope.
tests/models.go Added db:"name" annotation in Author struct.
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.31%. Comparing base (0232bce) to head (8082210).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #965   +/-   ##
=======================================
  Coverage   69.31%   69.31%           
=======================================
  Files         160      160           
  Lines       10713    10713           
=======================================
  Hits         7426     7426           
  Misses       2951     2951           
  Partials      336      336           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

hwbrzzl added 2 commits March 21, 2025 20:53

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@hwbrzzl hwbrzzl marked this pull request as ready for review March 22, 2025 11:30
@hwbrzzl hwbrzzl merged commit 8b4882c into master Mar 22, 2025
13 checks passed
@hwbrzzl hwbrzzl deleted the bowen/benchmark-db branch March 22, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant