benchmark.tcl 541 B

12345678910111213141516171819
  1. proc redisbenchmark_tls_config {testsdir} {
  2. set tlsdir [file join $testsdir tls]
  3. set cert [file join $tlsdir client.crt]
  4. set key [file join $tlsdir client.key]
  5. set cacert [file join $tlsdir ca.crt]
  6. if {$::tls} {
  7. return [list --tls --cert $cert --key $key --cacert $cacert]
  8. } else {
  9. return {}
  10. }
  11. }
  12. proc redisbenchmark {host port {opts {}}} {
  13. set cmd [list src/redis-benchmark -h $host -p $port]
  14. lappend cmd {*}[redisbenchmark_tls_config "tests"]
  15. lappend cmd {*}$opts
  16. return $cmd
  17. }