Skip to content

Comments

refactor: Start passing ServiceState into providers#366

Merged
gtema merged 1 commit intomainfrom
pass_state
Nov 15, 2025
Merged

refactor: Start passing ServiceState into providers#366
gtema merged 1 commit intomainfrom
pass_state

Conversation

@gtema
Copy link
Collaborator

@gtema gtema commented Nov 15, 2025

In order to make providers easier it makes much more sense to pass the
overall app state instead of database connection and provider manager.
This way every backend is able to extract only the information it really
needs and we do not need to extend methods once we figure out that we
need to pass something else.

@github-actions
Copy link

github-actions bot commented Nov 15, 2025

🐰 Bencher Report

Branchpass_state
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
fernet token/projectLatency
microseconds (µs)
📈 plot
🚷 threshold
🚨 alert (🔔)
1.49 µs
(+27.03%)Baseline: 1.18 µs
1.44 µs
(103.42%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
fernet token/project📈 view plot
🚷 view threshold
🚨 view alert (🔔)
1,493.20 ns
(+27.03%)Baseline: 1,175.47 ns
1,443.79 ns
(103.42%)

get_fernet_token_timestamp/project📈 view plot
🚷 view threshold
162.09 ns
(+4.65%)Baseline: 154.89 ns
186.36 ns
(86.98%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link

github-actions bot commented Nov 15, 2025

🦢 Load Test Results

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 25-11-15 12:15:52 25-11-15 12:15:54 00:00:02 0 → 4
Maintaining 25-11-15 12:15:54 25-11-15 12:16:24 00:00:30 4
Decreasing 25-11-15 12:16:24 25-11-15 12:16:24 00:00:00 0 ← 4

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
GET 14745 0 7.63 6 13 491.50 0.00
Aggregated 14745 0 7.63 6 13 491.50 0.00

Response Time Metrics

Method Name 50%ile (ms) 60%ile (ms) 70%ile (ms) 80%ile (ms) 90%ile (ms) 95%ile (ms) 99%ile (ms) 100%ile (ms)
GET 8 8 8 8 8 9 10 13
Aggregated 8 8 8 8 8 9 10 13

Status Code Metrics

Method Name Status Codes
GET 14,745 [200]
Aggregated 14,745 [200]

Transaction Metrics

Transaction # Times Run # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
ListUsers
0.0 0 0 0.00 0 0 0.00 0.00
0.1 14745 0 7.66 6 13 491.50 0.00
Aggregated 14745 0 7.63 6 13 491.50 0.00

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
ListUsers 4 14741 7.66 6 13 491.37 3685.25
Aggregated 4 14741 7.66 6 13 491.37 3685.25

Error Metrics

Method Name # Error

View full report

In order to make providers easier it makes much more sense to pass the
overall app state instead of database connection and provider manager.
This way every backend is able to extract only the information it really
needs and we do not need to extend methods once we figure out that we
need to pass something else.
@gtema gtema merged commit 776247f into main Nov 15, 2025
19 checks passed
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.

1 participant