Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger latency monitoring configuration #126

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion config/appmodel/moduleconfs.data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<oks-data>

<info name="" type="" num-of-items="31" oks-format="data" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20231207T105629" last-modified-by="eflumerf" last-modified-on="ironvirt9.mshome.net" last-modification-time="20240903T185101"/>
<info name="" type="" num-of-items="31" oks-format="data" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20231207T105629" last-modified-by="mrigan" last-modified-on="np04-srv-016.cern.ch" last-modification-time="20240912T162204"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand Down Expand Up @@ -96,6 +96,8 @@
<comment creation-time="20240307T133917" created-by="glehmann" created-on="np04-srv-024.cern.ch" author="Unknown" text="disable TPG"/>
<comment creation-time="20240822T070558" created-by="aoranday" created-on="np04-srv-031.cern.ch" author="aoranday" text="Add TPG SimpleThreshold."/>
<comment creation-time="20240903T185101" created-by="eflumerf" created-on="ironvirt9.mshome.net" author="eflumerf" text="Reformat"/>
<comment creation-time="20240912T142734" created-by="mrigan" created-on="np04-srv-016.cern.ch" author="mrigan" text="adding latency monitoring (trigger)"/>
<comment creation-time="20240912T162204" created-by="mrigan" created-on="np04-srv-016.cern.ch" author="mrigan" text="adding latency monitoring to HSI to TC"/>
</comments>


Expand Down Expand Up @@ -227,6 +229,7 @@
<rel name="signals">
<ref class="HSISignalWindow" id="def-hsi-signal-window"/>
</rel>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
</obj>

<obj class="HSISignalWindow" id="def-hsi-signal-window">
Expand All @@ -250,6 +253,7 @@
<attr name="td_out_of_timeout" type="bool" val="1"/>
<attr name="buffer_timeout" type="u32" val="1"/>
<attr name="td_readout_limit" type="u32" val="1"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
</obj>

<obj class="NICStatsConf" id="def-nic-stats">
Expand Down Expand Up @@ -322,6 +326,7 @@
<attr name="queue_sizes" type="u32" val="10000"/>
<attr name="thread_names_prefix" type="string" val="proc-"/>
<attr name="print_tp_info" type="bool" val="0"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
<rel name="algorithms">
<ref class="TAMakerPrescaleAlgorithm" id="dummy-ta-maker"/>
</rel>
Expand Down
7 changes: 6 additions & 1 deletion schema/appmodel/application.schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<oks-schema>

<info name="" type="" num-of-items="46" oks-format="schema" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20230616T091343" last-modified-by="eflumerf" last-modified-on="ironvirt9.mshome.net" last-modification-time="20240903T185336"/>
<info name="" type="" num-of-items="47" oks-format="schema" oks-version="862f2957270" created-by="gjc" created-on="thinkpad" creation-time="20230616T091343" last-modified-by="mrigan" last-modified-on="np04-srv-016.cern.ch" last-modification-time="20240912T162108"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand Down Expand Up @@ -146,6 +146,7 @@
<class name="DataProcessor">
<attribute name="queue_sizes" type="u32" init-value="10000"/>
<attribute name="thread_names_prefix" type="string" init-value="postproc-"/>
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="zero" high-cc="zero" is-composite="yes" is-exclusive="no" is-dependent="yes"/>
</class>

<class name="DataReaderConf">
Expand Down Expand Up @@ -294,6 +295,10 @@
<attribute name="preallocation" type="bool" init-value="true"/>
</class>

<class name="LatencyMonitoringConf">
<attribute name="enable_latency_monitoring" type="bool" init-value="true"/>
</class>
Comment on lines +298 to +300
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I think an entire new class to overlay a boolean is a bit of an overkill.

