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 4, 2024
1 parent d1c2efd commit 1176604
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/qwatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,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"

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

b.ResetTimer()

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

// b.ResetTimer()

// 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 1176604

Please sign in to comment.