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

feat: sonic replaces json #5438

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: sonic replaces json #5438

wants to merge 2 commits into from

Conversation

zijiren233
Copy link
Contributor

@zijiren233 zijiren233 commented Mar 4, 2025

goos: linux
goarch: amd64
pkg: github.com/labring/sealos/service/aiproxy/middleware
cpu: INTEL(R) XEON(R) PLATINUM 8582C
BenchmarkCompareGetModelFromJSON/ValidModel/Std-32               1000000              1074 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/ValidModel/JSONIter-32          5582740               224.3 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/ValidModel/Sonic-32            12577436                95.98 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/Std-32                  1684879               696.0 ns/op           216 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/JSONIter-32             1919548               615.0 ns/op           120 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/Sonic-32               18179151                73.83 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/Std-32                5107429               232.2 ns/op           168 B/op          3 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/JSONIter-32           3274230               355.8 ns/op            96 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/Sonic-32             21803062                58.09 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/Std-32                 174336              6575 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/JSONIter-32           4964611               234.1 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/Sonic-32             11385480                97.64 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/Std-32                182312              6474 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/JSONIter-32           809048              1514 ns/op              96 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/Sonic-32             6196494               179.5 ns/op            32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/Std-32              22944             52897 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/JSONIter-32       5132520               235.3 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/Sonic-32         13956729                93.00 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/Std-32             23158             52318 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/JSONIter-32                89629             11378 ns/op              96 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/Sonic-32                 1713741               688.5 ns/op            32 B/op          1 allocs/op
PASS
ok      github.com/labring/sealos/service/aiproxy/middleware    30.312s

goos: darwin
goarch: arm64
pkg: github.com/labring/sealos/service/aiproxy/middleware
cpu: Apple M1
BenchmarkCompareGetModelFromJSON/ValidModel/Std-8                1720896               709.9 ns/op           288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/ValidModel/JSONIter-8           8586505               139.6 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/ValidModel/Sonic-8             14693224                81.07 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/Std-8                   2494041               474.1 ns/op           216 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/JSONIter-8              3549926               344.9 ns/op           120 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/NoModel/Sonic-8                10268605               116.6 ns/op            32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/Std-8                 8629236               135.8 ns/op           168 B/op          3 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/JSONIter-8            5931002               203.4 ns/op            96 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/EmptyJSON/Sonic-8              35825886                33.29 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/Std-8                  245664              4906 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/JSONIter-8            8863411               134.5 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON/Sonic-8              14747215                80.40 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/Std-8                 244346              4885 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/JSONIter-8           1000000              1049 ns/op              96 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/LargeJSON2/Sonic-8               650385              1768 ns/op              32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/Std-8               28294             42405 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/JSONIter-8        8954170               134.2 ns/op            74 B/op          5 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON/Sonic-8          14732263                80.71 ns/op           32 B/op          1 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/Std-8              28291             42454 ns/op             288 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/JSONIter-8                146515              8377 ns/op              96 B/op          8 allocs/op
BenchmarkCompareGetModelFromJSON/VeryLargeJSON2/Sonic-8                    75229             16057 ns/op              32 B/op          1 allocs/op
PASS
ok      github.com/labring/sealos/service/aiproxy/middleware    29.506s

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Mar 4, 2025

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 2068
✅ Successful 445
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 1618
❓ Unknown 0
🚫 Errors 3

Errors per input

Errors in extensions/ide/vscode/devbox/vsc-extension-quickstart.md

Full action output

Full Github Actions output

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.97%. Comparing base (288c4fb) to head (7c7a47f).
Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5438   +/-   ##
=======================================
  Coverage   61.97%   61.97%           
=======================================
  Files           8        8           
  Lines         647      647           
=======================================
  Hits          401      401           
  Misses        200      200           
  Partials       46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants