To verify integration of this new engine-level facility, it seems prudent to build a load test (without going into extended stress- and performance testing). For that we need - random buffer demand - a computational load that actually uses the buffer. As part of the ''scheduler stress testing'', a self-calibrating `ComputationalLoad` was developed, which even implements both a merely computational load, but also a memory accessing computation. This can be extended to optionally use an external buffer, instead of allocating a precisely dimensioned memory block directly from heap. Obviously this extension is ''dangerous'', since there is no way to verify that the storage passed in can accommodated the storage required based on the current calibration of the `ComputationalLoad` As an aside: identified a timing check in `SchedulerService_test` that showed the tendency to fail when invoked immediately after a build.
94 lines
1.9 KiB
C++
94 lines
1.9 KiB
C++
/*
|
||
SchedulerUsage(Test) - verify standard usage patterns of the scheduler service
|
||
|
||
Copyright (C)
|
||
2023, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
||
**Lumiera** 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. See the file COPYING for further details.
|
||
|
||
* *****************************************************************/
|
||
|
||
/** @file scheduler-usage-test.cpp
|
||
** unit test \ref SchedulerUsage_test
|
||
*/
|
||
|
||
|
||
#include "test/run.hpp"
|
||
#include "vault/gear/scheduler.hpp"
|
||
//#include "lib/time/timevalue.hpp"
|
||
//#include "lib/format-cout.hpp"
|
||
//#include "lib/util.hpp"
|
||
|
||
//#include <utility>
|
||
|
||
using test::Test;
|
||
//using std::move;
|
||
//using util::isSameObject;
|
||
|
||
|
||
namespace vault{
|
||
namespace gear {
|
||
namespace test {
|
||
|
||
// using lib::time::FrameRate;
|
||
// using lib::time::Offset;
|
||
// using lib::time::Time;
|
||
|
||
|
||
|
||
|
||
|
||
/*************************************************************************//**
|
||
* @test Ensure expected Scheduler functionality in standard usage situations.
|
||
* @see SchedulerActivity_test
|
||
* @see SchedulerInvocation_test
|
||
* @see SchedulerCommutator_test
|
||
*/
|
||
class SchedulerUsage_test : public Test
|
||
{
|
||
|
||
virtual void
|
||
run (Arg)
|
||
{
|
||
simpleUsage();
|
||
walkingDeadline();
|
||
setupLalup();
|
||
}
|
||
|
||
|
||
/** @test TODO demonstrate a simple usage scenario
|
||
*/
|
||
void
|
||
simpleUsage()
|
||
{
|
||
}
|
||
|
||
|
||
|
||
/** @test TODO
|
||
*/
|
||
void
|
||
walkingDeadline()
|
||
{
|
||
}
|
||
|
||
|
||
|
||
/** @test TODO
|
||
*/
|
||
void
|
||
setupLalup()
|
||
{
|
||
}
|
||
};
|
||
|
||
|
||
/** Register this test class... */
|
||
LAUNCHER (SchedulerUsage_test, "integration engine");
|
||
|
||
|
||
|
||
}}} // namespace vault::gear::test
|