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

openconfig / ygot / 40759102021
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: robjs-optimise-orderedmap-walk
DEFAULT BRANCH: master
Ran 28 Oct 2026 08:01PM UTC
Jobs 1
Files 85
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

28 Oct 2026 07:58PM UTC coverage: 88.793% (+0.02%) from 88.775%
40759102021

Pull #1122

github

robshakir
ygot: cache parsed struct-tag paths and module prefixes during rendering

Cache reflection field metadata, parsed path and shadow-path segments, and
RFC7951 module prefixes per reflect.Type and reflect.StructTag to reduce
allocations during JSON and gNMI rendering.

- Type and tag caches: Add structTypeInfoCache and structTagInfoCache in
  ygot/struct_validation_map.go to parse struct tags and reflection flags
  (isAnnotation, isYangPresence, isGoEnum, isYANGEmpty) once per struct type
  and tag.
- Early nil and unset checks: Skip nil pointers, maps, slices, and interfaces,
  unset GoEnum values, and unset YANGEmpty leaves in structJSON and
  findUpdatedLeaves before resolving paths or modules.
- Pre-computed module prefixes: Pre-compute RFC7951 prependmods slices and
  child module names in cachedModuleSet when RewriteModuleNames is empty, and
  use direct string concatenation instead of fmt.Sprintf.
- Slice isolation: Allocate independent gnmiPath backing slices in
  buildGNMIPaths so callers that mutate returned paths cannot corrupt cached
  tag data.
- Tests: Add TestStructTagToLibModules and TestGetStructTypeInfo in
  ygot/struct_validation_map_test.go, and a 5% allocation regression test
  (TestMarshal7951Performance) using testing.AllocsPerRun in
  ygot/render_test.go.
Pull Request #1122: ygot: cache parsed struct-tag paths and module prefixes during rendering

217 of 225 new or added lines in 2 files covered. (96.44%)

13 existing lines in 1 file now uncovered.

14293 of 16097 relevant lines covered (88.79%)

1605.23 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
89.2
-0.67% ygot/render.go
4
94.82
0.44% ygot/struct_validation_map.go

Coverage Regressions

Lines Coverage ∆ File
13
89.2
-0.67% ygot/render.go
Jobs
ID Job ID Ran Files Coverage
1 40759102021.1 28 Oct 2026 08:01PM UTC 85
88.79
GitHub Action Run
Source Files on build 40759102021
  • Tree
  • List 85
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1122
  • PR Base - master (#40608054653)
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