mix load_test (double_entry_ledger v0.4.0)
View SourceMix task for running performance load tests on the Double Entry Ledger system.
This task executes a series of load tests to evaluate the system's performance
under concurrent transaction processing. It's designed specifically for performance
testing and requires the :perf environment to ensure isolation from development
or production databases.
Setup
The task automatically:
- Drops any existing database to ensure a clean state
- Creates a new database
- Runs migrations to set up the schema
- Starts the application
Usage
MIX_ENV=perf mix load_test [concurrency]
Options
concurrency- Optional integer specifying the number of concurrent processes to use in the load test (default: 1)seconds- optional float specifying the duration of the load test in seconds (default: 10)
Examples
Run with default concurrency: MIX_ENV=perf mix load_test
Run with specified concurrency: MIX_ENV=perf mix load_test 10
Run with specified concurrency: MIX_ENV=perf mix load_test 10 0.5
Requirements
This task depends on the DoubleEntryLedger.LoadTesting module, which must be
defined and implement a run_load_test/1 function that accepts a concurrency level
Summary
Functions
Callback implementation for Mix.Task.run/1.
Functions
Callback implementation for Mix.Task.run/1.