Fixed benchmark and compared unstable to this branch
This commit is contained in:
parent
f6e7d4b741
commit
243d767aaa
|
@ -6,8 +6,6 @@ import (
|
|||
"testing"
|
||||
|
||||
wire "github.com/tendermint/go-wire"
|
||||
eyesApp "github.com/tendermint/merkleeyes/app"
|
||||
eyes "github.com/tendermint/merkleeyes/client"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
|
||||
|
@ -20,6 +18,7 @@ import (
|
|||
"github.com/tendermint/basecoin/modules/nonce"
|
||||
"github.com/tendermint/basecoin/modules/roles"
|
||||
"github.com/tendermint/basecoin/stack"
|
||||
"github.com/tendermint/basecoin/state/merkle"
|
||||
)
|
||||
|
||||
type BenchApp struct {
|
||||
|
@ -56,18 +55,18 @@ func NewBenchApp(h basecoin.Handler, chainID string, n int,
|
|||
// logger = log.NewTracingLogger(logger)
|
||||
|
||||
// TODO: disk writing
|
||||
var eyesCli *eyes.Client
|
||||
var store *merkle.Store
|
||||
|
||||
if persist {
|
||||
tmpDir, _ := ioutil.TempDir("", "bc-app-benchmark")
|
||||
eyesCli = eyes.NewLocalClient(tmpDir, 500)
|
||||
store = merkle.NewStore(tmpDir, 500, logger)
|
||||
} else {
|
||||
eyesCli = eyes.NewLocalClient("", 0)
|
||||
store = merkle.NewStore("", 0, logger)
|
||||
}
|
||||
eyesApp.SetLogger(logger.With("module", "merkle"))
|
||||
|
||||
app := app.NewBasecoin(
|
||||
h,
|
||||
eyesCli,
|
||||
store,
|
||||
logger.With("module", "app"),
|
||||
)
|
||||
res := app.SetOption("base/chain_id", chainID)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
BenchmarkMakeTx-4 2000 648379 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-nofee-memdb-4 5000 356487 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-fee-memdb-4 5000 413435 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-nofee-memdb-4 5000 321859 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-fee-memdb-4 5000 393578 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-nofee-memdb-4 5000 379129 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-fee-memdb-4 3000 480334 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-nofee-memdb-4 5000 384398 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-fee-memdb-4 3000 443481 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-nofee-persist-4 3000 498460 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-fee-persist-4 3000 559034 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-nofee-persist-4 5000 314090 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-fee-persist-4 5000 397457 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-nofee-persist-4 2000 845872 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-fee-persist-4 2000 929205 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-nofee-persist-4 5000 596601 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-fee-persist-4 5000 667093 ns/op
|
||||
PASS
|
||||
ok github.com/tendermint/basecoin/benchmarks 97.097s
|
|
@ -0,0 +1,19 @@
|
|||
BenchmarkMakeTx-4 2000 660064 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-nofee-memdb-4 5000 338378 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-fee-memdb-4 5000 380171 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-nofee-memdb-4 5000 306365 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-fee-memdb-4 5000 359344 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-nofee-memdb-4 5000 366057 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-fee-memdb-4 3000 433549 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-nofee-memdb-4 5000 351662 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-fee-memdb-4 3000 421573 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-nofee-persist-4 3000 479848 ns/op
|
||||
BenchmarkSimpleTransfer/100-10-fee-persist-4 3000 544164 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-nofee-persist-4 5000 327999 ns/op
|
||||
BenchmarkSimpleTransfer/100-200-fee-persist-4 5000 385751 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-nofee-persist-4 2000 852128 ns/op
|
||||
BenchmarkSimpleTransfer/10000-10-fee-persist-4 2000 1055130 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-nofee-persist-4 5000 642872 ns/op
|
||||
BenchmarkSimpleTransfer/10000-200-fee-persist-4 3000 686337 ns/op
|
||||
PASS
|
||||
ok github.com/tendermint/basecoin/benchmarks 91.717s
|
Loading…
Reference in New Issue