complement/cmd/perftest
kegsay 765746a8f8
Move /internal/b to /b (#659)
The API is unchanged and is suitable to be made public.
2023-10-04 16:15:25 +01:00
..
main.go Support normal complement env vars in homerunner/perftest 2022-03-04 12:40:13 +00:00
README.md Add perfgraph/perftest (#329) 2022-03-03 15:52:34 +00:00
snapshot.go Add perfgraph/perftest (#329) 2022-03-03 15:52:34 +00:00
test.go Move /internal/b to /b (#659) 2023-10-04 16:15:25 +01:00

Performance Test

go build ./cmd/perftest
./perftest -seed 12345 -image complement-synapse:latest -output synapse.json -name 'synapse 1.54'

This contains a binary which can run a series of tests on a homeserver implementation and uses docker stats to compare:

  • CPU usage
  • Memory usage
  • Network I/O
  • Block I/O

when performing these tests. Currently only 1 test is provided which:

  • Registers N users. Does not snapshot anything as cpu/memory/disk/time is intentionally high for things like bcrypt.
  • Creates M rooms concurrently. Tests how fast room creation is.
  • Joins X users to Y rooms according to a normal distribution. Tests how fast room joins are.
  • Sends messages randomly into these rooms. Tests how fast message sending is.
  • Syncs all users. Tests how fast initial syncs can be.
  • Changes the display name of all users.
  • Does an incremental sync on all users. Tests how fast notifier code is.

This is designed to simulate a small local-only homeserver with a few large rooms with lots of users and a few small rooms. The seed can be fixed to ensure deterministic results.