Conversation
- Add profiling module with global start time and profile_log! macro - Log elapsed time at key events in main.rs, orchestrator.rs - Pass start time to Python scripts via OFFLOAD_START_TIME_NANOS env var - Update modal_sandbox.py to use profile_log for consistent timing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- profiling.rs: Write timing logs to offload-timing.log file - modal.rs: Add profile_log for create_sandbox and exec_stream - default.rs: Add profile_log for create_sandbox and exec_stream Logs use [creating] before sandbox exists, then [sandbox_id] after. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add optional exec_barrier field to TestRunner - Barrier waits after exec is fired off but before results are awaited - This ensures all Python processes are started before any output is read - Useful for profiling true parallel execution latency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Vet found 4 issues.
[commit_message_mismatch] (severity 3/5) (confidence 0.90)
The diff includes the offload-timing.log file with 268 lines of actual profiling output data committed to the repository. This is a generated artifact/log file that should not be committed - it should be in .gitignore. The user asked to 'add profiling timestamps' (i.e., add the instrumentation code), not to commit log output.
| cmd_type = "pytest" if is_pytest else "other" | ||
| profile_log("[%s] modal: exec called (type=%s)", sandbox_id, cmd_type) | ||
| sandbox = modal.Sandbox.from_id(sandbox_id) | ||
|
|
There was a problem hiding this comment.
[commit_message_mismatch] (severity 3/5) (confidence 0.85)
The diff adds a junit_suite_name injection feature in the Python exec_command that modifies pytest commands to include sandbox_id as a junit prefix. This is unrelated to 'adding profiling timestamps' and constitutes an unauthorized behavioral change to test execution.
| .duration_since(std::time::UNIX_EPOCH) | ||
| .unwrap() | ||
| .as_nanos() | ||
| - start.elapsed().as_nanos(); |
There was a problem hiding this comment.
[instruction_file_disobeyed] (severity 3/5) (confidence 0.85)
The STYLE_GUIDE.md states 'Unsafe is forbidden by default' and requires #![forbid(unsafe_code)] at crate roots. The new src/profiling.rs module uses unsafe { std::env::set_var(...) } without any documented waiver or justification beyond a comment.
| let file = OpenOptions::new() | ||
| .create(true) | ||
| .append(true) | ||
| .open("offload-timing.log") |
There was a problem hiding this comment.
[instruction_file_disobeyed] (severity 3/5) (confidence 0.95)
The STYLE_GUIDE.md states 'Do not use unwrap() / expect() in production code.' The new src/profiling.rs uses .expect() when opening the timing log file and .unwrap() when computing the epoch time.
| @@ -0,0 +1,268 @@ | |||
| 14:09:30.713 [ 1.773s] modal: prepare called | |||
There was a problem hiding this comment.
Probably don't want to commit this--and add it to .gitignore
|
Done with these profiling experiments for now, closing |
No description provided.