You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codeflash will run your program twice (once for profiling, once for argument capture), generate JUnit replay tests, then optimize the most impactful functions.
This generates replay tests in `src/test/java/codeflash/replay/` without running the optimizer.
257
277
258
-
More Options:
259
-
260
-
-`--timeout`: Maximum time (seconds) for each tracing stage.
261
-
-`--max-function-count`: Maximum captures per method (default: 100).
262
-
263
-
<Info>
264
-
**How the Java tracer works:**
265
-
266
-
-**Stage 1 (JFR)**: Runs your program with Java Flight Recorder enabled. JFR is built into the JVM (Java 11+), has ~1% overhead, and doesn't interfere with JIT compilation. This produces accurate method-level CPU profiling data.
278
+
Options:
267
279
268
-
-**Stage 2 (Agent)**: Runs your program with a bytecode instrumentation agent injected via `JAVA_TOOL_OPTIONS`. The agent intercepts method entry points, serializes arguments using Kryo, and writes them to an SQLite database. A 500ms timeout per serialization prevents hangs on complex object graphs.
280
+
| Option | Description | Default |
281
+
|--------|-------------|---------|
282
+
|`--timeout`| Maximum time (seconds) for each tracing stage | Indefinite |
283
+
|`--max-function-count`| Maximum captures per method | 100 |
284
+
|`--trace-only`| Generate replay tests without running the optimizer | Off |
285
+
|`--no-pr`| Skip PR creation and keep changes local | Off |
269
286
270
-
-**Replay Tests**: Generated JUnit 5 test classes that deserialize captured arguments and invoke the original methods via reflection. These tests exercise your code with real-world inputs.
0 commit comments