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

Unleash / unleash / 11400892401
87%
master: 91%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 Oct 2024 09:17AM UTC
Jobs 1
Files 682
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

18 Oct 2024 09:11AM UTC coverage: 87.615% (+0.004%) from 87.611%
11400892401

push

github

web-flow
chore: add a class to handle aggreggation queries (#8446)

## About the changes
We have many aggregation queries that run on a schedule:
https://github.com/Unleash/unleash/blob/<a class=hub.com/Unleash/unleash/commit/f63496d47f6808a246732f5ddee9b9136e23eca7">f63496d47/src/lib/metrics.ts#L714-L719

These staticCounters are usually doing db query aggregations that
traverse tables and we run all of them in parallel:
https://github.com/Unleash/unleash/blob/f63496d47f6808a246732f5ddee9b9136e23eca7/src/lib/metrics.ts#L410-L412

This can add strain to the db. This PR suggests a way of handling these
queries in a more structured way, allowing us to run them sequentially
(therefore spreading the load):
https://github.com/Unleash/unleash/blob/<a class=hub.com/Unleash/unleash/commit/f02fe87835c30d77ff8b6755268e123585820511">f02fe8783/src/lib/metrics-gauge.ts#L38-L40

As an additional benefit, we get both the gauge definition and the
queries in a single place:
https://github.com/Unleash/unleash/blob/f02fe87835c30d77ff8b6755268e123585820511/src/lib/metrics.ts#L131-L141

This PR only tackles 1 metric, and it only focuses on gauges to gather
initial feedback. The plan is to migrate these metrics and eventually
incorporate more types (e.g. counters)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>

2744 of 3574 branches covered (76.78%)

220 of 268 new or added lines in 3 files covered. (82.09%)

3 existing lines in 2 files now uncovered.

14007 of 15987 relevant lines covered (87.61%)

723.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11400892401.1 18 Oct 2024 09:16AM UTC 0
87.61
GitHub Action Run
Source Files on build 11400892401
Detailed source file information is not available for this build.
  • Back to Repo
  • a9f9be1e on github
  • Prev Build on main (#11398590496)
  • Next Build on main (#11431785570)
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