(quit chan bool, count chan int)
| 436 | } |
| 437 | |
| 438 | func ipvsGetServices(quit chan bool, count chan int) { |
| 439 | ncc, err := client.NewNCC(*nccSocket) |
| 440 | if err != nil { |
| 441 | log.Fatalf("Failed to connect to NCC: %v", err) |
| 442 | } |
| 443 | defer ncc.Close() |
| 444 | |
| 445 | i := 0 |
| 446 | for { |
| 447 | select { |
| 448 | case <-quit: |
| 449 | count <- i |
| 450 | return |
| 451 | default: |
| 452 | } |
| 453 | if _, err := ncc.IPVSGetServices(); err != nil { |
| 454 | log.Fatalf("Failed to get IPVS services: %v", err) |
| 455 | } |
| 456 | i++ |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | func ipvsGetLoadTest(clients int, duration time.Duration) { |
| 461 | log.Printf("Starting IPVS get load test - %v duration with %d clients", duration, clients) |
no test coverage detected