Skip to content
This repository has been archived by the owner on Jul 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #56 from tendermint/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
melekes committed Oct 6, 2017
2 parents f3c02f5 + f927f0a commit 4793120
Show file tree
Hide file tree
Showing 20 changed files with 303 additions and 305 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*/vendor
*/.glide
.terraform
terraform.tfstate
terraform.tfstate.backup
terraform.tfstate.d

terraform.tfstate.d
2 changes: 1 addition & 1 deletion tm-bench/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.5
FROM alpine:3.6

WORKDIR /app
COPY tm-bench /app/tm-bench
Expand Down
2 changes: 1 addition & 1 deletion tm-bench/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ COPY Makefile /go/src/github.com/tendermint/tools/tm-bench/
COPY glide.yaml /go/src/github.com/tendermint/tools/tm-bench/
COPY glide.lock /go/src/github.com/tendermint/tools/tm-bench/

RUN make get_deps
RUN make get_vendor_deps

COPY . /go/src/github.com/tendermint/tools/tm-bench
4 changes: 2 additions & 2 deletions tm-bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GOTOOLS = \
tools:
go get -v $(GOTOOLS)

get_deps: tools
get_vendor_deps: tools
glide install

build:
Expand Down Expand Up @@ -44,4 +44,4 @@ clean:
rm -f ./tm-bench
rm -rf ./dist

.PHONY: tools get_deps build install test build-all dist clean build-docker
.PHONY: tools get_vendor_deps build install test build-all dist clean build-docker
136 changes: 61 additions & 75 deletions tm-bench/glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions tm-bench/glide.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
package: github.com/tendermint/tools/tm-bench
import:
- package: github.com/go-kit/kit
subpackages:
- log/term
- package: github.com/gorilla/websocket
- package: github.com/pkg/errors
- package: github.com/tendermint/go-rpc
version: develop
- package: github.com/rcrowley/go-metrics
- package: github.com/tendermint/tendermint
version: v0.11.0
subpackages:
- client
- rpc/lib/types
- types
- package: github.com/tendermint/tmlibs
subpackages:
- log
- package: github.com/tendermint/tools
version: develop
version: 9708c66576d3e7d4fd0a5cdec7d951f1ef002efc
subpackages:
- tm-monitor/monitor
- package: github.com/go-kit/kit
subpackages:
- log
- term
9 changes: 5 additions & 4 deletions tm-bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import (
"text/tabwriter"
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/term"
metrics "github.com/rcrowley/go-metrics"

tmtypes "github.com/tendermint/tendermint/types"
"github.com/tendermint/tmlibs/log"
"github.com/tendermint/tools/tm-monitor/monitor"
)

var version = "0.1.0"
var version = "0.2.0"

var logger = log.NewNopLogger()

Expand Down Expand Up @@ -63,7 +64,7 @@ Examples:
}
return term.FgBgColor{}
}
logger = term.NewLogger(os.Stdout, log.NewLogfmtLogger, colorFn)
logger = log.NewTMLoggerWithColorFn(log.NewSyncWriter(os.Stdout), colorFn)
}

fmt.Printf("Running %ds test @ %s\n", duration, flag.Arg(0))
Expand Down Expand Up @@ -123,7 +124,7 @@ func startNodes(endpoints []string, blockCh chan<- tmtypes.Header, blockLatencyC

for i, e := range endpoints {
n := monitor.NewNode(e)
n.SetLogger(log.With(logger, "node", e))
n.SetLogger(logger.With("node", e))
n.SendBlocksTo(blockCh)
n.SendBlockLatenciesTo(blockLatencyCh)
if err := n.Start(); err != nil {
Expand Down
Loading

0 comments on commit 4793120

Please sign in to comment.