Skip to content

Commit

Permalink
commenting out benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-adeshraa committed Sep 6, 2024
1 parent f4aae66 commit 8ed22e9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/qwatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ func TestQWatchWithWhere(t *testing.T) {
}
}()

respParsers := make([]*core.RESPParser, len(subscribers))
respParsers := make([]*clientio.RESPParser, len(subscribers))

// Subscribe to the QWATCH query
for i, subscriber := range subscribers {
Expand Down Expand Up @@ -563,19 +563,19 @@ func TestQWatchWithWhere(t *testing.T) {
}
}

func BenchmarkQwatchCommandSingleQuery(b *testing.B) {
conn := getLocalConnection()
defer conn.Close()
var query = "SELECT $key, $value FROM `benchmark:*` ORDER BY $value desc LIMIT 3"
// func BenchmarkQwatchCommandSingleQuery(b *testing.B) {
// conn := getLocalConnection()
// defer conn.Close()
// var query = "SELECT $key, $value FROM `benchmark:*` ORDER BY $value desc LIMIT 3"

subscriber_conn := getLocalConnection()
respParser := fireCommandAndGetRESPParser(subscriber_conn, fmt.Sprintf("QWATCH \"%s\"", query))
// subscriber_conn := getLocalConnection()
// respParser := fireCommandAndGetRESPParser(subscriber_conn, fmt.Sprintf("QWATCH \"%s\"", query))

b.ResetTimer()
// b.ResetTimer()

for n := 0; n < 1000; n++ {
fireCommand(conn, fmt.Sprintf("SET benchmark:%d %d", n, n))
// Read the last response
respParser.DecodeOne()
}
}
// for n := 0; n < 1000; n++ {
// fireCommand(conn, fmt.Sprintf("SET benchmark:%d %d", n, n))
// // Read the last response
// respParser.DecodeOne()
// }
// }

0 comments on commit 8ed22e9

Please sign in to comment.