1 Star 0 Fork 0

liucxer / ceph-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.go 724 Bytes
一键复制 编辑 原始数据 按行查看 历史
liu.changxi@datatom.com 提交于 2021-11-14 10:46 . update
package main
import (
"fmt"
"gitee.com/liucxer/ceph-tools/internal/app/performance_limit"
"gitee.com/liucxer/ceph-tools/pkg/csv"
"gitee.com/liucxer/ceph-tools/pkg/tools"
"io/ioutil"
"os"
"time"
)
func main() {
tools.InitLog()
if len(os.Args) != 2 {
fmt.Println("Usage:\n ./cmd config.json")
return
}
execConfig, err := exec_config.NewExecConfig(os.Args[1])
if err != nil {
return
}
fioResultList, err := execConfig.Run()
if err != nil {
return
}
res, err := csv.ObjectListToCsv(*fioResultList)
if err != nil {
return
}
resultPath := time.Now().Format("2006-01-02_15_04_05") + "_result.csv"
err = ioutil.WriteFile(resultPath, []byte(res), os.ModePerm)
if err != nil {
return
}
}
1
https://gitee.com/liucxer/ceph-tools.git
git@gitee.com:liucxer/ceph-tools.git
liucxer
ceph-tools
ceph-tools
db53517fcc53

搜索帮助