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

perf: optimise the performance of access_log #46

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

Skyenought
Copy link
Member

What type of PR is this?

perf

What this PR does / why we need it (English/Chinese):

Which issue(s) this PR fixes:

cloudwego/cwgo#107

@Skyenought Skyenought marked this pull request as draft December 6, 2023 08:22
@Skyenought Skyenought marked this pull request as ready for review December 6, 2023 08:30
@li-jin-gou
Copy link
Contributor

补充一下 benchmark

@li-jin-gou
Copy link
Contributor

有 break change 嘛?

@Skyenought
Copy link
Member Author

@li-jin-gou
Copy link
Contributor

修改一下 commit messgae 吧

@Skyenought
Copy link
Member Author

修改后

goos: darwin
goarch: amd64
pkg: github.com/hertz-contrib/logger/accesslog
cpu: Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Benchmark_AccessLog
Benchmark_AccessLog/Base
Benchmark_AccessLog/Base-8 365762 3361 ns/op 288 B/op 5 allocs/op
Benchmark_AccessLog/DefaultFormat
Benchmark_AccessLog/DefaultFormat-8 1000000000 0.0000594 ns/op
PASS

修改前

goos: darwin
goarch: amd64
pkg: github.com/hertz-contrib/logger/accesslog
cpu: Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Benchmark_AccessLog
Benchmark_AccessLog/Base
Benchmark_AccessLog/Base-8 280884 3786 ns/op 296 B/op 6 allocs/op
Benchmark_AccessLog/DefaultFormat
Benchmark_AccessLog/DefaultFormat-8 1000000000 0.0000559 ns/op
PASS

@li-jin-gou li-jin-gou merged commit 98413c3 into hertz-contrib:main Dec 6, 2023
8 checks passed
@Skyenought Skyenought deleted the sth branch December 6, 2023 19:57
@Skyenought Skyenought restored the sth branch December 6, 2023 19:57
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.

2 participants