User Tools

Site Tools


for_developers:timing_measurement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
for_developers:timing_measurement [2016/08/15 16:43] – [Accuracy of the measurement] gehrigfor_developers:timing_measurement [2016/09/13 14:03] – [How the timer works] gehrig
Line 2: Line 2:
  
 ===== How the timer works ===== ===== How the timer works =====
-The timer function is included in the Executer object. It measures the time each start of a cycle (//counter.tick()//). Additionally it measures the run time of all threads with //counter.tock()//. The timer keeps track of previous measurements and calculates after each //counter.tock// minimal value, maximal value, mean value and the variance of the period time and run time as well.+The timer function is included in the Executer object. It registers the system time each time the executor executes its list of tasks (//counter.tick()//). When all tasks are done the system time is registered again (//counter.tock()//). The timer keeps track of the previous measurement and calculates the run time in between consecutive runs as well as period and jitter.  
 +  * run time: counter.tock() - counter.tick() 
 +  * period: counter.tick()[t=n] - counter.tick()[t=n-1] 
 +  * jitter: |actual period - set period| 
 +Of these three measurements the minimal value, maximal value, mean value and the variance are calculated. 
 + 
 +Implementation in //Execurot.cpp//: 
 +<code cpp> 
 +... 
 +loop { 
 +    counter.tick(); 
 +    //code under test (list.run();) 
 +    counter.tock(); 
 +
 +... 
 +</code>
  
 ===== Influence of the measurement on the real time performance of the system ===== ===== Influence of the measurement on the real time performance of the system =====