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