docs: enhance benchmark command with business logic validation tests

- Add 2 ETH-based validation tests to benchmark script
- Validates ExecuteBacktest_With_ETH_FifteenMinutes_Data_Should_Return_LightBacktest
- Validates ExecuteBacktest_With_ETH_FifteenMinutes_Data_Second_File_Should_Return_LightBacktest
- Ensures performance optimizations don't break trading logic
- Update command documentation with comprehensive validation details
- All 3 validation levels must pass for benchmark success
This commit is contained in:
2025-11-11 12:32:56 +07:00
parent 578709d9b7
commit fc036bb7de
4 changed files with 65 additions and 33 deletions

View File

@@ -428,16 +428,7 @@ public class TradingBotBase : ITradingBot
}
// Check if we already have a position for this signal (in case it was added but not processed yet)
// Optimized: Avoid LINQ FirstOrDefault overhead
Position existingPosition = null;
foreach (var pos in Positions.Values)
{
if (pos.SignalIdentifier == signal.Identifier)
{
existingPosition = pos;
break;
}
}
var existingPosition = Positions.Values.FirstOrDefault(p => p.SignalIdentifier == signal.Identifier);
if (existingPosition != null)
{

View File

@@ -28,3 +28,4 @@ DateTime,TestName,CandlesCount,ExecutionTimeSeconds,ProcessingRateCandlesPerSec,
2025-11-11T05:25:48Z,ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry,5760,1.87,3069.1,15.26,11.10,24.65,1634.11,3828,33.2,118.83,0.21,0.02,24560.79,38,24.56,6015,46966cc5,dev,development
2025-11-11T05:26:29Z,ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry,5760,1.265,4533.9,15.27,11.26,24.66,1075.57,3828,33.2,89.65,0.14,0.02,24560.79,38,24.56,6015,46966cc5,dev,development
2025-11-11T05:27:07Z,ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry,5760,1.005,5688.8,15.26,10.17,24.66,875.93,3828,33.2,61.25,0.11,0.01,24560.79,38,24.56,6015,61fdcec9,dev,development
2025-11-11T05:31:12Z,ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry,5760,2.175,2637.3,15.26,10.76,25.26,1805.96,3828,33.2,229.60,0.23,0.04,24560.79,38,24.56,6015,578709d9,dev,development
1 DateTime TestName CandlesCount ExecutionTimeSeconds ProcessingRateCandlesPerSec MemoryStartMB MemoryEndMB MemoryPeakMB SignalUpdatesCount SignalUpdatesSkipped SignalUpdateEfficiencyPercent BacktestStepsCount AverageSignalUpdateMs AverageBacktestStepMs FinalPnL WinRatePercent GrowthPercentage Score CommitHash GitBranch Environment
28 2025-11-11T05:25:48Z ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry 5760 1.87 3069.1 15.26 11.10 24.65 1634.11 3828 33.2 118.83 0.21 0.02 24560.79 38 24.56 6015 46966cc5 dev development
29 2025-11-11T05:26:29Z ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry 5760 1.265 4533.9 15.27 11.26 24.66 1075.57 3828 33.2 89.65 0.14 0.02 24560.79 38 24.56 6015 46966cc5 dev development
30 2025-11-11T05:27:07Z ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry 5760 1.005 5688.8 15.26 10.17 24.66 875.93 3828 33.2 61.25 0.11 0.01 24560.79 38 24.56 6015 61fdcec9 dev development
31 2025-11-11T05:31:12Z ExecuteBacktest_With_Large_Dataset_Should_Show_Performance_Telemetry 5760 2.175 2637.3 15.26 10.76 25.26 1805.96 3828 33.2 229.60 0.23 0.04 24560.79 38 24.56 6015 578709d9 dev development