Manually combine JSON reports from multiple processes
masterIf you need to generate and combine reports from different processes manually:
- Generate individual reports: Use
--pid_suffixto ensure each JSON file ends with the process ID. You can also specify a custom output directory with--output_diror a specific filename with-o. - Combine reports: Use the
viztracer --combinecommand pointing to the generated JSON files. You can use--output_fileto name the final combined report.
Recommended workflow:
# 1. Generate reports with PID suffixes in a temp directory
viztracer --pid_suffix --output_dir ./temp_dir single_process.py
# 2. Combine all JSON files in that directory
viztracer --combine ./temp_dir/*.jsonviztracer --pid_suffix single_process.py
# or
viztracer -o process1.json single_process.py
# With output directory
viztracer --pid_suffix --output_dir ./temp_dir single_process.py
# Combining
viztracer --combine ./temp_dir/*.json