From 1228880b62dbc17c58589adfa4ebffaa1fb7e6d9 Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel Date: Fri, 17 Oct 2025 09:58:08 -0500 Subject: [PATCH] Reduce execution times for mock workflow The mock workflow was implemented to simulate realistic execution times for a simulation+reconstruction workflow. This results in a lengthy unit test (~26 seconds) whose algorithms "spin" for the configured duration. For the purposes of framework development, it is not necessary to use such long durations. We can restore the original configured durations when it is deemed necessary. --- test/mock-workflow/G4Stage1.libsonnet | 2 +- test/mock-workflow/G4Stage2.libsonnet | 4 ++-- test/mock-workflow/SinglesGen.libsonnet | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/mock-workflow/G4Stage1.libsonnet b/test/mock-workflow/G4Stage1.libsonnet index 345593272..6dddee175 100644 --- a/test/mock-workflow/G4Stage1.libsonnet +++ b/test/mock-workflow/G4Stage1.libsonnet @@ -3,7 +3,7 @@ local generators = import 'SinglesGen.libsonnet'; { largeant: { plugin: 'largeant', - duration_usec: 15662051, + duration_usec: 156, # Typical: 15662051 inputs: [f + "/MCTruths" for f in std.objectFields(generators)], outputs: ["ParticleAncestryMap", "Assns", "SimEnergyDeposits", "AuxDetHits", "MCParticles"], } diff --git a/test/mock-workflow/G4Stage2.libsonnet b/test/mock-workflow/G4Stage2.libsonnet index 89482c453..40d7720ff 100644 --- a/test/mock-workflow/G4Stage2.libsonnet +++ b/test/mock-workflow/G4Stage2.libsonnet @@ -3,13 +3,13 @@ local g4stage1 = import 'G4Stage1.libsonnet'; { IonAndScint: { plugin: 'ion_and_scint', - duration_usec: 5457973, + duration_usec: 546, # Typical: 5457973 inputs: [f + "/SimEnergyDeposits" for f in std.objectFields(g4stage1)], outputs: ["SimEnergyDeposits", "SimEnergyDeposits_priorSCE"], }, PDFastSim: { plugin: 'pd_fast_sim', - duration_usec: 69, #69681950, + duration_usec: 69, # Typical: 69681950 inputs: ['SimEnergyDeposits_priorSCE'], outputs: ['SimPhotonLites', 'OpDetBacktrackerRecords'], } diff --git a/test/mock-workflow/SinglesGen.libsonnet b/test/mock-workflow/SinglesGen.libsonnet index e8d109771..b84df7b50 100644 --- a/test/mock-workflow/SinglesGen.libsonnet +++ b/test/mock-workflow/SinglesGen.libsonnet @@ -13,7 +13,7 @@ }, cosmicgenerator: { plugin: "MC_truth_algorithm", - duration_usec: 4926215, + duration_usec: 492, # Typical: 4926215 inputs: ["id"], outputs: ["MCTruths"] },