func InitConfig()

in perf-tools/framework/config.go [48:59]


func InitConfig(configFile string) (*Config, error) {
	yamlContent, err := ioutil.ReadFile(configFile)
	if err != nil {
		return nil, fmt.Errorf("Failed to read config file: %s ", err.Error())
	}
	conf := Config{}
	err = yaml.Unmarshal(yamlContent, &conf)
	if err != nil {
		return nil, fmt.Errorf("Failed to parse config file: %s ", err.Error())
	}
	return &conf, nil
}