diff --git a/.gitignore b/.gitignore index 9d54abc..c59f5ba 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.gor *.out + +*.bin diff --git a/Makefile b/Makefile index 4e4a814..3450a9b 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/settings.go b/settings.go index dbf7146..8bcc7c9 100644 --- a/settings.go +++ b/settings.go @@ -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...) } }