prepare_profiling
Generates a JVM parameter to add to a Java startup command for profiling CPU, JDBC, JPA, HTTP, and more. Recording saves automatically; use check_status to access data.
Instructions
Prepare a profiling session by retrieving a JVM parameter to be added to a Java process call to record performance data with stack traces for the following subsystems: cpu, jdbc, jpa, http_server, http_client, mongo_db. The result is a JSON object containing a 'jvmParameter' to be added (quoted) to the Java process at startup. Add it verbatim and do not create or modify any files; the configuration is already set up for you. Run the Java process; the recording is saved automatically when the JVM terminates (or after the optional maximum duration). Then call check_status to access the data - do not load the saved snapshot file yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delay | No | An optional recording delay in seconds measured from the jvm start. | |
| maximumDuration | No | An optional maximum recording duration in seconds. If not specified, data will be saved at JVM termination or when check_status is called with 'stopRecording: true'. |