Browse Source

Build Info everywhere

- moved `psiphon/buildinfo.go` to `psiphon/common/buildinfo.go` and updated references
- created `BuildInfo` struct: serializable to JSON for client notices, .ToMap() function for server log messages
- created new ldflags variable `dependencies` (takes string of JSON object)
- refactored build scripts to generate `$LDFLAGS` after `go get`
- updated READMEs
Michael Goldberger 9 years ago
parent
commit
89150750e9

+ 1 - 1
ConsoleClient/Dockerfile

@@ -87,4 +87,4 @@ RUN cd $PKG_CONFIG_PATH_32 \
   && make depend \
   && make depend \
   && make
   && make
 
 
-WORKDIR $GOPATH/src
+WORKDIR $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient

+ 2 - 2
ConsoleClient/README.md

@@ -15,9 +15,9 @@ Note that you may need to use `sudo docker` below, depending on your OS.
   cd .. && \
   cd .. && \
     docker run \
     docker run \
     --rm \
     --rm \
-    -v $(pwd):/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
+    -v $PWD:/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
     psiclient \
     psiclient \
-    /bin/bash -c 'cd /go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient && ./make.bash all' \
+    /bin/bash -c './make.bash all' \
   ; cd -
   ; cd -
   ```
   ```
 This command can also be modified by:
 This command can also be modified by:

+ 1 - 1
ConsoleClient/main.go

@@ -62,7 +62,7 @@ func main() {
 	}
 	}
 	psiphon.SetNoticeOutput(noticeWriter)
 	psiphon.SetNoticeOutput(noticeWriter)
 
 
-	psiphon.EmitNoticeBuildInfo()
+	psiphon.NoticeBuildInfo()
 
 
 	// Handle required config file parameter
 	// Handle required config file parameter
 
 

+ 29 - 20
ConsoleClient/make.bash

@@ -8,26 +8,32 @@ if [ ! -f make.bash ]; then
 fi
 fi
 
 
 EXE_BASENAME="psiphon-tunnel-core"
 EXE_BASENAME="psiphon-tunnel-core"
-BUILDINFOFILE="${EXE_BASENAME}_buildinfo.txt"
-BUILDDATE=$(date --iso-8601=seconds)
-BUILDREPO=$(git config --get remote.origin.url)
-BUILDREV=$(git rev-parse --short HEAD)
-GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
-
-LDFLAGS="\
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildDate=$BUILDDATE \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRepo=$BUILDREPO \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRev=$BUILDREV \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.goVersion=$GOVERSION \
-"
-echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
-
-echo "Variables for ldflags:"
-echo " Build date: ${BUILDDATE}"
-echo " Build repo: ${BUILDREPO}"
-echo " Build revision: ${BUILDREV}"
-echo " Go version: ${GOVERSION}"
-echo ""
+
+prepare_build () {
+  BUILDINFOFILE="${EXE_BASENAME}_buildinfo.txt"
+  BUILDDATE=$(date --iso-8601=seconds)
+  BUILDREPO=$(git config --get remote.origin.url)
+  BUILDREV=$(git rev-parse --short HEAD)
+  GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
+  DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
+
+  LDFLAGS="\
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=$BUILDDATE \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=$BUILDREPO \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=$BUILDREV \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=$GOVERSION \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.dependencies=$DEPENDENCIES \
+  "
+  echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
+
+  echo "Variables for ldflags:"
+  echo " Build date: ${BUILDDATE}"
+  echo " Build repo: ${BUILDREPO}"
+  echo " Build revision: ${BUILDREV}"
+  echo " Go version: ${GOVERSION}"
+  echo " Dependencies: ${DEPENDENCIES}"
+  echo ""
+}
 
 
 if [ ! -d bin ]; then
 if [ ! -d bin ]; then
   mkdir bin
   mkdir bin
