Skip to content

Conversation

@bbotella
Copy link
Contributor

This is a follow up PR on top of
#4255


public interface AsyncProfilerMBean
{
void start(String event, String outputFormat, int timeout, String outputPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

timeout - duration probably a better name for the parameter + a time unit as a a suffix would be helpful

outputPath - using a path is too dangerous from security point of view, a path to a data file or another file can be specified to cause a DoS (explicitly or using tricks like ../../.., so it is better to allow only a file name with explictly defined set of symbols to use (allowlist is safer than an denylist)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it at timeout, as it is what the actual async profiler is using.

For the outputPath, that makes sense. Changing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding timeout - yes, I mixed it up with -d option and what one is asprof option only.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that "duration" is better terminology here. I did it like that.

@bbotella bbotella force-pushed the CASSSIDECAR-254-takeover branch 2 times, most recently from 52edd69 to 52c1ed0 Compare November 26, 2025 17:02
Add enable/disable AsyncProfiler JVM flags

Refactor

Add output format option & initial tests

Refactor & add tests

Add tests for system properties & refactor

Checkstyle fixes & switching airlift with picocli (CASSANDRA-17445)

Add more tests

Fix Picocli 'Profile' command integration

Address feedback

Changes.txt

Remove not needed property

Add missing licenses

Apply feedback

Fix help tests

refactoring
fix commands
hardened validation and simplification of commands
fix log dir
fixed tests

more fixes

add purge command

more hardening

implement list and fetch

Remove unused import

more fixes

added documentation
fixed nodetool help output tests
added status command
introduced binary download of files in fetch command if necessary
hardened code
ability to specify duration in human format (e.g. 5m)
improved error parsing
ability to execute purge, list and fetch even with disabled profiler
async-profiler is disabled by default
added nodetool tests
add startup check checking kernel parameters
@bbotella bbotella force-pushed the CASSSIDECAR-254-takeover branch from 98683de to 073febe Compare December 1, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants