evennia.server.profiling.dummyrunner¶
Dummy client runner
This module implements a stand-alone launcher for stress-testing an Evennia game. It will launch any number of fake clients. These clients will log into the server and start doing random operations. Customizing and weighing these operations differently depends on which type of game is tested. The module contains a testing module for plain Evennia.
Please note that you shouldn’t run this on a production server! Launch the program without any arguments or options to see a full step-by-step setup help.
Basically (for testing default Evennia):
Use an empty/testing database.
set PERMISSION_ACCOUNT_DEFAULT = “Builder”
start server, eventually with profiling active
launch this client runner
If you want to customize the runner’s client actions (because you changed the cmdset or needs to better match your use cases or add more actions), you can change which actions by adding a path to
DUMMYRUNNER_ACTIONS_MODULE = <path.to.your.module>
in your settings. See utils.dummyrunner_actions.py for instructions on how to define this module.
-
evennia.server.profiling.dummyrunner.
idcounter
()[source]¶ Makes unique ids.
- Returns
count (int) – A globally unique counter.
-
evennia.server.profiling.dummyrunner.
gidcounter
()[source]¶ Makes globally unique ids.
- Returns
count (int); A globally unique counter.
-
evennia.server.profiling.dummyrunner.
makeiter
(obj)[source]¶ Makes everything iterable.
- Parameters
obj (any) – Object to turn iterable.
- Returns
iterable (iterable) – An iterable object.
-
class
evennia.server.profiling.dummyrunner.
DummyClient
[source]¶ Bases:
twisted.conch.telnet.StatefulTelnetProtocol
Handles connection to a running Evennia server, mimicking a real account by sending commands on a timer.
-
dataReceived
(data)[source]¶ Called when data comes in over the protocol. We wait to start stepping until the server actually responds
- Parameters
data (str) – Incoming data.
-
connectionLost
(reason)[source]¶ Called when loosing the connection.
- Parameters
reason (str) – Reason for loosing connection.
-
-
class
evennia.server.profiling.dummyrunner.
DummyFactory
(actions)[source]¶ Bases:
twisted.internet.protocol.ClientFactory
-
protocol
¶ alias of
DummyClient
-