func init()

in verify-evaluate-cloud-metrics/main.go [100:134]


func init() {
	// Initializing of the flag and print out the values for visibility.
	flag.StringVar(&project, "project", os.Getenv("CLOUD_DEPLOY_PROJECT"), "The ID of the project that has the metrics defined, defaulted to the CLOUD_DEPLOY_PROJECT environmental variable")
	flag.StringVar(&tableName, "table-name", "", "The [tablename](https://cloud.google.com/monitoring/mql/reference#fetch-tabop) to fetch from")
	flag.StringVar(&metricType, "metric-type", "", "The [metric type](https://cloud.google.com/monitoring/mql/reference#metric-tabop) to get from the table-name")
	flag.StringVar(&predicates, "predicates", "", "Commma delimited list of [predicates](https://cloud.google.com/monitoring/mql/reference#filter-tabop)")
	flag.StringVar(&responseCodeClass, "response-code-class", "5xx", "The response_code_class that is being monitored for the error condition")
	flag.Float64Var(&maxErrorPercentage, "max-error-percentage", 10, "The maximum allowable percentage of the specified response_code_class per sliding window")
	flag.DurationVar(&slidingWindow, "sliding-window", time.Minute, "The duration of the sliding window")
	flag.DurationVar(&triggerDuration, "trigger-duration", 5*time.Minute, "The time required to observe the error condition for verify to fail")
	flag.DurationVar(&timeToMonitor, "time-to-monitor", 20*time.Minute, "The time to monitor for response failures before the verification is marked successful")
	flag.DurationVar(&refreshPeriod, "refresh-period", 5*time.Minute, "The time to wait before refreshing the data set with new data")
	flag.StringVar(&customQuery, "custom-query", "", "Customized query following [MQL](https://cloud.google.com/monitoring/mql/reference) to use for query instead. By specifying this, the query will not be crafted by the program")

	flag.Parse()
	project = replaceEnvVars(project)
	tableName = replaceEnvVars(tableName)
	metricType = replaceEnvVars(metricType)
	predicates = replaceEnvVars(predicates)
	responseCodeClass = replaceEnvVars(responseCodeClass)

	fmt.Println("---")
	fmt.Println("Verification configured as follows:")
	fmt.Printf("Project: %q\n", project)
	fmt.Println(formatMsg(fmt.Sprintf("Table Name: %q", tableName)))
	fmt.Println(formatMsg(fmt.Sprintf("Metric Type: %q", metricType)))
	fmt.Println(formatMsg(fmt.Sprintf("Predicates: %q", predicates)))
	fmt.Println(formatMsg(fmt.Sprintf("Response Code Class: %q", responseCodeClass)))
	fmt.Printf("Max Error Percentage: %v\n", maxErrorPercentage)
	fmt.Println(formatMsg(fmt.Sprintf("Sliding Window: %v", slidingWindow)))
	fmt.Printf("Trigger Duration: %v\n", triggerDuration)
	fmt.Printf("Time To Monitor: %v\n", timeToMonitor)
	fmt.Printf("Refresh Period: %v\n", refreshPeriod)
	fmt.Println("---")
}