From c5bbd2b3c973091c4ce20db35bab0c1a9ec1f4e9 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 29 Oct 2024 11:49:33 +0700 Subject: [PATCH] manually degrade performance to test new benchmark CI --- src/SIL.Harmony.Tests/DataModelPerformanceTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIL.Harmony.Tests/DataModelPerformanceTests.cs b/src/SIL.Harmony.Tests/DataModelPerformanceTests.cs index b5b4443..6c8d5fa 100644 --- a/src/SIL.Harmony.Tests/DataModelPerformanceTests.cs +++ b/src/SIL.Harmony.Tests/DataModelPerformanceTests.cs @@ -182,7 +182,7 @@ public void Flush() // disable warning about waiting for sync code, benchmarkdotnet does not support async code, and it doesn't deadlock when waiting. #pragma warning disable VSTHRD002 -[SimpleJob(RunStrategy.Throughput, warmupCount: 2)] +[SimpleJob(RunStrategy.Monitoring, warmupCount: 2)] public class DataModelPerformanceBenchmarks { private DataModelTestBase _templateModel = null!; @@ -203,7 +203,7 @@ public void GlobalSetup() [IterationSetup] public void IterationSetup() { - _emptyDataModel = new(alwaysValidate: false, performanceTest: true); + _emptyDataModel = new(alwaysValidate: false, performanceTest: false); _ = _emptyDataModel.WriteNextChange(_emptyDataModel.SetWord(Guid.NewGuid(), "entity1")).Result; _dataModelTestBase = _templateModel.ForkDatabase(false); }