Ver código fonte

Merge pull request #401 from 9seconds/fix-prof

Fix build with profiling
tags/v2.2.5^2^2
Sergei Arkhipov 2 meses atrás
pai
commit
27d10e6820
Nenhuma conta vinculada ao e-mail do autor do commit
2 arquivos alterados com 6 adições e 1 exclusões
  1. 6
    0
      .mise.toml
  2. 0
    1
      run_profile_tag_prof.go

+ 6
- 0
.mise.toml Ver arquivo

16
 outputs = ["mtg"]
16
 outputs = ["mtg"]
17
 run = "go build"
17
 run = "go build"
18
 
18
 
19
+[tasks."build:prof"]
20
+description = "Build binary with profiling enabled"
21
+sources = ["**/*.go", "go.mod", "go.sum"]
22
+outputs = ["mtg"]
23
+run = "go build -tags prof"
24
+
19
 [tasks.update]
25
 [tasks.update]
20
 description = "Update dependencies"
26
 description = "Update dependencies"
21
 run = [
27
 run = [

+ 0
- 1
run_profile_tag_prof.go Ver arquivo

3
 package main
3
 package main
4
 
4
 
5
 import (
5
 import (
6
-	"fmt"
7
 	"net"
6
 	"net"
8
 	"net/http"
7
 	"net/http"
9
 	_ "net/http/pprof" //nolint: gosec
8
 	_ "net/http/pprof" //nolint: gosec

Carregando…
Cancelar
Salvar