X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/85bc9b06b747939dcf4151a9a820957d2b37168b..6255a5ae668a0aaf13d73f051face138cfbd78a4:/utils/speed-regression.tcl?ds=inline diff --git a/utils/speed-regression.tcl b/utils/speed-regression.tcl index af8dd31d..86a7d8d8 100755 --- a/utils/speed-regression.tcl +++ b/utils/speed-regression.tcl @@ -4,6 +4,9 @@ source ../tests/support/redis.tcl set ::port 12123 +set ::tests {PING,SET,GET,INCR,LPUSH,LPOP,SADD,SPOP,LRANGE_100,LRANGE_600,MSET} +set ::datasize 16 +set ::requests 100000 proc run-tests branches { set runs {} @@ -35,7 +38,7 @@ proc run-tests branches { puts " redis INFO shows version: [lindex [split $i] 0]" $r close - set output [exec /tmp/redis-benchmark -n 100000 --csv -p $::port] + set output [exec /tmp/redis-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port] lappend runs $b $output puts " killing server..." catch {exec kill -9 [lindex $pids 0]} @@ -86,6 +89,8 @@ proc main {} { slowset 2.2.0 2.4.0 unstable slowset } set results [run-tests $branches] + puts "\n" + puts "# Test results: datasize=$::datasize requests=$::requests" puts [combine-results $results] } @@ -103,4 +108,23 @@ if {!$is_not_running} { exit 1 } +# parse arguments +for {set j 0} {$j < [llength $argv]} {incr j} { + set opt [lindex $argv $j] + set arg [lindex $argv [expr $j+1]] + if {$opt eq {--tests}} { + set ::tests $arg + incr j + } elseif {$opt eq {--datasize}} { + set ::datasize $arg + incr j + } elseif {$opt eq {--requests}} { + set ::requests $arg + incr j + } else { + puts "Wrong argument: $opt" + exit 1 + } +} + main