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

openconfig / ygot
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: robjs-optimise-orderedmap-walk
DEFAULT BRANCH: master
Repo Added 19 Aug 2017 03:47AM UTC
Files 85
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

LAST BUILD ON BRANCH robjs-parallel-diff
branch: robjs-parallel-diff
CHANGE BRANCH
x
Reset
  • robjs-parallel-diff
  • 0.6.0
  • 0.7.0
  • MergeDupAnno
  • SetNodeOpt
  • ValueStr
  • annotation-fields-0
  • apb_bug
  • awly_dev
  • build-empty-skip-populated
  • build-fix
  • builderany
  • choice-case-panic
  • compressed_annotate
  • coverage_update
  • debug-185
  • decimal64-finite-check
  • decimal64-precision-bound
  • del-old-proto
  • demo-import-names
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-6
  • dependabot/github_actions/actions/checkout-7
  • dependabot/github_actions/actions/setup-go-6
  • dependabot/github_actions/actions/setup-go-7
  • dependabot/github_actions/actions/setup-go-7.0.0
  • dependabot/github_actions/actions/upload-artifact-5
  • dependabot/github_actions/actions/upload-artifact-6
  • dependabot/github_actions/actions/upload-artifact-7
  • dependabot/github_actions/arduino/setup-protoc-3
  • dependabot/github_actions/shogo82148/actions-goveralls-1.11.3
  • dependabot/github_actions/shogo82148/actions-goveralls-1.11.4
  • dependabot/go_modules/github.com/golang/glog-1.2.4
  • dependabot/go_modules/github.com/google/go-cmp-0.7.0
  • dependabot/go_modules/github.com/openconfig/gnmi-0.13.0
  • dependabot/go_modules/github.com/openconfig/gnmi-0.14.0
  • dependabot/go_modules/github.com/openconfig/gnmi-0.14.1
  • dependabot/go_modules/github.com/openconfig/goyang-1.6.2
  • dependabot/go_modules/github.com/openconfig/gribi-1.9.0
  • dependabot/go_modules/github.com/spf13/cobra-1.10.2
  • dependabot/go_modules/github.com/spf13/cobra-1.9.1
  • dependabot/go_modules/golang.org/x/net-0.33.0
  • dependabot/go_modules/golang.org/x/net-0.36.0
  • dependabot/go_modules/golang.org/x/net-0.38.0
  • dependabot/go_modules/golang.org/x/net-0.55.0
  • dependabot/go_modules/google.golang.org/grpc-1.68.1
  • dependabot/go_modules/google.golang.org/grpc-1.69.0
  • dependabot/go_modules/google.golang.org/grpc-1.69.2
  • dependabot/go_modules/google.golang.org/grpc-1.69.4
  • dependabot/go_modules/google.golang.org/grpc-1.70.0
  • dependabot/go_modules/google.golang.org/grpc-1.71.0
  • dependabot/go_modules/google.golang.org/grpc-1.71.1
  • dependabot/go_modules/google.golang.org/grpc-1.77.0
  • dependabot/go_modules/google.golang.org/grpc-1.78.0
  • dependabot/go_modules/google.golang.org/grpc-1.79.1
  • dependabot/go_modules/google.golang.org/grpc-1.79.2
  • dependabot/go_modules/google.golang.org/grpc-1.79.3
  • dependabot/go_modules/google.golang.org/grpc-1.80.0
  • dependabot/go_modules/google.golang.org/grpc-1.81.0
  • dependabot/go_modules/google.golang.org/grpc-1.81.1
  • dependabot/go_modules/google.golang.org/protobuf-1.36.0
  • dependabot/go_modules/google.golang.org/protobuf-1.36.1
  • dependabot/go_modules/google.golang.org/protobuf-1.36.10
  • dependabot/go_modules/google.golang.org/protobuf-1.36.11
  • dependabot/go_modules/google.golang.org/protobuf-1.36.2
  • dependabot/go_modules/google.golang.org/protobuf-1.36.3
  • dependabot/go_modules/google.golang.org/protobuf-1.36.4
  • dependabot/go_modules/google.golang.org/protobuf-1.36.5
  • dependabot/go_modules/google.golang.org/protobuf-1.36.6
  • dependabot/go_modules/google.golang.org/protobuf-1.36.7
  • dependabot/go_modules/google.golang.org/protobuf-1.36.8
  • diff-enum
  • diff-enum-2
  • diff-enum-3
  • diff-merges
  • diff-opt
  • diffll
  • dplore/updatemod
  • elemtostring-escape-backslash
  • emitjson-novalidate
  • emitjson-threadsafe
  • enum-bug
  • enum-dedup
  • enum-dedup-flag
  • enum-moduledef
  • enum-name
  • enum-notstable
  • enum_debug
  • enumkey
  • enumpkgname
  • errorf-fix
  • etv-nil
  • exclude-state
  • exclude_state_compressed_list
  • experimental-yangproto
  • fake-api
  • field-getters
  • file-split
  • fix-go-master
  • fix-gzip-test-stability
  • fix-protopkg
  • fix_bug_of_losing_encap_header_details
  • fix_prunebranches
  • generated-notice
  • generic_protos
  • genutil-coverage
  • get-or-create
  • getnode
  • ghaci
  • go-1.8.x
  • go11
  • godep_update
  • goyang_prefix
  • goyangflg
  • identity-special-chars
  • int-leaf-fractional
  • keyvaluetypecheck
  • leafget
  • leafref_perf
  • leafref_validation
  • less-verbose-errors
  • lint-fix
  • lintfix
  • list-key-mismatch
  • list-scalar-element
  • listkey_137
  • listtest
  • log-optional
  • mapvalinsert
  • marshal-annotations
  • master
  • merge-fix
  • mergeoptions
  • modelver
  • no-trie
  • node
  • nonptropt
  • npe-pathstrings
  • optimize-single-key-list-lookup
  • ostromart_cleanup
  • ostromart_coverage
  • ostromart_coverage_ytypes
  • ostromart_dedup
  • ostromart_dev
  • ostromart_govet
  • ostromart_leafref
  • ostromart_lint
  • ostromart_tests
  • ostromart_union_tests
  • ostromart_validate
  • patch-1
  • pathelem
  • pathschemavalidity
  • pathtostring-no-clean
  • pathtranslator-wildcard
  • proto-enum
  • proto-sort-by-type
  • protoannotation
  • protobuf-fakeroot
  • protobuf-fix
  • protobuf_fixes
  • protobuf_getting_started
  • protobuf_single_package
  • protobuf_union_leafref_enum
  • protocplugin-1
  • protopkgname
  • protoyang
  • prune-empty
  • pull-request-demo
  • readme-badge
  • remove-deepequal
  • rename-overwrite
  • renderperf2
  • renovate/deps
  • renovate/go-google.golang.org-grpc-vulnerability
  • renovate/major-deps
  • renovate/major-github-artifact-actions
  • retrieve-node-track
  • revert-218-protocplugin-1
  • robjs-353
  • robjs-annotations
  • robjs-build-empty-merge-issue
  • robjs-cache-container-schema
  • robjs-cache-struct-tag-paths
  • robjs-coverage-adjust
  • robjs-coveralls
  • robjs-devel
  • robjs-empty-type
  • robjs-empty-validate
  • robjs-enumtypemap
  • robjs-enumtypemap-access
  • robjs-experimental-tree
  • robjs-fix-gnmi-notif-annotations
  • robjs-fix-prune-ordered-map
  • robjs-fixtests
  • robjs-gnmi-pathelem
  • robjs-guard-debug-allocs
  • robjs-json-merge
  • robjs-json-paths
  • robjs-jsonenum-serialisation
  • robjs-leafrefbug
  • robjs-list-lookup-benchmarks
  • robjs-map-merge
  • robjs-mergetwostructs
  • robjs-nil-key
  • robjs-optimise-leafref-matching
  • robjs-optimise-orderedmap-walk
  • robjs-optimise-validate-leafref
  • robjs-optimize-json-serde
  • robjs-optimize-list-lookup
  • robjs-path-restructure
  • robjs-proto-annotation
  • robjs-proto-enum-annotate-gen
  • robjs-proto-enum-naming
  • robjs-proto-namespace
  • robjs-proto-number
  • robjs-proto-unionfix
  • robjs-proto-yangspec
  • robjs-protogen-12
  • robjs-rename-list-entry
  • robjs-structmerge
  • robjs-structmerge-maps
  • robjs-telemetry-eg
  • robjs-testcoverage
  • robjs-unmarshal-protobuf
  • robjs_buildsystem
  • robjs_generated_proto_code
  • robjs_pathstrings
  • robjs_protogen_caller
  • safe-append
  • schema-type
  • schemapath
  • set_leafref
  • set_path_origin
  • setrequest-besteffort-join-panic
  • splitpath-key-escape
  • stringtotype
  • struct-literal-fix
  • struct-util
  • structdiff
  • structdiff-1
  • structdiff-2
  • structmerge-union
  • support-presence-containers
  • testupdate
  • testutil
  • testutil-opt
  • testutil-sub
  • union-key-um
  • unmarshal-annotations
  • unmarshal-empty
  • unmarshal-gnmi
  • unmarshal-ignore-extra
  • unmarshalpanic
  • unterminated-key-parse
  • unzip-schema
  • v0.5.0
  • v0.6.0
  • v0.7.0
  • v0.7.1
  • v0.7.2
  • v0.7.3
  • validate_err
  • validationopts
  • wenbli-PathElemDirectComp
  • wenbli-clean
  • wenbli-dev
  • wenbli-dev-add1.12
  • wenbli-dev-exportAllMappedTypeFields
  • wenbli-dev-fixOldTypo
  • wenbli-dev-remove1.9
  • wenbli-dev-ypathgen
  • wenbli-dev2
  • wenbli-dev3
  • wenbli-leafrefValTreeImpl
  • wenbli-refactor
  • wenbli-refactor2
  • wenbli-ypathgen-childctor
  • yang-pattern-anchor
  • ypathgen-dev
  • ywrapper_proto

