Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BenchmarkControllers (0.24 sec)

  1. pkg/kube/krt/bench_test.go

    	v0 := byte((v >> 24) & 0xFF)
    	nextIP = net.IPv4(v0, v1, v2, v3)
    	return ret
    }
    
    func drainN(c chan string, n int) {
    	for n > 0 {
    		n--
    		<-c
    	}
    }
    
    func BenchmarkControllers(b *testing.B) {
    	log.FindScope("krt").SetOutputLevel(log.InfoLevel)
    	watch.DefaultChanSize = 100_000
    	initialPods := []*v1.Pod{}
    	for i := 0; i < 1000; i++ {
    		initialPods = append(initialPods, &v1.Pod{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 09 19:55:53 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. pkg/kube/krt/README.md

    such as loop unrolling.
    Similarly, `krt` can make complex optimizations in one place, so each controller implementation doesn't, which is likely to increase
    the amount of optimizations applied.
    
    The `BenchmarkControllers` puts this to the test, comparing an *ideal* hand-written controller to one written in `krt`.
    While the numbers are likely to change over time, at the time of writing the overhead for `krt` is roughly 10%:
    
    ```text
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 18 17:21:50 UTC 2023
    - 11.8K bytes
    - Viewed (0)
Back to top