Improve debugging

This commit is contained in:
Leonid Bugaev
2015-07-31 21:08:35 +03:00
parent 5158f75dc8
commit 27f83a6c0c
3 changed files with 11 additions and 3 deletions
+2
View File
@@ -2,3 +2,5 @@
*.gor
*.out
*.bin
+8 -2
View File
@@ -37,7 +37,13 @@ dbench:
# Used mainly for debugging, because docker container do not have access to parent machine ports
drun:
docker run -v `pwd`:$(SOURCE_PATH) -t -i gor go run $(SOURCE) --input-dummy=0 --output-http="http://localhost:9000" --verbose -h
docker run -v `pwd`:$(SOURCE_PATH) -t -i gor go run $(SOURCE) --input-dummy=0 --output-http="http://localhost:9000" --verbose
dbash:
drecord:
docker run -v `pwd`:$(SOURCE_PATH) -t -i gor go run $(SOURCE) --input-dummy=0 --output-file=requests.bin --verbose
dreplay:
docker run -v `pwd`:$(SOURCE_PATH) -t -i gor go run $(SOURCE) --input-file=requests.bin --output-tcp=:9000 --verbose -h
dbash:
docker run -v `pwd`:$(SOURCE_PATH) -t -i gor /bin/bash
+1 -1
View File
@@ -122,7 +122,7 @@ func init() {
// Debug gets called only if --verbose flag specified
func Debug(args ...interface{}) {
if Settings.verbose {
fmt.Print("[DEBUG] ")
fmt.Printf("[DEBUG][PID %d] ", os.Getpid())
log.Println(args...)
}
}