High-latency DB testing stuff (#22282)

This commit is contained in:
Pieter-Jan Briers
2023-12-10 16:30:12 +01:00
committed by GitHub
parent b457ce779a
commit 46e36934a6
6 changed files with 85 additions and 25 deletions

View File

@@ -540,6 +540,16 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<int> DatabasePgConcurrency =
CVarDef.Create("database.pg_concurrency", 8, CVar.SERVERONLY);
/// <summary>
/// Milliseconds to asynchronously delay all PostgreSQL database operations with.
/// </summary>
/// <remarks>
/// This is intended for performance testing. It works different from <see cref="DatabaseSqliteDelay"/>,
/// as the lag is applied after acquiring the database lock.
/// </remarks>
public static readonly CVarDef<int> DatabasePgFakeLag =
CVarDef.Create("database.pg_fake_lag", 0, CVar.SERVERONLY);
// Basically only exists for integration tests to avoid race conditions.
public static readonly CVarDef<bool> DatabaseSynchronous =
CVarDef.Create("database.sync", false, CVar.SERVERONLY);