Skip to content

ots_ops#203

Merged
eflumerf merged 17 commits into
developfrom
sc/ots_ops
Jun 9, 2026
Merged

ots_ops#203
eflumerf merged 17 commits into
developfrom
sc/ots_ops

Conversation

@corrodis

Copy link
Copy Markdown
Contributor

Code we've been testing at mc2 for the last few days.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_command with 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

Comment thread rc/control/manage_processes_direct.py Outdated
Comment thread rc/control/daqinterface.py Outdated
Comment thread rc/control/daqinterface.py Outdated
Comment thread rc/control/manage_processes_direct.py Outdated
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" % (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just revert this change. I don't see the benefit.

Comment thread rc/control/daqinterface.py Outdated

try:
with open(self.timing_trace_filename(), "a") as outf:
outf.write(" ".join(fields) + "\n")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using self.print_log instead of a tmp file. Or we could make a file in the run_records?

Comment thread rc/control/daqinterface.py Outdated
self.__do_disable = True

def timing_trace_is_enabled(self):
token = os.environ.get("DAQINTERFACE_TIMING_TRACE", "true")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@eflumerf eflumerf moved this from 📋 Triage to 👍 PR Created in art-daq Work Tracker Jun 9, 2026
@eflumerf eflumerf merged commit 582461a into develop Jun 9, 2026
9 checks passed
@eflumerf eflumerf deleted the sc/ots_ops branch June 9, 2026 16:54
@github-project-automation github-project-automation Bot moved this from 👍 PR Created to 🎉 Done in art-daq Work Tracker Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

6 participants