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

kubeovn / kube-ovn / 24622570643
25%

Build:
DEFAULT BRANCH: master
Ran 19 Apr 2026 06:17AM UTC
Jobs 1
Files 207
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

19 Apr 2026 06:12AM UTC coverage: 24.56% (+0.02%) from 24.541%
24622570643

push

github

web-flow
perf(controller): use informer indexers for hot-path lookups (#6646)

* perf(controller): use informer indexers for hot-path lookups

Replace full-store linear scans in two hot paths with O(1) indexer
lookups:

- checkAndUpdateNodePortGroup previously iterated every Pod for every
  Node (O(N_node × N_pod)). It now fetches pods by node via a
  byNodeName indexer. The cluster-wide NetworkPolicy existence check
  also switches from a full Lister.List to indexer ListKeys.
- findEndpointSlicesForServices previously listed every EndpointSlice
  in the namespace and filtered by label in a nested loop. It now
  queries a byServiceName indexer keyed on namespace/name.

Introduces pkg/controller/indexers.go as the first custom informer
indexer wiring in the controller package, registered before informer
startup, so future hot paths can reuse the same infrastructure.

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

* perf(controller): address review feedback on indexer wiring

- Use util.LogFatalAndExit for setupIndexers failure to match the
  rest of the Run() startup path.
- Reuse Controller.setupIndexers in the fake controller instead of
  manually calling AddIndexers, so tests exercise the same wiring as
  production and automatically pick up new indexers.

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

* test(controller): add benchmarks comparing indexer lookup vs full scan

TestIndexersResultParityWithFullScan confirms the indexer lookup returns
the same object set as the pre-indexer full scan + filter across every
key, including unscheduled pods and orphan endpointslices.

BenchmarkPodByNode and BenchmarkEPSByService quantify the improvement
at 10k objects:
- PodByNode: ~95x faster (2.5us vs 238us) / ~1... (continued)

28 of 50 new or added lines in 4 files covered. (56.0%)

3 existing lines in 2 files now uncovered.

13850 of 56393 relevant lines covered (24.56%)

0.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
17.26
0.03% pkg/controller/endpoint_slice.go
5
11.41
-0.49% pkg/controller/node.go
4
1.13
-0.0% pkg/controller/controller.go
4
84.62
pkg/controller/indexers.go

Coverage Regressions

Lines Coverage ∆ File
2
11.41
-0.49% pkg/controller/node.go
1
17.26
0.03% pkg/controller/endpoint_slice.go
Jobs
ID Job ID Ran Files Coverage
1 24622570643.1 19 Apr 2026 06:17AM UTC 207
24.56
GitHub Action Run
Source Files on build 24622570643
  • Tree
  • List 207
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 15b02bad on github
  • Prev Build on master (#24614900774)
  • Next Build on master (#24631618291)
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