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

openconfig / ygot / 40424891472
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/shogo82148/actions-goveralls-1.11.5
DEFAULT BRANCH: master
Ran 27 Oct 2026 12:15AM 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

27 Oct 2026 12:12AM UTC coverage: 88.294% (-0.5%) from 88.775%
40424891472

Pull #1115

github

robshakir
ygot, ytypes: remove repeated JSON normalisation and debug allocations

`ygot` previously ran repeated JSON round-trips during RFC7951 rendering and
formatted debug strings when debug logging was off. This change removes those
redundant operations whilst preserving identical JSON output and Go types.

JSON rendering (`ygot/render.go`):
- Remove `normalizeJSONValue` calls from `structJSON` and `jsonValue`.
- Update `writeIETFScalarJSON` to return the Go primitive types (`string`,
  `float64`, `bool`) that `encoding/json.Unmarshal` decodes into `any`.
- Skip `nil` map, slice, pointer, and interface fields at the start of
  `structJSON` before parsing struct tags.
- Pre-size output slices in `leaflistToSlice`, `mapValuePairsToJSON`,
  `mapJSON`, `jsonSlice`, and `jsonAnnotationSlice`.

Debug logging (`util/debug.go`, `util/reflect.go`, `ytypes/*.go`):
- Add `IsDebugLibraryEnabled` and `IsDebugSchemaEnabled` helpers in
  `util/debug.go`.
- Check `debugLibrary` in `util.DbgErr` before concatenating error strings.
- Guard `DbgPrint` and `DbgSchema` calls that allocate arguments -- such as
  `pretty.Sprint` and `Schema.Path` -- when debug logging is disabled.

Tests (`util/debug_test.go`, `ytypes/unmarshal_test.go`, `ygot/render_test.go`):
- Add `ConstructIETFJSON` type-parity tests in `ygot/render_test.go`.
- Add `5%` allocation regression tests and benchmarks in `util`, `ytypes`, and
  `ygot`.
Pull Request #1115: ygot, ytypes: remove repeated JSON normalisation and debug allocations

113 of 194 new or added lines in 9 files covered. (58.25%)

14 existing lines in 3 files now uncovered.

14180 of 16060 relevant lines covered (88.29%)

1680.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
34
87.67
-2.2% ygot/render.go
13
82.49
-2.81% util/reflect.go
7
85.23
-1.23% ytypes/leaf.go
7
85.75
-1.96% ytypes/leafref.go
6
86.59
-3.18% ytypes/container.go
6
88.97
-1.32% ytypes/list.go
4
91.41
-3.04% ytypes/int_type.go
4
90.67
-1.68% ytypes/util_schema.go

Coverage Regressions

Lines Coverage ∆ File
6
82.49
-2.81% util/reflect.go
6
87.67
-2.2% ygot/render.go
2
97.99
0.0% util/gnmi.go
Jobs
ID Job ID Ran Files Coverage
1 40424891472.1 27 Oct 2026 12:15AM UTC 85
88.29
GitHub Action Run
Source Files on build 40424891472
  • Tree
  • List 85
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #1115
  • PR Base - master (#40419440996)
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