1 // the benchmark controller
3 package benchcontroller
14 type BenchControllerConfig struct {
25 func CreateController()(contConfig *BenchControllerConfig)
27 bcConfig := new(BenchControllerConfig);
32 func MainLoop(conf *BenchControllerConfig, commInChan chan string, commOutChan chan string)
35 time.Sleep(1000000000);
38 fmt.Printf("coms: %s\n", i);
40 calls := strings.Split(i, ":", 0);
42 fmt.Printf("stuff 1: %s, stuff 2: %s\n", calls[0], calls[1]);
46 // this means shutdown
47 os.Stdout.WriteString("time for a conf\n");
53 conf.nclients, esink = strconv.Atoi(calls[7]);
54 conf.datamult, esink = strconv.Atoi(calls[6]);
56 if esink != os.ECHILD {
57 // i need to do something with esink or the bollocks compiler screws itself
59 conf.dbtype = calls[1];
60 conf.dbhost = calls[2];
61 conf.dbuser = calls[3];
62 conf.dbpass = calls[4];
63 conf.dbname = calls[5];
66 // get ready to bench - start the clients
67 os.Stdout.WriteString("ready clients\n");
70 os.Stdout.WriteString("start clients\n");