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

[db] Use UnixMilli() instead of Unix() for createdAt / updatedAt #606

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

scthi
Copy link
Contributor

@scthi scthi commented Nov 16, 2023

Use UnixMilli() instead of Unix() for createdAt / updatedAt
The increased precision avoids the need of time.Sleep() in tests

This further reduces the test execution time. For db_test.go down to ~4.5s on my machine.

Bildschirmfoto 2023-11-16 um 12 47 27

@scthi scthi force-pushed the improve-db-test-performance-2 branch 2 times, most recently from 8691e36 to d00771c Compare November 16, 2023 11:46
@scthi scthi force-pushed the improve-db-test-performance branch from 9f35d11 to 57fd1d2 Compare November 16, 2023 12:42
@scthi scthi force-pushed the improve-db-test-performance-2 branch 3 times, most recently from 4432a6b to 2832e75 Compare November 16, 2023 12:48
Base automatically changed from improve-db-test-performance to main November 16, 2023 13:10
The increased precision avoids the need of time.Sleep() in tests
@scthi scthi force-pushed the improve-db-test-performance-2 branch from 2832e75 to 3a9038d Compare November 16, 2023 13:12
@scthi scthi marked this pull request as ready for review November 16, 2023 13:13
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0130d2b) 72.23% compared to head (3a9038d) 72.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #606      +/-   ##
==========================================
- Coverage   72.23%   72.22%   -0.01%     
==========================================
  Files         430      430              
  Lines       66635    66635              
  Branches     2879     2877       -2     
==========================================
- Hits        48132    48127       -5     
- Misses      18199    18205       +6     
+ Partials      304      303       -1     
Flag Coverage Δ
go 71.45% <100.00%> (-0.04%) ⬇️
node-app 0.00% <ø> (ø)
node-azure 94.62% <ø> (ø)
node-core 42.10% <ø> (ø)
node-datadog 92.84% <ø> (ø)
node-elasticsearch 91.73% <ø> (ø)
node-flux 65.99% <ø> (ø)
node-github 98.30% <ø> (ø)
node-grafana 89.65% <ø> (ø)
node-harbor 94.88% <ø> (ø)
node-helm 99.15% <ø> (ø)
node-jaeger 90.96% <ø> (ø)
node-jira 95.66% <ø> (ø)
node-kiali 89.93% <ø> (-0.05%) ⬇️
node-klogs 93.45% <ø> (ø)
node-mongodb 95.88% <ø> (ø)
node-opsgenie 83.77% <ø> (ø)
node-prometheus 88.16% <ø> (ø)
node-rss 96.16% <ø> (ø)
node-runbooks 96.36% <ø> (ø)
node-signalsciences 97.47% <ø> (ø)
node-sonarqube 96.12% <ø> (ø)
node-sql 88.83% <ø> (ø)
node-techdocs 94.20% <ø> (ø)
node-velero 82.44% <ø> (ø)

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

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

@scthi scthi requested a review from ricoberger November 16, 2023 13:18
@scthi scthi merged commit 886bb38 into main Nov 16, 2023
29 of 30 checks passed
@scthi scthi deleted the improve-db-test-performance-2 branch November 16, 2023 13:46
@ricoberger ricoberger added the changelog: changed Something was changed or updated label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: changed Something was changed or updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants