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

openconfig / ygot / 39255724724
88%
master: 89%

Build:
Build:
LAST BUILD BRANCH: robjs-optimise-orderedmap-walk
DEFAULT BRANCH: master
Ran 19 Oct 2026 12:57PM 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

19 Oct 2026 11:42AM UTC coverage: 88.444% (-0.3%) from 88.758%
39255724724

Pull #1111

github

alshabib
ytypes: optimize single-key list lookup in retrieveNodeList to O(1)

Currently, retrieveNodeList iterates over all map keys via rv.MapKeys()
and invokes getKeyValue (which reflects over every struct field and
parses YANG path struct tags) for every existing list element on each
ytypes.SetNode / retrieveNode call. Inserting N elements into a YANG
list therefore performs O(N^2) struct-tag parses and reflection lookups.

For single-keyed lists (where the map key is not a struct) and
non-wildcard/non-partial-key queries:
1. Convert the gNMI path key string to the map key's reflect.Type via
   StringToType and perform a direct O(1) rv.MapIndex(kfv) lookup.
2. When the element is absent and modifyRoot is set, insert the new
   entry directly via insertAndGetKey without scanning existing keys.
3. For types where StringToType cannot directly construct the map key
   (e.g., union interface keys), pre-compute the key field struct index
   once outside the rv.MapKeys() loop instead of calling getKeyValue on
   every element.
Pull Request #1111: ytypes: optimize single-key list lookup in retrieveNodeList to O(1)

31 of 64 new or added lines in 1 file covered. (48.44%)

23 existing lines in 2 files now uncovered.

14036 of 15870 relevant lines covered (88.44%)

483.92 hits per line

Uncovered Changes

Lines Coverage ∆ File
33
79.49
-6.99% ytypes/node.go

Coverage Regressions

Lines Coverage ∆ File
21
79.49
-6.99% ytypes/node.go
2
90.29
-0.49% ytypes/list.go
Jobs
ID Job ID Ran Files Coverage
1 39255724724.1 19 Oct 2026 12:57PM UTC 85
88.44
GitHub Action Run
Source Files on build 39255724724
  • Tree
  • List 85
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1111
  • PR Base - master (#39180918404)
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