func BenchmarkDefByFile(filePath string) (BenchmarkDef, error) {
	def, err := parseBenchmarkDef(filePath)
	if err != nil {
		log.Logger().Fatalf("error when parsing the benchmark definition %v", err)
	}
	return def, err
}
BenchmarkDefByFile procudes a benchmark definition out of a YAML file
Return a benchmark definition object and error
package definition
import (
	"io/ioutil"
	"path/filepath"
	"regexp"
	"strconv"
	"strings"
	"gopkg.in/yaml.v2"
	"github.com/giantswarm/nomi/log"
)
type StopCommand string
type ExpectRunningSymbol string
const (
	instructionStart         = "start"
	instructionFloat         = "float"
	instructionExpectRunning = "expect-running"
	instructionSleep         = "sleep"
	instructionStop          = "stop"
	StopAll StopCommand = "stop-all"
	Lower   ExpectRunningSymbol = "<"
	Greater ExpectRunningSymbol = ">"
)
type Start struct {
	Max      int `yaml:"max"`
	Interval int `yaml:"interval"`
}
type Float struct {
	Rate     float64 `yaml:"rate"`
	Duration int     `yaml:"duration"`
}
type ExpectRunning struct {
	Symbol ExpectRunningSymbol `yaml:"symbol"`
	Amount int                 `yaml:"amount"`
}
type Instruction struct {
	Start         Start
	Float         Float
	ExpectRunning ExpectRunning
	Sleep         int         `yaml:"sleep"`
	Stop          StopCommand `yaml:"stop"`
}
type Instructions []Instruction
type Application struct {
	Name         string
	Image        string
	Type         string
	Network      string
	Volumes      Volumes
	Ports        []int
	Args         []string
	Envs         map[string]string
	UnitFilePath string `yaml:"unitfile-path"`
}
type Volumes []Volume
type Volume struct {
	Source string
	Target string
}
type BenchmarkDef struct {
	Application       Application
	Instructions      Instructions
	InstanceGroupSize int `yaml:"instancegroup-size"`
}