Files
Bubberstation/code/__DEFINES/perf_test.dm
SkyratBot a2d7403cd0 [MIRROR] Adds load testing macros [MDB IGNORE] (#12868)
* Adds load testing macros (#66178)

Adds a macro that consumes cpu up to some tick limit
Adds a define that uses said macro to leave verb processing just its
reserve of the tick
Adds a second subdefine that forces verb processing into total overtime
Mimicing the worst case scenario around maptick spikes

* Adds load testing macros

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-04-18 16:31:34 -07:00

10 lines
295 B
Plaintext

/// Macro that takes a tick usage to target, and proceses until we hit it
/// This lets us simulate generic load as we'd like, to make testing for overtime easier
#define CONSUME_UNTIL(target_usage) \
while(TICK_USAGE < target_usage) {\
var/_knockonwood_x = 0;\
_knockonwood_x += 20;\
}