@@ -36,6 +42,7 @@ fi
 build_for_windows () {
 build_for_windows () {
   echo "...Getting project dependencies (via go get) for Windows. Parameter is: '$1'"
   echo "...Getting project dependencies (via go get) for Windows. Parameter is: '$1'"
   GOOS=windows go get -d -v ./...
   GOOS=windows go get -d -v ./...
+  prepare_build
   if [ $? != 0 ]; then
   if [ $? != 0 ]; then
     echo "....'go get' failed, exiting"
     echo "....'go get' failed, exiting"
     exit $?
     exit $?
@@ -90,6 +97,7 @@ build_for_windows () {
 build_for_linux () {
 build_for_linux () {
   echo "Getting project dependencies (via go get) for Linux. Parameter is: '$1'"
   echo "Getting project dependencies (via go get) for Linux. Parameter is: '$1'"
   GOOS=linux go get -d -v ./...
   GOOS=linux go get -d -v ./...
+  prepare_build
   if [ $? != 0 ]; then
   if [ $? != 0 ]; then
     echo "...'go get' failed, exiting"
     echo "...'go get' failed, exiting"
     exit $?
     exit $?
@@ -139,6 +147,7 @@ build_for_linux () {
 build_for_osx () {
 build_for_osx () {
   echo "Getting project dependencies (via go get) for OSX"
   echo "Getting project dependencies (via go get) for OSX"
   GOOS=darwin go get -d -v ./...
   GOOS=darwin go get -d -v ./...
+  prepare_build
   if [ $? != 0 ]; then
   if [ $? != 0 ]; then
     echo "..'go get' failed, exiting"
     echo "..'go get' failed, exiting"
     exit $?
     exit $?

+ 8 - 5
MobileLibrary/Android/make.bash

@@ -27,13 +27,15 @@ BUILDREPO=$(git config --get remote.origin.url)
 BUILDREV=$(git rev-parse --short HEAD)
 BUILDREV=$(git rev-parse --short HEAD)
 GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
 GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
 GOMOBILEVERSION=$(gomobile version | perl -ne '/gomobile version (.*?) / && print $1')
 GOMOBILEVERSION=$(gomobile version | perl -ne '/gomobile version (.*?) / && print $1')
+DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
 
 
 LDFLAGS="\
 LDFLAGS="\
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildDate=$BUILDDATE \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRepo=$BUILDREPO \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRev=$BUILDREV \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.goVersion=$GOVERSION \
--X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.gomobileVersion=$GOMOBILEVERSION \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=$BUILDDATE \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=$BUILDREPO \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=$BUILDREV \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=$GOVERSION \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.gomobileVersion=$GOMOBILEVERSION \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.dependencies=$DEPENDENCIES \
 "
 "
 
 
 echo "Variables for ldflags:"
 echo "Variables for ldflags:"
@@ -42,6 +44,7 @@ echo " Build repo: ${BUILDREPO}"
 echo " Build revision: ${BUILDREV}"
 echo " Build revision: ${BUILDREV}"
 echo " Go version: ${GOVERSION}"
 echo " Go version: ${GOVERSION}"
 echo " Gomobile version: ${GOMOBILEVERSION}"
 echo " Gomobile version: ${GOMOBILEVERSION}"
+echo " Dependencies: ${DEPENDENCIES}"
 echo ""
 echo ""
 
 
 gomobile bind -v -target=android/arm -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
 gomobile bind -v -target=android/arm -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi

+ 1 - 1
MobileLibrary/psi/psi.go

@@ -73,7 +73,7 @@ func Start(
 			provider.Notice(string(notice))
 			provider.Notice(string(notice))
 		}))
 		}))
 
 
-	psiphon.EmitNoticeBuildInfo()
+	psiphon.GetBuildInfo()
 
 
 	// TODO: should following errors be Notices?
 	// TODO: should following errors be Notices?
 
 

+ 9 - 4
README.md

@@ -29,11 +29,16 @@ Client Setup
     ```
     ```
     BUILDDATE=$(date --iso-8601=seconds)
     BUILDDATE=$(date --iso-8601=seconds)
     BUILDREPO=$(git config --get remote.origin.url)
     BUILDREPO=$(git config --get remote.origin.url)
-    BUILDREV=$(git rev-parse HEAD)
+    BUILDREV=$(git rev-parse --short HEAD)
+    GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
+    DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
+
     LDFLAGS="\
     LDFLAGS="\
-    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildDate=$BUILDDATE \
-    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRepo=$BUILDREPO \
-    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRev=$BUILDREV \
+    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=$BUILDDATE \
+    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=$BUILDREPO \
+    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=$BUILDREV \
+    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=$GOVERSION \
+    -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.dependencies=$DEPENDENCIES \
     "
     "
     ```
     ```
 
 

+ 29 - 1
Server/make.bash

@@ -10,15 +10,43 @@ if [ ! -f make.bash ]; then
   exit 1
   exit 1
 fi
 fi
 
 
+prepare_build () {
+  BUILDINFOFILE="${EXE_BASENAME}_buildinfo.txt"
+  BUILDDATE=$(date --iso-8601=seconds)
+  BUILDREPO=$(git config --get remote.origin.url)
+  BUILDREV=$(git rev-parse --short HEAD)
+  GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
+  DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
+
+  LDFLAGS="\
+  -linkmode external -extldflags \"-static\" \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=$BUILDDATE \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=$BUILDREPO \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=$BUILDREV \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=$GOVERSION \
+  -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.dependencies=$DEPENDENCIES \
+  "
+  echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
+
+  echo "Variables for ldflags:"
+  echo " Build date: ${BUILDDATE}"
+  echo " Build repo: ${BUILDREPO}"
+  echo " Build revision: ${BUILDREV}"
+  echo " Go version: ${GOVERSION}"
+  echo " Dependencies: ${DEPENDENCIES}"
+  echo ""
+}
+
 build_for_linux () {
 build_for_linux () {
   echo "Getting project dependencies (via go get) for Linux. Parameter is: '$1'"
   echo "Getting project dependencies (via go get) for Linux. Parameter is: '$1'"
   GOOS=linux GOARCH=amd64 go get -d -v ./...
   GOOS=linux GOARCH=amd64 go get -d -v ./...
+  prepare_build
   if [ $? != 0 ]; then
   if [ $? != 0 ]; then
     echo "...'go get' failed, exiting"
     echo "...'go get' failed, exiting"
     exit $?
     exit $?
   fi
   fi
 
 
-  GOOS=linux GOARCH=amd64 go build --ldflags '-linkmode external -extldflags "-static"' -o psiphond main.go
+  GOOS=linux GOARCH=amd64 go build -ldflags "$LDFLAGS" -o psiphond main.go
   if [ $? != 0 ]; then
   if [ $? != 0 ]; then
     echo "...'go build' failed, exiting"
     echo "...'go build' failed, exiting"
     exit $?
     exit $?

+ 0 - 54
psiphon/buildinfo.go

@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2015, Psiphon Inc.
- * All rights reserved.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package psiphon
-
-import "strings"
-
-/*
-These values should be filled in at build time using the `-X` option[1] to the
-Go linker (probably via `-ldflags` option to `go build` -- like `-ldflags "-X var1=abc -X var2=xyz"`).
-[1]: http://golang.org/cmd/ld/
-Without those build flags, the build info in the notice will simply be empty strings.
-Suggestions for how to fill in the values will be given for each variable.
-Note that any passed value must contain no whitespace.
-*/
-// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildDate=`date --iso-8601=seconds`
-var buildDate string
-
-// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRepo=`git config --get remote.origin.url`
-var buildRepo string
-
-// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.buildRev=`git rev-parse --short HEAD`
-var buildRev string
-
-// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.goVersion=`go version | perl -ne '/go version (.*?) / && print $1'`
-var goVersion string
-
-// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon.gomobileVersion=`gomobile version | perl -ne '/gomobile version (.*?) / && print $1'`
-var gomobileVersion string
-
-func EmitNoticeBuildInfo() {
-	NoticeBuildInfo(
-		strings.TrimSpace(buildDate),
-		strings.TrimSpace(buildRepo),
-		strings.TrimSpace(buildRev),
-		strings.TrimSpace(goVersion),
-		strings.TrimSpace(gomobileVersion))
-}

+ 89 - 0
psiphon/common/buildinfo.go

@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015, Psiphon Inc.
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package common
+
+import "encoding/json"
+
+/*
+These values should be filled in at build time using the `-X` option[1] to the
+Go linker (probably via `-ldflags` option to `go build` -- like `-ldflags "-X var1=abc -X var2=xyz"`).
+[1]: http://golang.org/cmd/ld/
+Without those build flags, the build info in the notice will simply be empty strings.
+Suggestions for how to fill in the values will be given for each variable.
+Note that any passed value must contain no whitespace.
+*/
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildDate=`date --iso-8601=seconds`
+var buildDate string
+
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRepo=`git config --get remote.origin.url`
+var buildRepo string
+
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.buildRev=`git rev-parse --short HEAD`
+var buildRev string
+
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.goVersion=`go version | perl -ne '/go version (.*?) / && print $1'`
+var goVersion string
+
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common.gomobileVersion=`gomobile version | perl -ne '/gomobile version (.*?) / && print $1'`
+var gomobileVersion string
+
+// -X github.com/Psiphon-Labs/psiphon-tunnel-core/common.dependencies=`echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/'`
+// Dependencies should be listed as a JSON object like the following (no spaces) {"github.com/Psiphon-Labs/psiphon-tunnel-core":"abcdef","...":"..."}
+var dependencies string
+
+// Capture relevant build information here for use in clients or servers
+type BuildInfo struct {
+	BuildDate       string          `json:"buildDate"`
+	BuildRepo       string          `json:"buildRepo"`
+	BuildRev        string          `json:"buildRev"`
+	GoVersion       string          `json:"goVersion"`
+	GomobileVersion string          `json:"gomobileVersion,omitempty"`
+	Dependencies    json.RawMessage `json:"dependencies"`
+}
+
+// Convert 'BuildInfo' struct to 'map[string]interface{}'
+func (bi *BuildInfo) ToMap() *map[string]interface{} {
+	var dependenciesMap map[string]interface{}
+	json.Unmarshal([]byte(bi.Dependencies), &dependenciesMap)
+
+	buildInfoMap := map[string]interface{}{
+		"buildDate":    bi.BuildDate,
+		"buildRepo":    bi.BuildRepo,
+		"buildRev":     bi.BuildRev,
+		"goVersion":    bi.GoVersion,
+		"dependencies": dependenciesMap,
+	}
+
+	return &buildInfoMap
+}
+
+// Return an instance of the BuildInfo struct
+func GetBuildInfo() *BuildInfo {
+	buildInfo := BuildInfo{
+		BuildDate:       buildDate,
+		BuildRepo:       buildRepo,
+		BuildRev:        buildRev,
+		GoVersion:       goVersion,
+		GomobileVersion: gomobileVersion,
+		Dependencies:    json.RawMessage(dependencies),
+	}
+
+	return &buildInfo
+}

+ 2 - 7
psiphon/notice.go

@@ -338,13 +338,8 @@ func NoticeConnectedTunnelDialStats(ipAddress string, tunnelDialStats *TunnelDia
 }
 }
 
 
 // NoticeBuildInfo reports build version info.
 // NoticeBuildInfo reports build version info.
-func NoticeBuildInfo(buildDate, buildRepo, buildRev, goVersion, gomobileVersion string) {
-	outputNotice("BuildInfo", 0,
-		"buildDate", buildDate,
-		"buildRepo", buildRepo,
-		"buildRev", buildRev,
-		"goVersion", goVersion,
-		"gomobileVersion", gomobileVersion)
+func NoticeBuildInfo() {
+	outputNotice("BuildInfo", 0, "buildInfo", common.GetBuildInfo())
 }
 }
 
 
 // NoticeExiting indicates that tunnel-core is exiting imminently.
 // NoticeExiting indicates that tunnel-core is exiting imminently.

+ 3 - 0
psiphon/server/services.go

@@ -58,6 +58,8 @@ func RunServices(configJSON []byte) error {
 		return common.ContextError(err)
 		return common.ContextError(err)
 	}
 	}
 
 
+	log.WithContextFields(*common.GetBuildInfo().ToMap()).Info("startup")
+
 	waitGroup := new(sync.WaitGroup)
 	waitGroup := new(sync.WaitGroup)
 	shutdownBroadcast := make(chan struct{})
 	shutdownBroadcast := make(chan struct{})
 	errors := make(chan error)
 	errors := make(chan error)
@@ -151,6 +153,7 @@ func logServerLoad(server *TunnelServer) {
 	var memStats runtime.MemStats
 	var memStats runtime.MemStats
 	runtime.ReadMemStats(&memStats)
 	runtime.ReadMemStats(&memStats)
 	fields := LogFields{
 	fields := LogFields{
+		"BuildRev":               common.GetBuildInfo().BuildRev,
 		"NumGoroutine":           runtime.NumGoroutine(),
 		"NumGoroutine":           runtime.NumGoroutine(),
 		"MemStats.Alloc":         memStats.Alloc,
 		"MemStats.Alloc":         memStats.Alloc,
 		"MemStats.TotalAlloc":    memStats.TotalAlloc,
 		"MemStats.TotalAlloc":    memStats.TotalAlloc,