Skip to content

feat: optimize DB performance#965

Merged
hwbrzzl merged 3 commits intomasterfrom
bowen/benchmark-db
Mar 22, 2025
Merged

feat: optimize DB performance#965
hwbrzzl merged 3 commits intomasterfrom
bowen/benchmark-db

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Mar 20, 2025

📑 Description

✅ Checks

  • Added test cases for my code

Copilot AI 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
Copy link
Contributor

Copilot AI left a comment

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.

@codecov
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 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.

2 participants