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

kubeovn / kube-ovn / 26890543780 / 1
26%
master: 26%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2026 02:17PM UTC
Files 212
Run time 11s
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

03 Jun 2026 02:12PM UTC coverage: 25.66% (+0.01%) from 25.648%
26890543780.1

push

github

web-flow
perf(ipam): allocation-free IP comparison in range engine (#6816)

* perf(ipam): allocation-free IP comparison in range engine

LessThan/GreaterThan allocated two heap big.Int per call via
big.NewInt().SetBytes().Cmp(). These are the innermost primitive of the
range engine (IPRangeList.Find binary search, Separate/Merge/Intersect),
so every pod allocate/release walked them repeatedly.

Replace with an allocation-free per-family compare: IPv4 addresses are
compared as their 4-byte value (To4 does not allocate for 4-byte
storage), otherwise the 16-byte form is compared. Benchmark shows
0 allocs/op and ~7 ns/op versus the previous big.Int path.

This also makes the result consistent with Equal: the old raw-SetBytes
compare mis-ordered mixed 4-byte/16-byte IPv4 representations and treated
0.0.0.0 as equal to ::. Add unit tests covering both edge cases.

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

* docs(ipam): clarify cmp allocation-free scope per review

Address PR review feedback: the previous comment claimed cmp is
allocation-free unconditionally, but To16() on a 4-byte IPv4 in the
mixed-family fallback allocates. Clarify that only same-family
comparisons — the only kind the range engine performs, since IP range
lists are family-segregated — are allocation-free, and the mixed-family
path is for determinism only and never hit on the hot path. No behavior
change.

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

* test(ipam): add IPv6 comparison coverage for cmp

Add TestIPCompareIPv6 covering the same-family IPv6 path of the new
comparator: ordering across low/middle/high 16-bit groups, compressed
vs. expanded equality, the multi-byte 00ff<0100 boundary, and the
all-zero / all-ones extremes. Each case also asserts the ordering is
total by checking the reversed operands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Si... (continued)

14817 of 57744 relevant lines covered (25.66%)

0.3 hits per line

Source Files on job 26890543780.1
  • Tree
  • List 212
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26890543780
  • 91d8563b on github
  • Prev Job for on master (#26885936267.1)
  • Next Job for on master (#26891151871.1)
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