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

kubeovn / kube-ovn / 27020761364
26%

Build:
DEFAULT BRANCH: master
Ran 05 Jun 2026 02:29PM UTC
Jobs 1
Files 212
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 Jun 2026 02:27PM UTC coverage: 25.688% (+0.007%) from 25.681%
27020761364

push

github

web-flow
perf(ovs): list NAT and static routes via single WhereCache scan (#6829)

* perf(ovs): list NAT and static routes via single WhereCache scan

Replace the per-UUID Get loop in listLogicalRouterNatByFilter and
listLogicalRouterStaticRoutesByFilter with a single WhereCache().List()
filtered by a UUID set, mirroring listLogicalRouterPoliciesByFilter and
batchListLogicalRouterStaticRoutesForDelete.

This drops the per-row context timeout allocation and the extra deep
clone done for every row, cloning only matched rows. Also removes the
now-unused GetLogicalRouterStaticRouteByUUID helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* perf(ovs): skip cache scan when router has no NAT or static routes

listLogicalRouterNatByFilter and listLogicalRouterStaticRoutesByFilter
now return early when lr.Nat / lr.StaticRoutes is empty, instead of
running a full WhereCache().List() scan that can never match. Routers
with no NAT or no static routes are common, so this restores the
immediate-return behavior of the old per-UUID loop and avoids an
O(table) cache scan on them.

Addresses Copilot review feedback on PR #6829.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* test(ovs): add benchmark comparing Get loop vs WhereCache list

Benchmark the NAT listing fast path against the previous per-UUID Get
loop on an identical in-memory NB cache, covering both the N~=T hot
path and the N<<T boundary case. Widen the newOVSDBServer and
newOvnNbClient test helpers to testing.TB so benchmarks can reuse them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

---------

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

20 of 24 new or added lines in 2 files covered. (83.33%)

2 existing lines in 2 files now uncovered.

14870 of 57887 relevant lines covered (25.69%)

0.3 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
75.75
1.15% pkg/ovs/ovn-nb-logical_router_route.go
2
88.6
0.39% pkg/ovs/ovn-nb-nat.go

Coverage Regressions

Lines Coverage ∆ File
1
75.75
1.15% pkg/ovs/ovn-nb-logical_router_route.go
1
88.6
0.39% pkg/ovs/ovn-nb-nat.go
Jobs
ID Job ID Ran Files Coverage
1 27020761364.1 05 Jun 2026 02:29PM UTC 212
25.69
GitHub Action Run
Source Files on build 27020761364
  • Tree
  • List 212
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7a475d22 on github
  • Prev Build on master (#27017056817)
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