MCPcopy
hub / github.com/CodisLabs/codis / main

Function main

extern/deprecated/redis-test/utils.go:661–685  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

659)
660
661func main() {
662 if testcase == nil {
663 Panic("please set testcase in init function")
664 }
665 var ncpu int
666 flag.IntVar(&ncpu, "ncpu", 0, "# of cpus")
667 flag.Usage = func() {
668 fmt.Fprintf(os.Stderr, "Usage:\n")
669 flag.PrintDefaults()
670 }
671
672 testcase.init()
673
674 flag.Parse()
675 runtime.GOMAXPROCS(ncpu)
676
677 go func() {
678 for {
679 time.Sleep(time.Second)
680 log.Printf("%6d ops/s\n", ops.Reset())
681 }
682 }()
683
684 testcase.main()
685}

Callers

nothing calls this directly

Calls 6

PanicFunction · 0.70
initMethod · 0.65
SleepMethod · 0.65
ResetMethod · 0.65
mainMethod · 0.65
PrintfMethod · 0.45

Tested by

no test coverage detected