MCPcopy
hub / github.com/google/seesaw / ipvsGetServices

Function ipvsGetServices

test_tools/ncc_test_tool/main.go:438–458  ·  view source on GitHub ↗
(quit chan bool, count chan int)

Source from the content-addressed store, hash-verified

436}
437
438func 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
460func ipvsGetLoadTest(clients int, duration time.Duration) {
461 log.Printf("Starting IPVS get load test - %v duration with %d clients", duration, clients)

Callers 1

ipvsGetLoadTestFunction · 0.85

Calls 3

CloseMethod · 0.95
IPVSGetServicesMethod · 0.95
NewNCCFunction · 0.92

Tested by

no test coverage detected