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

test(encoding): benchmarks #112

Merged
merged 1 commit into from
May 10, 2023
Merged

test(encoding): benchmarks #112

merged 1 commit into from
May 10, 2023

Conversation

abemedia
Copy link
Owner

No description provided.

@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.05 ⚠️

Comparison is base (c8cd2de) 93.16% compared to head (ca401ce) 93.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
- Coverage   93.16%   93.11%   -0.05%     
==========================================
  Files          19       19              
  Lines         775      770       -5     
==========================================
- Hits          722      717       -5     
  Misses         37       37              
  Partials       16       16              
Impacted Files Coverage Δ
api.go 100.00% <ø> (ø)
encoding/decode.go 100.00% <100.00%> (ø)
encoding/encode.go 100.00% <100.00%> (ø)
encoding/form/form.go 72.72% <100.00%> (ø)
encoding/json/json.go 100.00% <100.00%> (ø)
encoding/msgpack/msgpack.go 100.00% <100.00%> (ø)
encoding/text/decode.go 79.12% <100.00%> (ø)
encoding/text/encode.go 96.15% <100.00%> (ø)
encoding/xml/xml.go 100.00% <100.00%> (ø)
encoding/yaml/yaml.go 100.00% <100.00%> (ø)
... and 2 more

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

@github-actions
Copy link
Contributor

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        461.8n ± 1%   459.1n ± 1%  ~ (p=0.210 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/encoding/json
              │ bench-new.txt │
              │    sec/op     │
JSON/Encode-2     175.8n ± 1%
JSON/Decode-2     343.6n ± 3%
geomean           245.7n

              │ bench-new.txt │
              │     B/op      │
JSON/Encode-2      16.00 ± 0%
JSON/Decode-2      656.0 ± 0%
geomean            102.4

              │ bench-new.txt │
              │   allocs/op   │
JSON/Encode-2      1.000 ± 0%
JSON/Decode-2      4.000 ± 0%
geomean            2.000

pkg: github.com/abemedia/go-don/encoding/msgpack
                 │ bench-new.txt │
                 │    sec/op     │
Msgpack/Encode-2     478.9n ± 1%
Msgpack/Decode-2     446.4n ± 1%
geomean              462.4n

                 │ bench-new.txt │
                 │     B/op      │
Msgpack/Encode-2      144.0 ± 0%
Msgpack/Decode-2      227.0 ± 0%
geomean               180.8

                 │ bench-new.txt │
                 │   allocs/op   │
Msgpack/Encode-2      7.000 ± 0%
Msgpack/Decode-2      4.000 ± 0%
geomean               5.292

pkg: github.com/abemedia/go-don/encoding/text
              │ bench-new.txt │
              │    sec/op     │
Text/Encode-2     74.70n ± 5%
Text/Decode-2     47.75n ± 1%
geomean           59.72n

              │ bench-new.txt │
              │     B/op      │
Text/Encode-2      24.00 ± 0%
Text/Decode-2      16.00 ± 0%
geomean            19.60

              │ bench-new.txt │
              │   allocs/op   │
Text/Encode-2      2.000 ± 0%
Text/Decode-2      1.000 ± 0%
geomean            1.414

pkg: github.com/abemedia/go-don/encoding/xml
             │ bench-new.txt │
             │    sec/op     │
XML/Encode-2     1.780µ ± 3%
XML/Decode-2     2.446µ ± 1%
geomean          2.087µ

             │ bench-new.txt │
             │     B/op      │
XML/Encode-2    4.359Ki ± 0%
XML/Decode-2    1.086Ki ± 0%
geomean         2.176Ki

             │ bench-new.txt │
             │   allocs/op   │
XML/Encode-2      8.000 ± 0%
XML/Decode-2      23.00 ± 0%
geomean           13.56

pkg: github.com/abemedia/go-don/encoding/yaml
              │ bench-new.txt │
              │    sec/op     │
YAML/Encode-2     3.607µ ± 1%
YAML/Decode-2     5.916µ ± 1%
geomean           4.619µ

              │ bench-new.txt │
              │     B/op      │
YAML/Encode-2    6.555Ki ± 0%
YAML/Decode-2    6.602Ki ± 0%
geomean          6.578Ki

              │ bench-new.txt │
              │   allocs/op   │
YAML/Encode-2      19.00 ± 0%
YAML/Decode-2      42.00 ± 0%
geomean            28.25

@abemedia abemedia merged commit 4cd799c into master May 10, 2023
@abemedia abemedia deleted the test/encoding-benchmarks branch May 10, 2023 18:07
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