From a69725d40d5ceaf2b27c0f5fba8e4e3c47029703 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Thu, 30 Aug 2018 11:47:32 -0700 Subject: [PATCH] Add method to benchmark with commits --- cmd/gaia/app/sim_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/gaia/app/sim_test.go b/cmd/gaia/app/sim_test.go index 6568f124b0..c7452ae533 100644 --- a/cmd/gaia/app/sim_test.go +++ b/cmd/gaia/app/sim_test.go @@ -30,6 +30,7 @@ var ( enabled bool verbose bool usegoleveldb bool + commit bool ) func init() { @@ -39,6 +40,7 @@ func init() { flag.BoolVar(&enabled, "SimulationEnabled", false, "Enable the simulation") flag.BoolVar(&verbose, "SimulationVerbose", false, "Verbose log output") flag.BoolVar(&usegoleveldb, "SimulationGoLevelDB", false, "Use GoLevelDB instead of memdb") + flag.BoolVar(&commit, "SimulationCommit", false, "Have the simulation commit") } func appStateFn(r *rand.Rand, keys []crypto.PrivKey, accs []sdk.AccAddress) json.RawMessage { @@ -137,7 +139,7 @@ func BenchmarkFullGaiaSimulation(b *testing.B) { invariants(app), // these shouldn't get ran 10, 100, - false, + commit, ) } @@ -165,7 +167,7 @@ func TestFullGaiaSimulation(t *testing.T) { invariants(app), numBlocks, blockSize, - false, + commit, ) }