Skip to content

Commit 27e7513

Browse files
committed
Badges.
1 parent 17a0f50 commit 27e7513

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/udhos/goben/blob/master/LICENSE)
2+
[![Go Report Card](https://goreportcard.com/badge/github.com/udhos/goben)](https://goreportcard.com/report/github.com/udhos/goben)
3+
14
# goben
25
goben is a golang tool to measure TCP throughput between hotsts.
36

build.sh

+5-13
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@
22

33
gobin=~/go/bin
44

5-
gofmt -s -w goben/*
6-
go tool fix goben/*
5+
gofmt -s -w goben/*.go
6+
go tool fix goben/*.go
77
go tool vet goben
88

9-
lint() {
10-
local f=$1
11-
[ -x $gobin/gosimple ] && $gobin/gosimple $f
12-
[ -x $gobin/golint ] && $gobin/golint $f
13-
[ -x $gobin/staticcheck ] && $gobin/staticcheck $f
14-
}
15-
16-
lint main.go
17-
lint server.go
18-
lint client.go
19-
lint goben_test.go
9+
[ -x $gobin/gosimple ] && $gobin/gosimple goben/*.go
10+
[ -x $gobin/golint ] && $gobin/golint goben/*.go
11+
[ -x $gobin/staticcheck ] && $gobin/staticcheck goben/*.go
2012

2113
go test github.com/udhos/goben/goben
2214
go install -v github.com/udhos/goben/goben

goben/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func workLoop(label string, f call, bufSize int, reportInterval time.Duration) {
121121
}
122122
}
123123

124-
elapSec := time.Now().Sub(start).Seconds()
124+
elapSec := time.Since(start).Seconds()
125125
mbps := int64(float64(8*size) / (1000000 * elapSec))
126126
cps := int64(float64(countCalls) / elapSec)
127127
log.Printf("average %s rate: %d Mbps %d calls/s", label, mbps, cps)

0 commit comments

Comments
 (0)