INNER CODE UNIT · Go

main

sensu/sensu-go · cmd/loadit/main.go:44

func main() {
	flag.Parse()

	if *flagHugeEvents {
		oneMegabyte := make([]byte, 1024*1024)
		for i := range oneMegabyte {
			oneMegabyte[i] = byte(rand.Uint32() % 255)
		}
		oneMegabyteString := base64.StdEncoding.EncodeToString(oneMegabyte)
		command.CannedResponse.Output = oneMegabyteString
	}

	go func() {
		log.Println(http.ListenAndServe(fmt.Sprintf("localhost:%d", *flagProfilingPort), nil))
	}()

	logrus.SetLevel(logrus.WarnLevel)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…