56 Time TEST_START_TIME (vault::RealClock::now());
57 const Duration TEST_FRAME_DURATION(FSecs(1,2));
60 dummyFrameStart (uint frameNr)
62 return frameNr * TEST_FRAME_DURATION;
89 verify_simple_job_specification (scheduler);
90 verify_job_specification_variations (scheduler);
101 Time deadline(TEST_START_TIME);
103 scheduler.startJobTransaction()
107 CHECK ( monitor.is_scheduled_timebound (job));
108 CHECK (!monitor.is_scheduled_background (job));
109 CHECK (!monitor.is_scheduled_freewheeling (job));
118 JobTransaction tx = scheduler.startJobTransaction();
126 CHECK (!monitor.is_scheduled_timebound (job1));
127 CHECK (!monitor.is_scheduled_timebound (job2));
128 CHECK (!monitor.is_scheduled_background (job1));
129 CHECK (!monitor.is_scheduled_background (job2));
130 CHECK (!monitor.is_scheduled_freewheeling (job1));
131 CHECK (!monitor.is_scheduled_freewheeling (job2));
135 CHECK (!monitor.is_scheduled_timebound (job1));
136 CHECK (!monitor.is_scheduled_timebound (job2));
138 CHECK ( monitor.is_scheduled_background (job1));
139 CHECK ( monitor.is_scheduled_freewheeling (job2));
158 JobTransaction startTx = scheduler.startJobTransaction();
165 for (uint i=0; i <=5; ++i)
167 Time nominalTime(dummyFrameStart (i));
168 Time deadline(TEST_START_TIME + nominalTime);
170 CHECK (monitor.has_job_scheduled_at (deadline));
171 CHECK (nominalTime == monitor.job_at(deadline).parameter.nominalTime);
183 uint frameNr = dummyLevel;
184 Time nominalTime(dummyFrameStart(frameNr));
185 Time deadline(TEST_START_TIME + nominalTime);
187 MockJob job{nominalTime, frameNr};
189 currentTx.
addJob (deadline, job);
193 JobTransaction dependentTx = currentTx.startPrerequisiteTx();
195 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.
Simple 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, bypassing any custom comparison operators.