On one hand being able to switch all the monitoring on with one object is nice, but on the other hand, it adds extra complexity when we want to switch only one of these on. And I imagine e.g. by default we might it off, say, RawDataProcessor and TPDataProcessor (especially since now it's on per-TP, not per-TPSet basis) but on in the TCDataProcessor and in the MLT. It could also be added in DataProcessor, so it doesn't need to be in all the derived processors separately.

Perhaps @glehmannmiotto has a more elegant solution here? Perhaps enabling latency monitoring via application? There are other non-DataProcessor-derived objects that also need this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with your assessment @ArturSztuc, and think that we should only add a boolean attribute. The question for @MRiganSUSX is who is in charge of the monitoring. Is it the application, the module or the data processor? Depending on this we should put the attribute in the right class (DataProcessor may be the right one). If you are worried about the ease of enabling/disabling this monitoring feature (although, why would you ever want to disable it?), then it is easy to add a python utility in daqconf that changes the value of the attribute for an application, a class of applications, or all.


<class name="NWDetDataReceiver" is-abstract="yes">
<superclass name="DetDataReceiver"/>
<relationship name="uses" class-type="NetworkInterface" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>
Expand Down
5 changes: 4 additions & 1 deletion schema/appmodel/trigger.schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<oks-schema>

<info name="" type="" num-of-items="49" oks-format="schema" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231211T133151" last-modified-by="eflumerf" last-modified-on="ironvirt9.mshome.net" last-modification-time="20240903T185336"/>
<info name="" type="" num-of-items="49" oks-format="schema" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231211T133151" last-modified-by="mrigan" last-modified-on="np04-srv-016.cern.ch" last-modification-time="20240912T162108"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand Down Expand Up @@ -136,6 +136,7 @@
<superclass name="DataReaderConf"/>
<attribute name="prescale" description="Prescale factor to apply to HSIEvent input" type="u32" init-value="1" is-not-null="yes"/>
<relationship name="signals" class-type="HSISignalWindow" low-cc="one" high-cc="many" is-composite="no" is-exclusive="no" is-dependent="no"/>
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="zero" high-cc="zero" is-composite="yes" is-exclusive="yes" is-dependent="yes"/>
</class>

<class name="HSIEventToTCApplication">
Expand Down Expand Up @@ -169,6 +170,7 @@
<attribute name="td_out_of_timeout" type="bool" init-value="true" is-not-null="yes"/>
<attribute name="buffer_timeout" type="u32" init-value="100" is-not-null="yes"/>
<attribute name="td_readout_limit" type="u32" init-value="1000" is-not-null="yes"/>
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="zero" high-cc="zero" is-composite="yes" is-exclusive="yes" is-dependent="yes"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be

Suggested change
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="zero" high-cc="zero" is-composite="yes" is-exclusive="yes" is-dependent="yes"/>
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="one" high-cc="one" is-composite="no" is-exclusive="no" is-dependent="no"/>

one, otherwise we're saying "I want exactly no LatencyMonitoringConf objects", so what's the point of having them?
is-composite="no" because this is definitely not a composite class. LatencyMonitoringConfig is made of one boolean, not entirely of other objects.
is-exclusive="no" presumably because we want to share this object? Otherwise there's no point of making it a separate class in the first place.
is-dependent="yes" is one that I'm unsure about, I always assumed it's only for objects that go into composite classes. Perhaps @gcrone knows better here.

</class>

<class name="MLTModule">
Expand Down Expand Up @@ -210,6 +212,7 @@
<class name="StandaloneTCMakerConf" is-abstract="yes">
<attribute name="template_for" type="class" init-value="StandaloneTCMakerModule" is-not-null="yes"/>
<attribute name="timestamp_method" type="enum" range="kTimeSync,kSystemClock" init-value="kTimeSync" is-not-null="yes"/>
<relationship name="latency_monitoring_conf" class-type="LatencyMonitoringConf" low-cc="zero" high-cc="zero" is-composite="yes" is-exclusive="no" is-dependent="yes"/>
</class>

<class name="StandaloneTCMakerModule">
Expand Down
4 changes: 3 additions & 1 deletion test/config/hsi-segment.data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<oks-data>

<info name="" type="" num-of-items="11" oks-format="data" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231212T171111" last-modified-by="thea" last-modified-on="np04-srv-031.cern.ch" last-modification-time="20240628T062322"/>
<info name="" type="" num-of-items="14" oks-format="data" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231212T171111" last-modified-by="mrigan" last-modified-on="np04-srv-016.cern.ch" last-modification-time="20240912T142734"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand All @@ -82,6 +82,7 @@
<comment creation-time="20240312T203031" created-by="eflumerf" created-on="ironvirt9.mshome.net" author="eflumerf" text="Apply source_id..."/>
<comment creation-time="20240325T124934" created-by="glehmann" created-on="np04-srv-019.cern.ch" author="Unknown" text="adjusted to name changes in connections"/>
<comment creation-time="20240628T062322" created-by="thea" created-on="np04-srv-031.cern.ch" author="thea" text="removing broadcasters from control apps"/>
<comment creation-time="20240912T142734" created-by="mrigan" created-on="np04-srv-016.cern.ch" author="mrigan" text="adding latency monitoring (trigger)"/>
</comments>


Expand Down Expand Up @@ -140,6 +141,7 @@
<obj class="HSIFrameProcessor" id="def-hsi-processor">
<attr name="queue_sizes" type="u32" val="10000"/>
<attr name="thread_names_prefix" type="string" val="hsip"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
</obj>

<obj class="LatencyBuffer" id="hsilatencybuffer-generic">
Expand Down
11 changes: 10 additions & 1 deletion test/config/trigger-segment.data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<oks-data>

<info name="" type="" num-of-items="27" oks-format="data" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231212T171111" last-modified-by="gjc" last-modified-on="latitude" last-modification-time="20240709T095746"/>
<info name="" type="" num-of-items="26" oks-format="data" oks-version="862f2957270" created-by="asztuc" created-on="np04-srv-019.cern.ch" creation-time="20231212T171111" last-modified-by="mrigan" last-modified-on="np04-srv-016.cern.ch" last-modification-time="20240912T142734"/>

<include>
<file path="schema/confmodel/dunedaq.schema.xml"/>
Expand Down Expand Up @@ -96,6 +96,7 @@
<comment creation-time="20240403T110823" created-by="glehmann" created-on="np04-srv-019.cern.ch" author="glehmann" text="no random generator"/>
<comment creation-time="20240403T115733" created-by="glehmann" created-on="np04-srv-019.cern.ch" author="glehmann" text=" "/>
<comment creation-time="20240628T062322" created-by="thea" created-on="np04-srv-031.cern.ch" author="thea" text="removing broadcasters from control apps"/>
<comment creation-time="20240912T142734" created-by="mrigan" created-on="np04-srv-016.cern.ch" author="mrigan" text="adding latency monitoring (trigger)"/>
</comments>


Expand All @@ -111,6 +112,7 @@
<data val="62500000"/>
</attr>
<attr name="clock_frequency_hz" type="u32" val="62500000"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
</obj>

<obj class="DataHandlerConf" id="def-ta-handler">
Expand All @@ -131,6 +133,10 @@
<rel name="data_processor" class="TCDataProcessor" id="def-tc-processor"/>
</obj>

<obj class="LatencyMonitoringConf" id="enable-latency-monitoring">
<attr name="enable_latency_monitoring" type="bool" val="1"/>
</obj>

<obj class="MLTApplication" id="mlt">
<attr name="application_name" type="string" val="daq_application"/>
<rel name="runs_on" class="VirtualHost" id="vlocalhost"/>
Expand Down Expand Up @@ -175,6 +181,7 @@
<attr name="trigger_interval_ticks" type="u32" val="125000000"/>
<attr name="clock_frequency_hz" type="u32" val="62500000"/>
<attr name="time_distribution" type="enum" val="kUniform"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
</obj>

<obj class="RequestHandler" id="def-ta-request-handler">
Expand Down Expand Up @@ -237,6 +244,7 @@
<attr name="queue_sizes" type="u32" val="10000"/>
<attr name="thread_names_prefix" type="string" val="proc-"/>
<attr name="print_ta_info" type="bool" val="0"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
<rel name="algorithms">
<ref class="TCMakerPrescaleAlgorithm" id="tc-pass-through-algo"/>
</rel>
Expand All @@ -253,6 +261,7 @@
<attr name="use_bitwords" type="bool" val="0"/>
<attr name="use_roi_readout" type="bool" val="0"/>
<attr name="use_readout_map" type="bool" val="0"/>
<rel name="latency_monitoring_conf" class="LatencyMonitoringConf" id="enable-latency-monitoring"/>
<rel name="tc_readout_map">
<ref class="TCReadoutMap" id="def-tc-map"/>
<ref class="TCReadoutMap" id="def-hsi-tc-map"/>
Expand Down
Loading