-
Create a
teams.csv
file with the teams you will connect to. The goal is to have 1000 connections, so I used 100 teams and anxoxp
token for each team. Then in the code there is afor
loop that makes 10 connections per team. You can adjust that factor according to your goals. Useteams.csv.sample
as a template. -
npm install
node index.js
.
You will start to see log statements about connections being connected and disconnected. Once the
connections seem stable (no more log statements for ~10 seconds) make sure at least one GC occurs
(a log statement that says stats received
), and then toggle your connection state. That means if
you started the test with your network connection on, turn it off, and vice versa.
The results will be written to a timestamped csv file beginning with memstats-
. The most
interesting column in this file will be estimated_base
. You can visualize the results in a
spreadsheet.
Note that each of the stats received
log statements correspond to one row in the results file. In
order to interpret when certain network connection changes occurred, you can count the number of
those messages before each toggle and then find them in the results. The last two columns,
clients_connected
and clients_reconnecting
, tell you how many of the connections were either
connected or disconnected, respectively.
I did at some point run this in a container but then I realized I didn't need to, so I stopped looking at it. It may or may not work, so don't trust it.