28 Oct 2026 04:16PM UTC coverage: 88.737% (-0.04%) from 88.775%
40724303173

Pull #1120

github

robshakir
ygot: Add ParallelDiff and ParallelDiffWithAtomic for lockstep diffing.

`ygot.Diff` and `ygot.DiffWithAtomic` call `findSetLeaves` on `original` and
`modified` independently through `util.Walk`. That approach clones gNMI paths,
formats `PathToString` keys for every node in both trees, and builds four
full-tree leaf maps before comparing values.

This change adds `ygot.ParallelDiff` and `ygot.ParallelDiffWithAtomic`, which
traverse `original` and `modified` in lockstep using a single mutable path
stack:

- **Type-cached descriptors**: Cache per-`reflect.Type` field classifications
  and pre-parsed `*gnmipb.PathElem` slices in `diffStructDescCache`.
- **Direct leaf comparison**: Compare pointer scalars, enums, value leaves, and
  slices directly via `reflect.Value` without boxing unchanged values.
- **Subtree fast paths**: Skip nil or pointer-identical child containers, maps,
  and map entries in `O(1)` time with zero heap allocations.
- **Lazy list keys**: Call `ΛListKeyMap()` and `keyMapAsStrings` on ancestor
  list entries only when a descendant leaf differs.

