Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class ClassGCTest extends AbstractProfilerTest {
@Override
protected String getProfilerCommand() {
return "cpu=1ms,wall=1ms,filter=0,memory=524288:L,cstack=fp";
return "cpu=1ms,wall=1ms,filter=0,memory=524288:L";
}

private static final String CLASS_NAME = "code.Worker";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junitpioneer.jupiter.RetryingTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.TestTemplate;

public class CpuDumpSmokeTest extends JfrDumpTest {
import com.datadoghq.profiler.junit.CStack;
import com.datadoghq.profiler.junit.RetryTest;

public class CpuDumpSmokeTest extends JfrDumpTest {
public CpuDumpSmokeTest(@CStack String cstack) {
super(cstack);
}
@Override
protected String getProfilerCommand() {
return "cpu=1ms,cstack=fp";
return "cpu=1ms";
}

@RetryingTest(3)
@RetryTest(3)
@Timeout(value = 60)
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "vmx", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
runTest("datadog.ExecutionSample");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.datadoghq.profiler.jfr;

import com.datadoghq.profiler.AbstractProfilerTest;
import com.datadoghq.profiler.CStackAwareAbstractProfilerTest;
import com.datadoghq.profiler.junit.RetryTest;
import com.datadoghq.profiler.junit.CStack;
import com.datadoghq.profiler.Platform;

import java.io.File;
Expand All @@ -9,7 +11,10 @@

import org.junit.jupiter.api.Assumptions;

public abstract class JfrDumpTest extends AbstractProfilerTest {
public abstract class JfrDumpTest extends CStackAwareAbstractProfilerTest {
public JfrDumpTest(@CStack String cstack) {
super(cstack);
}

public void runTest(String eventName) throws Exception {
runTest(eventName, "method1", "method2", "method3");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@

import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.TestTemplate;

import org.junitpioneer.jupiter.RetryingTest;
import com.datadoghq.profiler.junit.CStack;
import com.datadoghq.profiler.junit.RetryTest;

public class ObjectSampleDumpSmokeTest extends JfrDumpTest {
public ObjectSampleDumpSmokeTest(@CStack String cstack) {
super(cstack);
}

@Override
protected boolean isPlatformSupported() {
return !Platform.isJavaVersion(8) && !Platform.isJ9();
Expand All @@ -18,9 +25,11 @@ protected String getProfilerCommand() {
return "memory=32:a";
}

@RetryingTest(5)
@RetryTest(5)
@Timeout(value = 300)
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "vmx", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
runTest("datadog.ObjectSample", 3, "method3");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
package com.datadoghq.profiler.jfr;

import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.jupiter.api.TestTemplate;

import org.junitpioneer.jupiter.RetryingTest;
import com.datadoghq.profiler.junit.CStack;
import com.datadoghq.profiler.junit.RetryTest;

public class WallclockDumpSmokeTest extends JfrDumpTest {
public WallclockDumpSmokeTest(@CStack String cstack) {
super(cstack);
}

@Override
protected String getProfilerCommand() {
return "wall=5ms";
}

@RetryingTest(3)
@RetryTest(3)
@Timeout(value = 60)
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "vmx", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
registerCurrentThreadForWallClockProfiling();
runTest("datadog.MethodSample");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class GCGenerationsTest extends AbstractProfilerTest {
@Override
protected String getProfilerCommand() {
return "memory=128,generations=true,cstack=fp";
return "memory=128,generations=true";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class MemleakProfilerTest extends AbstractProfilerTest {
@Override
protected String getProfilerCommand() {
return "memory=524288:L:0.5,cstack=fp";
return "memory=524288:L:0.5";
}

@Override
Expand Down
Loading