1 Star 0 Fork 0

liucxer/ceph-tools

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 685 Bytes
一键复制 编辑 原始数据 按行查看 历史
liu.changxi@datatom.com 提交于 2021-11-14 10:46 +08:00 . update
package main
import (
"fmt"
"gitee.com/liucxer/ceph-tools/internal/app/bare_disk"
"gitee.com/liucxer/ceph-tools/pkg/csv"
"gitee.com/liucxer/ceph-tools/pkg/tools"
"io/ioutil"
"os"
)
func main() {
tools.InitLog()
if len(os.Args) != 2 {
fmt.Println("Usage:\n ./cmd config.json")
return
}
execConfig, err := bare_disk.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 := execConfig.ResultDir + "/result.csv"
err = ioutil.WriteFile(resultPath, []byte(res), os.ModePerm)
if err != nil {
return
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liucxer/ceph-tools.git
git@gitee.com:liucxer/ceph-tools.git
liucxer
ceph-tools
ceph-tools
ed01591ec671

搜索帮助