diff --git a/benchmark_main.go b/benchmark_main.go index 256a5207f..eb8ff2578 100644 --- a/benchmark_main.go +++ b/benchmark_main.go @@ -85,16 +85,6 @@ func main() { // Setup a logger to stdout and log file. logFileName := fmt.Sprintf("./%v/%v.log", *logFolder, *port) - _, err := os.Stat(logFileName) - if err == nil { - fmt.Printf("file %s exists", logFileName) - os.Remove(logFileName) - fmt.Printf("removed file %s", logFileName) - } else if os.IsNotExist(err) { - fmt.Printf("file %s not exists", logFileName) - } else { - fmt.Printf("file %s stat error: %v", logFileName, err) - } h := log.MultiHandler( log.Must.FileHandler(logFileName, log.LogfmtFormat()), log.StdoutHandler) diff --git a/deploy_one_instance.sh b/deploy_one_instance.sh index 688dc8cec..4a4060288 100755 --- a/deploy_one_instance.sh +++ b/deploy_one_instance.sh @@ -22,8 +22,15 @@ echo ">>>>" python aws-scripts/preprocess_peerlist.py FILE='isTransaction.txt' config=$1 -log_folder=logs/ -mkdir -p $log_folder + +t=`date +"%Y%m%d-%H%M%S"` +log_folder="logs/log-$t" + +if [ ! -d $log_folder ] +then + mkdir -p $log_folder +fi + if [ -f $FILE ]; then go run ./aws-code/transaction_generator.go -config_file $config -log_folder $log_folder& else