Browse Source

fix helper/bench

pull/262/head
KuiLiao 4 years ago
parent
commit
e871c8a581
  1. 1
      helper/bench/Makefile
  2. 4
      helper/bench/prepare.sh
  3. 2
      helper/bench/svr/http.go

1
helper/bench/Makefile

@ -1,6 +1,7 @@
# All targets.
default: bench
# configure these paths according to you system
bench: /usr/local/bin/go /etc/redis/redis.conf /usr/local/bin/docker-compose main.go
rm -f ../conf.sample.yml
go build -o bench

4
helper/bench/prepare.sh

@ -6,5 +6,5 @@ git clone https://github.com/dtm-labs/dtm.git && cd dtm && git checkout alpha &&
echo 'all prepared. you shoud run following commands to test in different terminal'
echo
echo 'cd dtm && go run bench/main.go redis|boltdb|db'
echo 'cd dtm && bench/run-redis|boltdb|mysql.sh'
echo 'cd dtf && go run helper/bench/main.go redis|boltdb|db'
echo 'cd dtf/helper && bench/run-redis|boltdb|mysql.sh'

2
helper/bench/svr/http.go

@ -96,7 +96,7 @@ func PrepareBenchDB() {
func StartSvr() {
app := dtmutil.GetGinApp()
benchAddRoute(app)
logger.Debugf("bench listening at %d", benchPort)
logger.Infof("bench listening at %s", benchPort)
go func() {
_ = app.Run(fmt.Sprintf(":%s", benchPort))
}()

Loading…
Cancel
Save