ots_ops#203
Conversation
…ssages-bookkeeping' into sc/ots_ops-cleanup
There was a problem hiding this comment.
Pull request overview
This PR adds operational timing/debug instrumentation around DAQInterface transitions and process launch handling, with one whitespace-only utility change.
Changes:
- Adds timing trace helpers and trace points for config, command, and process-transition stages.
- Adds direct process-launch debug output and routes setup logging through a temporary launch-attempt file before appending to the final log.
- Adds a blank line in
construct_checked_commandwith no functional effect.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
rc/control/daqinterface.py |
Adds timing trace support and trace events across config/command transition paths. |
rc/control/manage_processes_direct.py |
Adds launch debug logging and temporary setup-log aggregation before process launches. |
rc/control/utilities.py |
Whitespace-only change in checked command construction. |
Comments suppressed due to low confidence (1)
rc/control/daqinterface.py:3774
- This trace stage has a begin event but exceptions from create_setup_fhiclcpp_if_needed or reformat_fhicl_documents raise before any matching end event is written, and do_config_total is left open as well. Add a failure path around the whole reformat step so timing traces remain balanced and include the failed stage.
reformat_start = self.timing_trace_start("do_config_reformat_fhicl")
try:
self.create_setup_fhiclcpp_if_needed()
except:
raise
reformatted_fhicl_documents = reformat_fhicl_documents(
os.environ["DAQINTERFACE_SETUP_FHICLCPP"], self.procinfos
| launch_commands_to_run_on_host_background[procinfo.host] = [] | ||
| launch_commands_on_host_to_show_user[procinfo.host] = [] | ||
|
|
||
| tmp_launch_attempt_file = "/tmp/launch_attempt_tmp_%s_%s_partition%s" % ( |
There was a problem hiding this comment.
I would just revert this change. I don't see the benefit.
|
|
||
| try: | ||
| with open(self.timing_trace_filename(), "a") as outf: | ||
| outf.write(" ".join(fields) + "\n") |
There was a problem hiding this comment.
Consider using self.print_log instead of a tmp file. Or we could make a file in the run_records?
| self.__do_disable = True | ||
|
|
||
| def timing_trace_is_enabled(self): | ||
| token = os.environ.get("DAQINTERFACE_TIMING_TRACE", "true") |
There was a problem hiding this comment.
I would configure this behavior via a DAQInterface setting (like advanced_memory_usage). We could also specify the file name (or either just log it to the DAQInterface log with a tag "TIMING TRACE:", or write it to a file in the run_records area)
Code we've been testing at mc2 for the last few days.