Skip to content

refactor: migrate GetStops() from in-memory to database query#847

Merged
Ahmedhossamdev merged 5 commits intomainfrom
refactor/migrate-get-stops-to-db
Apr 11, 2026
Merged

refactor: migrate GetStops() from in-memory to database query#847
Ahmedhossamdev merged 5 commits intomainfrom
refactor/migrate-get-stops-to-db

Conversation

@Ahmedhossamdev
Copy link
Copy Markdown
Member

@Ahmedhossamdev Ahmedhossamdev commented Apr 9, 2026

Fixes: #825
Part of: #820

Summary

  • Replaces manager.gtfsData.Stops (in-memory slice) with manager.GtfsDB.Queries.ListStops(ctx) in GetStops()
  • Updates all 35 call sites across 7 test files to use the new DB-backed method
  • Adds mustGetStops test helper that uses GetActiveStops (stops with stop times) so tests always get stops that have routes and valid names

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 2.3 ms
Error rate 0.00%
Total requests 339
Req/sec 11.1

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

@Ahmedhossamdev Ahmedhossamdev marked this pull request as ready for review April 9, 2026 01:41
@Ahmedhossamdev Ahmedhossamdev force-pushed the refactor/migrate-get-stops-to-db branch from 8c361d2 to d2d3052 Compare April 10, 2026 01:48
@github-actions
Copy link
Copy Markdown

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 3.5 ms
Error rate 0.00%
Total requests 332
Req/sec 10.9

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

@github-actions
Copy link
Copy Markdown

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 3.4 ms
Error rate 0.00%
Total requests 335
Req/sec 11.0

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

@Ahmedhossamdev Ahmedhossamdev force-pushed the refactor/migrate-get-stops-to-db branch from bf1635f to 251914e Compare April 11, 2026 01:52
@github-actions
Copy link
Copy Markdown

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 3.3 ms
Error rate 0.00%
Total requests 334
Req/sec 11.0

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

@Ahmedhossamdev Ahmedhossamdev merged commit a36074c into main Apr 11, 2026
6 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.

Replace GetStops() with database query

2 participants