From 06936cd723ea0f32436965019990c7bbde2ed974 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Thu, 16 Mar 2023 13:52:52 -0600 Subject: [PATCH] Add test for perf graph live print formatting and multiapps interaction, refs #19114 #23746 --- .../perf_graph_live_print.i | 19 +++++- test/tests/utils/perf_graph_live_print/tests | 61 ++++++++++++++++++- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/test/tests/utils/perf_graph_live_print/perf_graph_live_print.i b/test/tests/utils/perf_graph_live_print/perf_graph_live_print.i index ed75837b0484..de9283091f93 100644 --- a/test/tests/utils/perf_graph_live_print/perf_graph_live_print.i +++ b/test/tests/utils/perf_graph_live_print/perf_graph_live_print.i @@ -34,7 +34,9 @@ [Problem] type = SlowProblem - seconds_to_sleep = 8 + seconds_to_sleep = 3 + print_during_section = false + nest_inside_section = false [] [Executioner] @@ -44,6 +46,19 @@ petsc_options_value = 'hypre boomeramg' [] +[MultiApps] + active = '' + [subapp] + type = FullSolveMultiApp + input_files = 'perf_graph_live_print.i' + cli_args = "MultiApps/active=''" + [] +[] + [Outputs] perf_graph_live_time_limit = 1 -[] + [console] + type = Console + fit_mode = 80 + [] +[] \ No newline at end of file diff --git a/test/tests/utils/perf_graph_live_print/tests b/test/tests/utils/perf_graph_live_print/tests index 13ec05022b65..67292d5e77b7 100644 --- a/test/tests/utils/perf_graph_live_print/tests +++ b/test/tests/utils/perf_graph_live_print/tests @@ -1,11 +1,66 @@ [Tests] - [./test] + [time_test] type = RunApp input = perf_graph_live_print.i expect_out = "Testing Slowness" issues = '#15444' design = 'utils/PerfGraph.md' - requirement = 'The system shall allow for timing sections of code and having automated print-outs when they take too long or use too much memory' - [../] + requirement = 'The system shall allow for timing sections of code and having automated print-outs when they take too long' + [] + + [nested_sections] + type = RunApp + input = perf_graph_live_print.i + cli_args = 'Problem/nest_inside_section=true' + # Checks the size of the printout as well, 62 characters after the text then a bracket + expect_out = "Testing Nested Slowness( |\.){62}\[" + + issues = '#15444' + design = 'utils/PerfGraphLivePrint.md' + requirement = 'The system shall allow for nested timing sections of code and having automated print-outs when they take too long' + [] + [section_interrupted_by_regular_print] + # this test does not address the warnings 'direct to Moose::out' issue #23750 + type = RunApp + input = perf_graph_live_print.i + cli_args = 'Problem/print_during_section=true' + expect_out = "Timed section just started, printing something though\n(Currently|Still) Executing" + + issues = '#23746' + design = 'utils/PerfGraphLivePrint.md' + requirement = 'The system shall be able to print the automatic print-out of a timed section when an external print happened' + [] + + [multiapps] + type = RunApp + input = perf_graph_live_print.i + cli_args = "MultiApps/active='subapp' --color off" + expect_out = "subapp0: Testing Slowness( |\.){64}\[" + + issues = '#19114' + design = 'utils/PerfGraphLivePrint.md' + requirement = 'The system shall allow for automatic print-outs of timing sections within multiapps' + [] + [multiapps_and_nested] + type = RunApp + input = perf_graph_live_print.i + cli_args = "MultiApps/active='subapp' MultiApps/subapp/cli_args=Problem/nest_inside_section=true --color off" + expect_out = "subapp0: Testing Nested Slowness( |\.){55}\[" + + issues = '#19114' + design = 'utils/PerfGraphLivePrint.md' + requirement = 'The system shall allow for automatic print-outs of nested timing sections within multiapps' + [] + + [nested_multiapps] + type = RunApp + input = perf_graph_live_print.i + cli_args = "MultiApps/active='subapp' MultiApps/subapp/cli_args='MultiApps/active=subapp' --color off" + expect_out = "subapp0_subapp0: Testing Slowness(\.| ){56}\[" + + issues = '#19114' + design = 'utils/PerfGraphLivePrint.md' + requirement = 'The system shall allow for automatic print-outs of timing sections within nested multiapps' + [] []