-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve parseRequestHeader function and add the unit tests and benchm…
…arks (#712) * Benchmarks and Unit tests for parseRequestHeader function ```shell % go test -benchmem -bench=. -run=^Benchmark goos: darwin goarch: amd64 pkg: github.com/go-resty/resty/v2 cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Benchmark_parseRequestHeader-16 1168611 1042 ns/op 496 B/op 8 allocs/op PASS ok github.com/go-resty/resty/v2 2.383s ``` * improve the performance of parseRequestHeader ```shell % go test -benchmem -bench=. -run=^Benchmark goos: darwin goarch: amd64 pkg: github.com/go-resty/resty/v2 cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Benchmark_parseRequestHeader-16 7956481 155.6 ns/op 0 B/op 0 allocs/op PASS ok github.com/go-resty/resty/v2 1.599s ```
- Loading branch information
Showing
2 changed files
with
125 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters