Skip to content

Commit 6aade78

Browse files
committed
Add patch for profiling
1 parent 827d3ca commit 6aade78

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

profiling.patch

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/main.go b/main.go
2+
index c3faaf2..86edd8f 100644
3+
--- a/main.go
4+
+++ b/main.go
5+
@@ -24,6 +24,7 @@ import (
6+
"github.com/jollheef/henhouse/db"
7+
"github.com/jollheef/henhouse/game"
8+
"github.com/jollheef/henhouse/scoreboard"
9+
+ "github.com/pkg/profile"
10+
kingpin "gopkg.in/alecthomas/kingpin.v2"
11+
)
12+
13+
@@ -221,6 +222,7 @@ func initGame(database *sql.DB, cfg config.Config) (err error) {
14+
}
15+
16+
func main() {
17+
+ defer profile.Start().Stop()
18+
19+
if len(CommitID) > 7 {
20+
CommitID = CommitID[:7] // abbreviated commit hash

0 commit comments

Comments
 (0)