Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decoder panics on tag not found #100

Merged
merged 1 commit into from
May 8, 2023

Conversation

abemedia
Copy link
Owner

@abemedia abemedia commented May 8, 2023

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

Benchmark Result

Benchmark diff with base branch
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
          │ bench-master.txt │         bench-new.txt         │
          │      sec/op      │   sec/op     vs base          │
Handler-2        455.3n ± 1%   456.4n ± 1%  ~ (p=0.493 n=10)

          │ bench-master.txt │         bench-new.txt          │
          │       B/op       │    B/op     vs base            │
Handler-2         72.00 ± 0%   72.00 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

          │ bench-master.txt │         bench-new.txt          │
          │    allocs/op     │ allocs/op   vs base            │
Handler-2         2.000 ± 0%   2.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

pkg: github.com/abemedia/go-don/decoder
                    │ bench-master.txt │           bench-new.txt            │
                    │      sec/op      │   sec/op     vs base               │
Decoder/Gorilla-2          19.38µ ± 0%   19.41µ ± 1%       ~ (p=0.305 n=10)
Decoder/DonCached-2        967.5n ± 1%   961.7n ± 1%  -0.60% (p=0.015 n=10)
Decoder/Don-2              1.016µ ± 1%   1.018µ ± 1%       ~ (p=0.781 n=10)
geomean                    2.670µ        2.668µ       -0.08%

                    │ bench-master.txt │             bench-new.txt             │
                    │       B/op       │     B/op      vs base                 │
Decoder/Gorilla-2         2.500Ki ± 0%   2.500Ki ± 0%       ~ (p=1.000 n=10) ¹
Decoder/DonCached-2         176.0 ± 0%     176.0 ± 0%       ~ (p=1.000 n=10) ¹
Decoder/Don-2               176.0 ± 0%     176.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                     429.6          429.6       +0.00%
¹ all samples are equal

                    │ bench-master.txt │            bench-new.txt            │
                    │    allocs/op     │ allocs/op   vs base                 │
Decoder/Gorilla-2           166.0 ± 0%   166.0 ± 0%       ~ (p=1.000 n=10) ¹
Decoder/DonCached-2         3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=10) ¹
Decoder/Don-2               3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean                     11.43        11.43       +0.00%
¹ all samples are equal
Benchmark result
goos: linux
goarch: amd64
pkg: github.com/abemedia/go-don
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
          │ bench-new.txt │
          │    sec/op     │
Handler-2     456.4n ± 1%

          │ bench-new.txt │
          │     B/op      │
Handler-2      72.00 ± 0%

          │ bench-new.txt │
          │   allocs/op   │
Handler-2      2.000 ± 0%

pkg: github.com/abemedia/go-don/decoder
                    │ bench-new.txt │
                    │    sec/op     │
Decoder/Gorilla-2       19.41µ ± 1%
Decoder/DonCached-2     961.7n ± 1%
Decoder/Don-2           1.018µ ± 1%
geomean                 2.668µ

                    │ bench-new.txt │
                    │     B/op      │
Decoder/Gorilla-2      2.500Ki ± 0%
Decoder/DonCached-2      176.0 ± 0%
Decoder/Don-2            176.0 ± 0%
geomean                  429.6

                    │ bench-new.txt │
                    │   allocs/op   │
Decoder/Gorilla-2        166.0 ± 0%
Decoder/DonCached-2      3.000 ± 0%
Decoder/Don-2            3.000 ± 0%
geomean                  11.43

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch coverage: 81.81% and project coverage change: +2.57 🎉

Comparison is base (602b24c) 84.71% compared to head (370e26f) 87.29%.

❗ Current head 370e26f differs from pull request most recent head 8380cd7. Consider uploading reports for the commit 8380cd7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
+ Coverage   84.71%   87.29%   +2.57%     
==========================================
  Files          19       19              
  Lines         772      779       +7     
==========================================
+ Hits          654      680      +26     
+ Misses         92       79      -13     
+ Partials       26       20       -6     
Impacted Files Coverage Δ
decoder/compile.go 86.98% <0.00%> (+3.64%) ⬆️
decoder/decode.go 97.36% <90.00%> (+41.11%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@abemedia abemedia force-pushed the fix/decoder-panic-tag-not-found branch from 370e26f to 8380cd7 Compare May 8, 2023 15:30
@abemedia abemedia merged commit 3a73c35 into master May 8, 2023
@abemedia abemedia deleted the fix/decoder-panic-tag-not-found branch May 8, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant