kubernetes/pkg/scheduler/framework/plugins/noderesources
Patrick Ohly 9eaa2dc554 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.
2022-01-12 07:48:36 +01:00
..
balanced_allocation.go use original requests in NodeResourcesBalancedAllocation instead of NonZero (#105845) 2021-10-29 19:04:14 -07:00
balanced_allocation_test.go rm makeNodeWithExtendedResource method in noderesources unit test && doc: update least_allocated strategy detail doc 2021-11-18 09:15:26 +08:00
fit.go Added an integration test for NodeResourcesFit scoring 2021-11-30 12:13:30 -05:00
fit_test.go refactor scheudler's node resource plugins 2021-11-03 00:52:23 +08:00
least_allocated.go rm makeNodeWithExtendedResource method in noderesources unit test && doc: update least_allocated strategy detail doc 2021-11-18 09:15:26 +08:00
least_allocated_test.go refactor scheudler's node resource plugins 2021-11-03 00:52:23 +08:00
most_allocated.go refactor scheudler's node resource plugins 2021-11-03 00:52:23 +08:00
most_allocated_test.go refactor scheudler's node resource plugins 2021-11-03 00:52:23 +08:00
requested_to_capacity_ratio.go refactor scheudler's node resource plugins 2021-11-03 00:52:23 +08:00
requested_to_capacity_ratio_test.go rm makeNodeWithExtendedResource method in noderesources unit test && doc: update least_allocated strategy detail doc 2021-11-18 09:15:26 +08:00
resource_allocation.go avoid klog Info calls without verbosity 2022-01-12 07:48:36 +01:00
test_util.go rm makeNodeWithExtendedResource method in noderesources unit test && doc: update least_allocated strategy detail doc 2021-11-18 09:15:26 +08:00