Skip to content

Commit 376c5e3

Browse files
denesbmmatczuk
authored andcommitted
Kill scylla-bench on the second CTRL+C
Currently, on CTRL+C, scylla-bench will flip a stop flag and then will wait for all ongoing request to finish, while not sending any new ones, before stopping. In some cases the user might wish to not stop the measurement gracefully, instead they want scylla-bench to stop immediately. To support this use-case, when the user sends a second interrupt (CTRL+C) stop the process immediately. Fixes #21
1 parent e27d33b commit 376c5e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ func main() {
380380
<-interrupted
381381
fmt.Println("\ninterrupted")
382382
atomic.StoreUint32(&stopAll, 1)
383+
384+
<-interrupted
385+
fmt.Println("\nkilled")
386+
os.Exit(1)
383387
}()
384388

385389
if testDuration > 0 {

0 commit comments

Comments
 (0)