• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / fuel-prices-api / 22928444781
46%

Build:
DEFAULT BRANCH: main
Ran 10 Mar 2026 11:11PM UTC
Jobs 1
Files 19
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Mar 2026 11:10PM UTC coverage: 17.598%. Remained the same
22928444781

push

github

web-flow
perf: optimize fuel price statistics query (#32)

* perf: optimize fuel price statistics query

Optimize the `fuel_price_snapshot_stats` view by improving index
usage and join order:

* Add a covering index on `fuel_prices` to speed up lookup.
* Filter for the latest prices *before* joining with
  `petrol_filling_stations` to reduce the join complexity.

```mermaid
graph TD
    A[fuel_prices Index] --> B[Latest Prices Aggregation]
    B --> C[Join with Filling Stations]
    C --> D[Postcode Area Extraction]
    D --> E[National/Area Stats Calculation]
```

* perf: optimize fuel price snapshot view

- Replaced `GROUP BY` with a window function `ROW_NUMBER()` to identify
  the latest price per station and fuel type.
- Added a covering index `idx_fuel_prices_latest` to speed up price
  lookups.
- Reduced join overhead by filtering for the latest record before
  joining with `petrol_filling_stations`.

```mermaid
graph TD
    A[fuel_prices] -->|Partition/Order| B(latest_prices_ranked)
    B -->|Filter rn=1| C{Latest Snapshot}
    C -->|Join| D[petrol_filling_stations]
    D --> E[fuel_price_snapshot_stats]
```

211 of 1199 relevant lines covered (17.6%)

0.19 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22928444781.1 10 Mar 2026 11:11PM UTC 19
17.6
GitHub Action Run
Source Files on build 22928444781
  • Tree
  • List 19
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 090cee5d on github
  • Prev Build on main (#22917808254)
  • Next Build on main (#22929444349)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc