X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/dc11daf3b5d1c2e93f534ee3a47f8a83bcd3796d..f9cbdcb1a67e8903c976e588bbf24f0fe6bf2fac:/tests/unit/sort.tcl diff --git a/tests/unit/sort.tcl b/tests/unit/sort.tcl index 41558522..3a4c855f 100644 --- a/tests/unit/sort.tcl +++ b/tests/unit/sort.tcl @@ -144,8 +144,10 @@ start_server { set sorted [r sort tosort BY weight_* LIMIT 0 10] } set elapsed [expr [clock clicks -milliseconds]-$start] - puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " - flush stdout + if {$::verbose} { + puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " + flush stdout + } } test "SORT speed, $num element list BY hash field, 100 times" { @@ -154,8 +156,10 @@ start_server { set sorted [r sort tosort BY wobj_*->weight LIMIT 0 10] } set elapsed [expr [clock clicks -milliseconds]-$start] - puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " - flush stdout + if {$::verbose} { + puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " + flush stdout + } } test "SORT speed, $num element list directly, 100 times" { @@ -164,8 +168,10 @@ start_server { set sorted [r sort tosort LIMIT 0 10] } set elapsed [expr [clock clicks -milliseconds]-$start] - puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " - flush stdout + if {$::verbose} { + puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " + flush stdout + } } test "SORT speed, $num element list BY , 100 times" { @@ -174,8 +180,10 @@ start_server { set sorted [r sort tosort BY nokey LIMIT 0 10] } set elapsed [expr [clock clicks -milliseconds]-$start] - puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " - flush stdout + if {$::verbose} { + puts -nonewline "\n Average time to sort: [expr double($elapsed)/100] milliseconds " + flush stdout + } } } }