From c8f13ca3e6f978c6667bf440ce3fba9ec0d88793 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 10 Nov 2023 23:54:47 +0100 Subject: [PATCH] Chain-Load: initial draft ...design a pattern to generate a reproducible computation load --- tests/32scheduler.tests | 6 ++ tests/vault/gear/test-chain-load-test.cpp | 92 ++++++++++++++++++ tests/vault/gear/test-chain-load.hpp | 109 +++++++++++++++++++++ wiki/thinkPad.ichthyo.mm | 111 ++++++++++++++++++---- 4 files changed, 298 insertions(+), 20 deletions(-) create mode 100644 tests/vault/gear/test-chain-load-test.cpp create mode 100644 tests/vault/gear/test-chain-load.hpp diff --git a/tests/32scheduler.tests b/tests/32scheduler.tests index 3619dab13..0c2a16089 100644 --- a/tests/32scheduler.tests +++ b/tests/32scheduler.tests @@ -44,6 +44,12 @@ END +PLANNED "Synthetic Load for Test" TestChainLoad_test < + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +/** @file test-chain-load-test.cpp + ** unit test \ref TestChainLoad_test + */ + + +#include "lib/test/run.hpp" +#include "lib/test/test-helper.hpp" +#include "test-chain-load.hpp" +//#include "vault/real-clock.hpp" +//#include "lib/time/timevalue.hpp" +//#include "lib/format-cout.hpp" +#include "lib/test/diagnostic-output.hpp"//////////////////////////TODO TOD-oh +//#include "lib/util.hpp" + + +//using lib::time::Time; +//using lib::time::FSecs; + +//using util::isSameObject; +//using lib::test::randStr; +//using lib::test::randTime; + + +namespace vault{ +namespace gear { +namespace test { + + + /*****************************************************************//** + * @test verify a tool to generate synthetic load for Scheduler tests. + * @see SchedulerService_test + * @see SchedulerStress_test + */ + class TestChainLoad_test : public Test + { + + virtual void + run (Arg) + { + simpleUsage(); + witch_gate(); + } + + + /** @test TODO demonstrate simple usage of the test-load + */ + void + simpleUsage() + { + UNIMPLEMENTED ("setup of TestChainLoad"); + } + + + + /** @test TODO diagnostic blah + */ + void + witch_gate() + { + UNIMPLEMENTED ("witch gate"); + } + }; + + + /** Register this test class... */ + LAUNCHER (TestChainLoad_test, "unit engine"); + + + +}}} // namespace vault::gear::test diff --git a/tests/vault/gear/test-chain-load.hpp b/tests/vault/gear/test-chain-load.hpp new file mode 100644 index 000000000..d2564e29a --- /dev/null +++ b/tests/vault/gear/test-chain-load.hpp @@ -0,0 +1,109 @@ +/* + TEST-CHAIN-LOAD.hpp - produce a configurable synthetic computation load + + Copyright (C) Lumiera.org + 2023, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file test-chain-load.hpp + ** Generate synthetic computation load for Scheduler performance tests. + ** The [Scheduler](\ref scheduler.hpp) is a service to invoke Render Job instances + ** concurrently in accordance to a time plan. To investigate the runtime and performance + ** characteristics of the implementation, a well-defined artificial computation load is + ** necessary, comprised of the invocation of an extended number of Jobs, each configured + ** to carry out a reproducible computation. Data dependencies between jobs can be established + ** to verify handling of dependent jobs and job completion messages within the scheduler. + ** + ** # Usage + ** + ** Duh oh + ** + ** ## Observation tools + ** - jaleck + ** + ** @see TestChainLoad_test + ** @see SchedulerStress_test + */ + + +#ifndef VAULT_GEAR_TEST_TEST_CHAIN_LOAD_H +#define VAULT_GEAR_TEST_TEST_CHAIN_LOAD_H + + +#include "vault/common.hpp" +#include "lib/test/test-helper.hpp" + +//#include "vault/gear/job.h" +//#include "vault/gear/activity.hpp" +//#include "vault/gear/nop-job-functor.hpp" +//#include "lib/time/timevalue.hpp" +//#include "lib/meta/variadic-helper.hpp" +//#include "lib/meta/function.hpp" +//#include "lib/wrapper.hpp" +//#include "lib/format-util.hpp" +//#include "lib/util.hpp" + +//#include +//#include +//#include +//#include + + +namespace vault{ +namespace gear { +namespace test { + +// using std::string; +// using std::function; +// using lib::time::TimeValue; +// using lib::time::Time; +// using lib::time::FSecs; +// using lib::time::Offset; +// using lib::meta::RebindVariadic; +// using util::isnil; +// using std::forward; +// using std::move; + + + namespace {// Diagnostic markers +// const string MARK_INC{"IncSeq"}; +// const string MARK_SEQ{"Seq"}; + +// using SIG_JobDiagnostic = void(Time, int32_t); + } + + + + /** + * A Generator for synthetic Render Jobs for Scheduler load testing. + * @see TestChainLoad_test + */ + class TestChainLoad + : util::NonCopyable + { + + public: + TestChainLoad () + { } + + private: + }; + + +}}} // namespace vault::gear::test +#endif /*VAULT_GEAR_TEST_TEST_CHAIN_LOAD_H*/ diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index c6087b3e9..7fc55b701 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -82039,7 +82039,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -84114,7 +84114,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -84842,7 +84842,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -84881,7 +84881,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -84961,7 +84961,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -84986,9 +84986,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + @@ -85062,9 +85062,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + @@ -90173,13 +90173,16 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + + + + @@ -90242,13 +90245,15 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - - + + + - + + + @@ -92860,6 +92865,12 @@ Date:   Thu Apr 20 18:53:17 2023 +0200

+ + + + + +
@@ -94271,8 +94282,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- -
+
@@ -95157,8 +95167,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -95604,6 +95614,64 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -97195,7 +97263,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -97217,6 +97285,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + +