1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-12-28 09:15:39 -05:00

chore: move cpu profile into main

This commit is contained in:
Tyler Stiene 2021-01-16 14:06:58 -05:00
parent 3b6d3ba5bd
commit 74ff984906
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,9 @@ mumble-discord-bridge: $(GOFILES)
dev: $(GOFILES)
goreleaser build --skip-validate --rm-dist && sudo ./dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge
dev-profile: $(GOFILES)
goreleaser build --skip-validate --rm-dist && sudo ./dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge -cpuprofile cpu.prof
docker-latest:
docker build -t stieneee/mumble-discord-bridge:latest .
docker push stieneee/mumble-discord-bridge:latest

View File

@ -25,8 +25,6 @@ var (
date string
)
var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
func main() {
log.Println("Mumble-Discord-Bridge")
log.Println("v" + version + " " + commit + " " + date)
@ -45,6 +43,9 @@ func main() {
discordCommand := flag.String("discord-command", lookupEnvOrString("DISCORD_COMMAND", "mumble-discord"), "DISCORD_COMMAND,Discord command string, env alt DISCORD_COMMAND, optional, defaults to mumble-discord")
mode := flag.String("mode", lookupEnvOrString("MODE", "constant"), "MODE,determine which mode the bridge starts in")
nice := flag.Bool("nice", lookupEnvOrBool("NICE", false), "NICE,whether the bridge should automatically try to 'nice' itself")
cpuprofile := flag.String("cpuprofile", "", "write cpu profile to `file`")
flag.Parse()
log.Printf("app.config %v\n", getConfig(flag.CommandLine))