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 @@ -100,6 +100,7 @@ public void sendData(AsyncProfilerTask task, File dumpFile) throws IOException,
GRPC_UPSTREAM_TIMEOUT, TimeUnit.SECONDS
).collect(new ClientResponseObserver<AsyncProfilerData, AsyncProfilerCollectionResponse>() {
ClientCallStreamObserver<AsyncProfilerData> requestStream;
final byte[] buf = new byte[DATA_CHUNK_SIZE];

@Override
public void beforeStart(ClientCallStreamObserver<AsyncProfilerData> requestStream) {
Expand All @@ -111,7 +112,6 @@ public void onNext(AsyncProfilerCollectionResponse value) {
if (AsyncProfilingStatus.TERMINATED_BY_OVERSIZE.equals(value.getType())) {
LOGGER.warn("JFR is too large to be received by the oap server");
} else {
byte[] buf = new byte[DATA_CHUNK_SIZE];
try {
int bytesRead;
while ((bytesRead = fileInputStream.read(buf)) != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ public static class AsyncProfiler {

/**
* Max execution time(second) for the Async Profiler. The task will be stopped even if a longer time is specified.
* default 10min.
* default 20min.
*/
public static int MAX_DURATION = 600;
public static int MAX_DURATION = 1200;

/**
* Path for the JFR outputs from the Async Profiler.
Expand Down
4 changes: 2 additions & 2 deletions apm-sniffer/config/agent.config
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ profile.dump_max_stack_depth=${SW_AGENT_PROFILE_DUMP_MAX_STACK_DEPTH:500}
profile.snapshot_transport_buffer_size=${SW_AGENT_PROFILE_SNAPSHOT_TRANSPORT_BUFFER_SIZE:4500}
# If true, async profiler will be enabled when user creates a new async profiler task. If false, it will be disabled. The default value is true.
asyncprofiler.active=${SW_AGENT_ASYNC_PROFILER_ACTIVE:true}
# Max execution time(second) for the Async Profiler. The task will be stopped even if a longer time is specified. default 10min.
asyncprofiler.max_duration=${SW_AGENT_ASYNC_PROFILER_MAX_DURATION:600}
# Max execution time(second) for the Async Profiler. The task will be stopped even if a longer time is specified. default 20min.
asyncprofiler.max_duration=${SW_AGENT_ASYNC_PROFILER_MAX_DURATION:1200}
# Path for the JFR outputs from the Async Profiler. If the parameter is not empty, the file will be created in the specified directory, otherwise the Files.createTemp method will be used to create the file.
asyncprofiler.output_path=${SW_AGENT_ASYNC_PROFILER_OUTPUT_PATH:}
# If true, the agent collects and reports metrics to the backend.
Expand Down
Loading