Skip to content

Instantly share code, notes, and snippets.

@jm-g
Last active June 4, 2019 20:12
Show Gist options
  • Save jm-g/c91823d8c4c4045728f63a8d2ba128cd to your computer and use it in GitHub Desktop.
Save jm-g/c91823d8c4c4045728f63a8d2ba128cd to your computer and use it in GitHub Desktop.
reproduce a memory leak with sbt reload
#!/usr/bin/expect -f
#exp_internal 1
log_file sbt.log
spawn sbt -no-global -J-Xmx200m -J-Xms200m -J-XX:+ExitOnOutOfMemoryError -Dsbt.version=1.3.0-RC1
# send_log $start
for {set NUM 0} {$NUM <= 200} {incr NUM} {
expect "> "
send "reload\n"
set date [exec date]
send_log -- $date
}
expect "> "
send "exit\n"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment