From 906c8e8f90d7e6c8af082a45f18c9e805b3fa333 Mon Sep 17 00:00:00 2001 From: Shivshankar Date: Fri, 5 Apr 2024 17:50:42 -0400 Subject: [PATCH] delete cluster fail time script (#237) --- utils/cluster_fail_time.tcl | 50 ------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 utils/cluster_fail_time.tcl diff --git a/utils/cluster_fail_time.tcl b/utils/cluster_fail_time.tcl deleted file mode 100644 index 87399495f..000000000 --- a/utils/cluster_fail_time.tcl +++ /dev/null @@ -1,50 +0,0 @@ -# This simple script is used in order to estimate the average PFAIL->FAIL -# state switch after a failure. - -set ::sleep_time 10 ; # How much to sleep to trigger PFAIL. -set ::fail_port 30016 ; # Node to put in sleep. -set ::other_port 30001 ; # Node to use to monitor the flag switch. - -proc avg vector { - set sum 0.0 - foreach x $vector { - set sum [expr {$sum+$x}] - } - expr {$sum/[llength $vector]} -} - -set samples {} -while 1 { - exec redis-cli -p $::fail_port debug sleep $::sleep_time > /dev/null & - - # Wait for fail? to appear. - while 1 { - set output [exec redis-cli -p $::other_port cluster nodes] - if {[string match {*fail\?*} $output]} break - after 100 - } - - puts "FAIL?" - set start [clock milliseconds] - - # Wait for fail? to disappear. - while 1 { - set output [exec redis-cli -p $::other_port cluster nodes] - if {![string match {*fail\?*} $output]} break - after 100 - } - - puts "FAIL" - set now [clock milliseconds] - set elapsed [expr {$now-$start}] - puts $elapsed - lappend samples $elapsed - - puts "AVG([llength $samples]): [avg $samples]" - - # Wait for the instance to be available again. - exec redis-cli -p $::fail_port ping - - # Wait for the fail flag to be cleared. - after 2000 -}