Local `-c opt` benchmarks on `exampleoc.Device` and full OpenConfig `Device`
trees show the following improvements over `ygot.Diff`:

- **`exampleoc.Device` microbenchmark**: Latency drops from `2.23 ms` to
  `17.2 µs` (`129.6x`), heap drops from `800 KB` to `4.08 KB` (`196.2x`), and
  allocations drop from `17,740` to `69` (`257.1x`).
- **Large OpenConfig `Device` (`~85K` leaves, small delta)**: Latency drops from
  `1,258.14 ms` to `9.57 ms` (`131.4x`), heap drops from `243.57 MB` to
  `0.31 MB` (`789.4x`), and allocations drop from `3.75M` to `10,935`
  (`343.0x`).

A benchmark test can follow in a separate change if needed.
Pull Request #1120: ygot: Add ParallelDiff and ParallelDiffWithAtomic for lockstep diffing.

611 of 693 new or added lines in 1 file covered. (88.17%)

2 existing lines in 1 file now uncovered.

14757 of 16630 relevant lines covered (88.74%)

1473.75 hits per line

Relevant lines Covered
Build:
Build:
16630 RELEVANT LINES 14757 COVERED LINES
1473.75 HITS PER LINE
Source Files on robjs-parallel-diff
  • Tree
  • List 85
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
40724303173 robjs-parallel-diff ygot: Add ParallelDiff and ParallelDiffWithAtomic for lockstep diffing. `ygot.Diff` and `ygot.DiffWithAtomic` call `findSetLeaves` on `original` and `modified` independently through `util.Walk`. That approach clones gNMI paths, formats `PathToStr... Pull #1120 28 Oct 2026 04:19PM UTC robshakir github
88.74
See All Builds (5457)
  • Repo on GitHub
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