47 Time TEST_START_TIME (vault::RealClock::now());
48 const Duration TEST_FRAME_DURATION(FSecs(1,2));
51 dummyFrameStart (uint frameNr)
53 return frameNr * TEST_FRAME_DURATION;
81 verify_simple_job_specification (scheduler);
82 verify_job_specification_variations (scheduler);
93 Time deadline(TEST_START_TIME);
95 scheduler.startJobTransaction()
99 CHECK ( monitor.is_scheduled_timebound (job));
100 CHECK (!monitor.is_scheduled_background (job));
101 CHECK (!monitor.is_scheduled_freewheeling (job));
110 JobTransaction tx = scheduler.startJobTransaction();
118 CHECK (!monitor.is_scheduled_timebound (job1));
119 CHECK (!monitor.is_scheduled_timebound (job2));
120 CHECK (!monitor.is_scheduled_background (job1));
121 CHECK (!monitor.is_scheduled_background (job2));
122 CHECK (!monitor.is_scheduled_freewheeling (job1));
123 CHECK (!monitor.is_scheduled_freewheeling (job2));
127 CHECK (!monitor.is_scheduled_timebound (job1));
128 CHECK (!monitor.is_scheduled_timebound (job2));
130 CHECK ( monitor.is_scheduled_background (job1));
131 CHECK ( monitor.is_scheduled_freewheeling (job2));
150 JobTransaction startTx = scheduler.startJobTransaction();
157 for (uint i=0; i <=5; ++i)
159 Time nominalTime(dummyFrameStart (i));
160 Time deadline(TEST_START_TIME + nominalTime);
162 CHECK (monitor.has_job_scheduled_at (deadline));
163 CHECK (nominalTime == monitor.job_at(deadline).parameter.nominalTime);
175 uint frameNr = dummyLevel;
176 Time nominalTime(dummyFrameStart(frameNr));
177 Time deadline(TEST_START_TIME + nominalTime);
179 MockJob job{nominalTime, frameNr};
181 currentTx.
addJob (deadline, job);
185 JobTransaction dependentTx = currentTx.startPrerequisiteTx();
187 currentTx.
attach (dependentTx);
Mock data structures to support implementation testing of render job planning and frame dispatch...
An facility to check and monitor the internal workings of the scheduler.
Access point to the scheduler service provided by the back-end.
Definition context for jobs to be scheduled.
static void specifyJobs(JobTransaction ¤tTx, uint dummyLevel)
recursive helper function to add several levels of prerequisites It is crucial for this function to b...
Mock setup for a render Job with NO action but built-in diagnostics.
void demonstrate_nested_job_specification(SchedulerFrontend &scheduler)
Lumiera's internal time value datatype.
static lib::Depend< SchedulerFrontend > instance
access point to the Engine Interface.
Render engine diagnostic facility.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
JobTransaction & addBackground(Job const &job)
define a job for background rendering.
JobTransaction & addFreewheeling(Job const &job)
define a render job to be calculated as soon as resources permit.
JobTransaction & attach(JobTransaction const &prerequisites)
define a set of prerequisites of the current JobTransaction.
boost::rational< int64_t > FSecs
rational representation of fractional seconds
void commit()
finish this set of job definitions.
Offset measures a distance in time.
Duration is the internal Lumiera time metric.
Scheduler service access point for higher layers.
Front-end for simplified access to the current wall clock time.
Vault-Layer implementation namespace root.
JobTransaction & addJob(Time deadline, Job const &job)
define a render job for time-bound calculation
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities. ...