benchmark: respect stm isolation mode flag

release-3.0
Anthony Romano 2016-05-31 00:37:54 -07:00
parent 7709cd84bb
commit bb2a3ea8d8
1 changed files with 2 additions and 3 deletions

View File

@ -78,7 +78,7 @@ func stmFunc(cmd *cobra.Command, args []string) {
switch stmIsolation {
case "r":
mkSTM = v3sync.NewSTMRepeatable
case "l":
case "s":
mkSTM = v3sync.NewSTMSerializable
default:
fmt.Fprintln(os.Stderr, cmd.Usage())
@ -141,8 +141,7 @@ func doSTM(ctx context.Context, client *v3.Client, requests <-chan stmApply) {
for applyf := range requests {
st := time.Now()
_, err := v3sync.NewSTMRepeatable(context.TODO(), client, applyf)
_, err := mkSTM(context.TODO(), client, applyf)
var errStr string
if err != nil {
errStr = err.Error()