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

php-bug-catcher / bug-catcher / 37302472055
94%

Build:
DEFAULT BRANCH: main
Ran 05 Oct 2026 11:23AM UTC
Jobs 1
Files 150
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

05 Oct 2026 11:20AM UTC coverage: 94.048% (+0.03%) from 94.02%
37302472055

push

github

tito10047
fix(dashboard): a sparkline that is not red at the top and does not end on the floor

Both lines on a project card drew something that was not true, and the two
faults compounded: the shape was pinned to the ceiling in the alarm colour and
then fell off a cliff at the right edge.

The red was an accident of scaling. `SparkLineEntry::rebase()` is a plain
multiplication with no clamp, so a value above the maximum is handed a
coordinate outside the SVG and the browser clips the line flat along the top -
inside the last colour of the gradient. LogSparkLine set its maximum to
`treshold`, so forty errors against a threshold of five came out at y=200 on a
30px canvas, and so did a hundred and twenty: every project with real traffic
drew the same picture. PerfSparkLine never set a maximum at all, which is worse
than it sounds - the scale was then the window's own peak, so the slowest hour
of a service answering in 20ms was painted exactly as red as the slowest hour of
one taking two seconds. The colour carried no information.

The cliff was a disagreement about what the newest bucket is. `Precision` keyed
the data with `round()` and built the x axis with `round(now - n * interval)`,
while the SQL bucketed with `floor()`. Past the halfway mark of an interval the
whole axis shifted forward and the last slot was a bucket in the future that no
row could land in, drawn at the library's placeholder height of 1 - the floor.
Before the halfway mark it was the bucket still filling up, which dips for the
same reason. Which of the two you got depended on what minute you looked, and
that is also why LogSparkLineTest failed on the wall clock rather than on the
diff.

So: clamp before the library sees a number, and stop agreeing on timestamps.
SparkLineScale projects a value onto 0..100 and the renderer tells the library
that is its maximum, which makes the threshold the point where the ramp runs
out instead of the point where the line leaves the canvas. LogSparkLine's que... (continued)

58 of 58 new or added lines in 5 files covered. (100.0%)

3192 of 3394 relevant lines covered (94.05%)

21.13 hits per line

Jobs
ID Job ID Ran Files Coverage
1 37302472055.1 05 Oct 2026 11:23AM UTC 150
94.05
GitHub Action Run
Source Files on build 37302472055
  • Tree
  • List 150
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7de9cb48 on github
  • Prev Build on v2.1.0 (#37220059635)
  • Next Build on main (#37310158581)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc