Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Execute()
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type DataRow
- type Perf
- type Perfs
Constants ¶
const ( // ExitOK is exit code on success. ExitOK int = iota // ExitNG is exit code on error. ExitNG )
const (
// DateCol is Date column number.
DateCol = 0
)
Variables ¶
var ( // OutCsv is csv output path. OutCsv string // OutExcel is excel output path. OutExcel string // AverageCnt output count. AverageCnt int // MedianCnt output count. MedianCnt int // ModeCnt output count. ModeCnt int // RangeCnt output count. RangeCnt int // MaxCnt output count. MaxCnt int // VarianceCnt output count. VarianceCnt int // RmCsv is whether remove output csv. RmCsv bool // Begin is begin of data range. (HHMMSS) Begin string // End is end of data range. (HHMMSS) End string // Match is regexp target performance name. Match string // Ignore is regexp ignore target performance name. Ignore string // Ymax is chart max value. Ymax int64 // Ymin is chart min value. Ymin int64 // DateTimeVec is DateTime vector. DateTimeVec = make([]string, 0) )
var RootCmd = &cobra.Command{
Use: "anaperf path/to/mcodir",
Short: "Analyze performance data.",
Long: `Analyze performance csv data
For example:
anaperf path/to/perfdata.csv
`,
RunE: runE,
}
RootCmd represents the base command when called without any subcommands
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively