diff options
author | haoping-ku <haoping.ku@dexon.org> | 2018-12-05 17:38:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 17:38:03 +0800 |
commit | 4eb02f1dd96e136b0f7cf7eff792da1e44176713 (patch) | |
tree | 3757739bff31ce4b9cb7ff45be572f9858fc19e9 /cmd | |
parent | 1f48b590f6e9a6d3fd773846a3d8ba1b7f0419e6 (diff) | |
download | dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.gz dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.bz2 dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.lz dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.xz dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.zst dexon-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.zip |
Haoping fix simulation (#356)
* simulation: add benchmark features
* tmp
* simulation: modify Debug interface
* Added BlockReceived and BlockReady function to Debug interface.
* Added Benchmark features.
* fix
* fix typos
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dexcon-simulation/main.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/dexcon-simulation/main.go b/cmd/dexcon-simulation/main.go index e45dbce..3953777 100644 --- a/cmd/dexcon-simulation/main.go +++ b/cmd/dexcon-simulation/main.go @@ -20,6 +20,7 @@ package main import ( "flag" "fmt" + "io" "log" "math/rand" "net/http" @@ -69,6 +70,15 @@ func main() { defer pprof.StopCPUProfile() } + if *logfile != "" { + f, err := os.Create(*logfile) + if err != nil { + log.Fatal("could not create log file: ", err) + } + mw := io.MultiWriter(os.Stdout, f) + log.SetOutput(mw) + } + cfg, err := config.Read(*configFile) if err != nil { panic(err) |