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

dnsimple / dns_erlang / 30105223823
92%

Build:
DEFAULT BRANCH: main
Ran 24 Jul 2026 03:26PM UTC
Jobs 1
Files 12
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

24 Jul 2026 03:25PM UTC coverage: 88.442% (-0.01%) from 88.453%
30105223823

push

github

web-flow
Optimize dns_domain:from_wire/1,2 name decoding (#134)

Two changes to the wire-to-text name decoder, prototyped as separate
axes and benchmarked factorially on both machines below:

- The per-label escape walker (previously escape_label_inline/2, now
  escape_label_chunk/2) matched 8 individual bytes per chunk and ran
  16 guard comparisons on them. It now extracts a 56-bit word (then a
  32-bit word for the tail) and proves it free of '.' and '\' with an
  exact SWAR zero-byte test in a guard: one wide load, a dozen integer
  ops and one wide append per 7 bytes, instead of 8 loads, 16 compares
  and 8 byte writes. A dirty byte falls through to the escaping byte
  clauses and the walker re-enters the word clauses right after it.
  The label is still only ever matched, never appended as a term, so
  it stays a match context and the allocation profile is unchanged.

- The compressed decoder (from_wire/2) previously materialized every
  rest-position pointer target as its own PtrName binary and then
  copied it again via <<Acc/binary, $., PtrName/binary>>, so suffix
  bytes were written once per pointer-nesting level. The accumulator
  is now threaded through pointer jumps: a jump appends the '.'
  separator and keeps decoding the target's labels into the same
  accumulator, and the Rest captured at the first pointer followed is
  carried along (keep_first/2) and returned at the terminal zero.
  Every byte of the name is written exactly once regardless of
  pointer depth.

Behavior quirks are preserved exactly: the 127-label counter restarts on
every pointer segment, decode_loop is checked only for pointers in first
position (pointer-to-pointer chains), a pointer to a terminating zero
still yields a trailing-dot name, and the Count/TotalSize arithmetic is
identical so a raised {name_too_long, N} carries the same N. This was
verified by a parity harness comparing old and new implementations
across 26,434 cases: valid and malformed wires, escaped labels, ... (continued)

19 of 19 new or added lines in 1 file covered. (100.0%)

2793 of 3158 relevant lines covered (88.44%)

10926.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30105223823.1 24 Jul 2026 03:26PM UTC 12
88.44
GitHub Action Run
Source Files on build 30105223823
  • Tree
  • List 12
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30105223823
  • 7caca47c on github
  • Prev Build on main (#30098895286)
  • Next Build on main (#30118985398)
  • Delete
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