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

rm-hull / fuel-prices-api / 22247504199
20%

Build:
DEFAULT BRANCH: main
Ran 21 Feb 2026 01:20AM UTC
Jobs 1
Files 16
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

21 Feb 2026 01:19AM UTC coverage: 20.402% (-1.6%) from 22.017%
22247504199

push

github

web-flow
feat: add price statistics to search response (#12)

* feat: add price statistics to search response

Adds a new `statistics` field to the search API response to provide
insights into fuel price data.

- Create `stats` package to calculate averages, price distribution, and
  standard deviation.
- Update `SearchResponse` model to include statistical metadata.
- Enable `--debug` flag in VS Code launch configuration.
- Update test coordinates in `test_api.http`.

```mermaid
sequenceDiagram
    participant C as Client
    participant R as Search Route
    participant S as Stats Package
    C->>R: GET /search
    R->>R: Fetch results from Repository
    R->>S: Derive(results)
    S-->>R: SearchStatistics
    R-->>C: SearchResponse (Results + Statistics)
```

* perf: optimize variance calculation

Replace `math.Pow` with direct multiplication when calculating variance.
Squaring a number via multiplication is more computationally efficient
than calling the power function.

* refactor: consolidate loops in stats derivation

Consolidate statistics calculation logic to reduce redundant
iterations over search results and fuel price arrays.

*   Move **Brand Distribution** counting into the main results loop.
*   Combine **Standard Deviation** variance accumulation with the price
    distribution bucketing logic.

0 of 73 new or added lines in 2 files covered. (0.0%)

203 of 995 relevant lines covered (20.4%)

0.22 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% internal/routes/search.go
72
0.0
internal/stats/stats.go
Jobs
ID Job ID Ran Files Coverage
1 22247504199.1 21 Feb 2026 01:20AM UTC 16
20.4
GitHub Action Run
Source Files on build 22247504199
  • Tree
  • List 16
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ce663bc2 on github
  • Prev Build on main (#22206592876)
  • 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