You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by hu...@apache.org on 2022/06/26 12:51:00 UTC
[incubator-kvrocks] branch unstable updated: Fix get rocksdb ops tcl test case (#668)
This is an automated email from the ASF dual-hosted git repository.
hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new ecf95c9 Fix get rocksdb ops tcl test case (#668)
ecf95c9 is described below
commit ecf95c992bced0bbe5e6827eb873809c3947e205
Author: Myth <ca...@outlook.com>
AuthorDate: Sun Jun 26 20:50:54 2022 +0800
Fix get rocksdb ops tcl test case (#668)
---
tests/tcl/tests/unit/command.tcl | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/tests/tcl/tests/unit/command.tcl b/tests/tcl/tests/unit/command.tcl
index 4650aeb..d6aba67 100644
--- a/tests/tcl/tests/unit/command.tcl
+++ b/tests/tcl/tests/unit/command.tcl
@@ -43,26 +43,24 @@ start_server {tags {"command"}} {
}
test {get rocksdb ops by COMMAND INFO} {
- # Write data for 5 seconds to ensure accurate and stable QPS.
- for {set i 0} {$i < 25} {incr i} {
- for {set j 0} {$j < 100} {incr j} {
+ for {set i 0} {$i < 2} {incr i} {
+ for {set j 0} {$j < 500} {incr j} {
r lpush key$i value$i
r lrange key$i 0 1
}
- after 200
+ after 1000
}
- set cmd_qps [s instantaneous_ops_per_sec]
+
set put_qps [s put_per_sec]
set get_qps [s get_per_sec]
set seek_qps [s seek_per_sec]
set next_qps [s next_per_sec]
- # Based on the encoding of list, we can calculate the relationship
- # between Rocksdb QPS and Command QPS.
- assert {[expr abs($cmd_qps - $put_qps)] < 10}
- assert {[expr abs($cmd_qps - $get_qps)] < 10}
- assert {[expr abs($cmd_qps/2 - $seek_qps)] < 10}
+
+ assert {$put_qps > 0}
+ assert {$get_qps > 0}
+ assert {$seek_qps > 0}
# prev_per_sec is almost the same as next_per_sec
- assert {[expr abs($cmd_qps - $next_qps)] < 10}
+ assert {$next_qps > 0}
}
test {get bgsave information from INFO command} {