apiserver/pkg/util/flowcontrol
Patrick Ohly ec795ae204 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.

Kubernetes-commit: 9eaa2dc554e0c3d4485d4c916dfdbc2f517db2e0
2021-12-11 12:10:21 +01:00
..
counter Refactor goroutine counting 2021-07-29 00:35:25 -04:00
debug apf: include seat information in request dump 2021-10-14 09:27:54 -04:00
fairqueuing avoid klog Info calls without verbosity 2021-12-11 12:10:21 +01:00
format apf: update apf logic to use v1beta2 2021-08-16 17:53:57 -04:00
metrics Clarify APF metric wrt all three stages of execution 2021-11-30 11:45:53 -05:00
request apf: add a metric to count seat samples 2021-11-23 11:36:09 -05:00
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
apf_context.go Free APF seats for watches handled by an aggregated apiserver. 2021-10-06 10:16:46 -04:00
apf_controller.go avoid klog Info calls without verbosity 2021-12-11 12:10:21 +01:00
apf_controller_debug.go apf: include seat information in request dump 2021-10-14 09:27:54 -04:00
apf_filter.go apf: ensure exempt request notes the classification 2021-12-05 11:29:15 -05:00
controller_test.go apf: ensure exempt request notes the classification 2021-12-05 11:29:15 -05:00
filter_test.go Added API Priority and Fairness filter and config consumer 2020-01-25 19:47:12 -05:00
formatting.go Added API Priority and Fairness filter and config consumer 2020-01-25 19:47:12 -05:00
gen_test.go Add sample-and-watermark for seats occupied during all of execution 2021-10-25 01:13:52 -04:00
match_test.go Add metrics about watch counts seen by APF 2021-10-25 03:31:47 -04:00
patch_test.go apf: update apf logic to use v1beta2 2021-08-16 17:53:57 -04:00
rule.go apf: update apf logic to use v1beta2 2021-08-16 17:53:57 -04:00
watch_tracker.go P&F fix watch tracker bug 2021-11-03 15:02:51 +01:00
watch_tracker_test.go P&F fix watch tracker bug 2021-11-03 15:02:51 +01:00