From d0f4f2ef73bcf40396022d3a73c36ddb156c0390 Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Wed, 9 Aug 2017 15:25:40 -0700 Subject: [PATCH] added geoadd test for compare --- cmd/tile38-benchmark/main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cmd/tile38-benchmark/main.go b/cmd/tile38-benchmark/main.go index 81637a94..225f9f7c 100644 --- a/cmd/tile38-benchmark/main.go +++ b/cmd/tile38-benchmark/main.go @@ -177,6 +177,23 @@ func main() { return redbench.AppendCommand(buf, "PING") }, ) + case "GEOADD": + //GEOADD key longitude latitude member + if redis { + var i int64 + redbench.Bench("GEOADD", addr, fillOpts(), prepFn, + func(buf []byte) []byte { + i := atomic.AddInt64(&i, 1) + lat, lon := randPoint() + return redbench.AppendCommand(buf, "GEOADD", "key:bench", + strconv.FormatFloat(lat, 'f', 5, 64), + strconv.FormatFloat(lon, 'f', 5, 64), + "id:"+strconv.FormatInt(i, 10), + ) + }, + ) + } + case "SET", "SET-POINT", "SET-RECT", "SET-STRING": if redis { redbench.Bench("SET", addr, fillOpts(), prepFn,