apiserver/pkg/server/httplog
Marek Siarkowicz 5587d5c607 Improve performance of http access logs
Fixes:
* Don't call LogArgs if log will not be written due low verbosity
* Create separate slice for hijacked to avoid append on main path
* Shorten log message as this log is to common to be verbose

name           old time/op    new time/op    delta
WithLogging-4    4.95µs ± 3%    3.52µs ± 1%  -28.80%  (p=0.000 n=10+8)

name           old alloc/op   new alloc/op   delta
WithLogging-4    2.93kB ± 0%    1.22kB ± 0%  -58.45%  (p=0.000 n=10+9)

name           old allocs/op  new allocs/op  delta
WithLogging-4      32.0 ± 0%      20.0 ± 0%  -37.50%  (p=0.000 n=10+10)

Kubernetes-commit: 303e1c19225149868d735b5c876d8ca9d3e1b5c9
2020-06-23 13:56:01 +02:00
..
doc.go genericapiserver: fix imports 2017-01-19 10:27:27 -05:00
httplog.go Improve performance of http access logs 2020-06-23 13:56:01 +02:00
httplog_test.go apiserver: store httplog in context 2019-06-14 13:09:13 +02:00