Skip to content

Commit

Permalink
Pick a less CPU intensive scenario + increase tests timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnas authored and gleocadie committed Nov 30, 2024
1 parent 0070285 commit 55f4cfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AllocationsProfilerTest
{
private const string ScenarioGenerics = "--scenario 9";
private const string ScenarioMeasureAllocation = "--scenario 16";
private const string ScenarioWithoutGC = "--scenario 25 --threads 2 --param 1000";
private const string ScenarioWithoutGC = "--scenario 6 --threads 1";

private readonly ITestOutputHelper _output;

Expand Down Expand Up @@ -130,6 +130,8 @@ public void MeasureAllocations(string appName, string framework, string appAssem
public void ShouldGetAllocationSamplesViaEtw(string appName, string framework, string appAssembly)
{
var runner = new TestApplicationRunner(appName, framework, appAssembly, _output, commandLine: ScenarioWithoutGC);
// allow agent proxy to send the recorded events
runner.TestDurationInSeconds = 30;

EnvironmentHelper.DisableDefaultProfilers(runner);
runner.Environment.SetVariable(EnvironmentVariables.AllocationProfilerEnabled, "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Datadog.Profiler.IntegrationTests.Contention
public class ContentionProfilerTest
{
private const string ScenarioContention = "--scenario 10 --threads 20";
private const string ScenarioWithoutContention = "--scenario 25 --threads 2 --param 1000";
private const string ScenarioWithoutContention = "--scenario 6 --threads 1";

private readonly ITestOutputHelper _output;

Expand Down Expand Up @@ -90,6 +90,8 @@ public void ExplicitlyDisableContentionProfiler(string appName, string framework
public void ShouldGetLockContentionSamplesViaEtw(string appName, string framework, string appAssembly)
{
var runner = new TestApplicationRunner(appName, framework, appAssembly, _output, commandLine: ScenarioWithoutContention);
// allow agent proxy to send the recorded events
runner.TestDurationInSeconds = 30;

EnvironmentHelper.DisableDefaultProfilers(runner);
runner.Environment.SetVariable(EnvironmentVariables.ContentionProfilerEnabled, "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Datadog.Profiler.IntegrationTests.GarbageCollections
public class GarbageCollectionsProfilerTest
{
private const string ScenarioGenerics = "--scenario 12";
private const string ScenarioWithoutGC = "--scenario 25 --threads 2 --param 1000";
private const string ScenarioWithoutGC = "--scenario 6 --threads 1";
private const string GcRootFrame = "|lm: |ns: |ct: |cg: |fn:Garbage Collector |fg: |sg:";

private readonly ITestOutputHelper _output;
Expand Down Expand Up @@ -62,6 +62,8 @@ public void ShouldGetGarbageCollectionSamplesByDefault(string appName, string fr
public void ShouldGetGarbageCollectionSamplesViaEtw(string appName, string framework, string appAssembly)
{
var runner = new TestApplicationRunner(appName, framework, appAssembly, _output, commandLine: ScenarioWithoutGC);
// allow agent proxy to send the recorded events
runner.TestDurationInSeconds = 30;

// disable default profilers except GC
runner.Environment.SetVariable(EnvironmentVariables.WallTimeProfilerEnabled, "0");
Expand Down

0 comments on commit 55f4cfd

Please sign in to comment.