Esempio n. 1
0
func main() {
	config.LoadConfig("/tmp/catfs.json")
	flag.Parse()
	args := flag.Args()
	if len(args) == 0 {
		fmt.Println("No engouht arguments")
		return
	}
	switch args[0] {
	case "bandwidth-write":
		bandWidthBenchWrite(args[1:])
	case "bandwidth-read":
		bandWidthBenchRead(args[1:])
	case "op-mkdir":
		opBenchMkdir(args[1:], func(c *client.CatClient, fnn string) {
			c.Mkdir(fnn, 0)
		})

	case "op-delete":
		opBenchMkdir(args[1:], func(c *client.CatClient, fnn string) {
			c.Mkdir(fnn, 0)
			c.Remove(fnn)
		})
	default:
		fmt.Println("Benchmark not support")
	}
}
Esempio n. 2
0
func main() {
	flag.Parse()
	args := flag.Args()
	config.LoadConfig("/tmp/catfs.json")
	i, err := strconv.Atoi(args[0])
	if err != nil {
		log.Fatal(err)
	}
	for _, arg := range args[1:] {
		ii, err := strconv.Atoi(arg)
		if err != nil {
			log.Fatal(err)
		}
		go func(index int) {
			data.Serve(index)
		}(ii)
	}
	data.Serve(i)
}
Esempio n. 3
0
func main() {
	config.LoadConfig("/tmp/catfs.json")
	runPrompt()
}
Esempio n. 4
0
func main() {
	config.LoadConfig("/tmp/catfs.json")
	master.Serve()
}