Changeset 186 in flair-src for trunk/lib/FlairCore/src/Thread_impl.cpp


Ignore:
Timestamp:
06/23/17 17:33:03 (5 years ago)
Author:
Sanahuja Guillaume
Message:

maj imu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Thread_impl.cpp

    r133 r186  
    5757  this->priority = priority;
    5858  period = 100 * 1000 * 1000; // 100ms par defaut
    59   min_jitter = 1000 * 1000 * 1000;
    60   max_jitter = 0;
    61   mean_jitter = 0;
     59  min_latency = 1000 * 1000 * 1000;
     60  max_latency = 0;
     61  mean_latency = 0;
    6262  last = 0;
    6363  cpt = 0;
     
    234234  next_time += period;
    235235#endif
    236   ComputeJitter(GetTime());
     236  ComputeLatency(GetTime());
    237237}
    238238
     
    324324  {
    325325#ifndef __XENO__
    326 // if(last!=0)
     326  if(last!=0)
    327327#endif
    328328    { Printf("Thread::%s :\n", self->ObjectName().c_str()); }
     
    346346#endif
    347347    if (last != 0) {
    348       Printf("    min jitter (ns): %lld\n", min_jitter);
    349       Printf("    max jitter (ns): %lld\n", max_jitter);
    350       Printf("    jitter moy (ns): %lld\n", mean_jitter / cpt);
     348      Printf("    min latency (ns): %lld\n", min_latency);
     349      Printf("    max latency (ns): %lld\n", max_latency);
     350      Printf("    latency moy (ns): %lld\n", mean_latency / cpt);
    351351      Printf("    itertions: %lld\n", cpt);
    352352    }
     
    370370}
    371371
    372 void Thread_impl::ComputeJitter(Time time) {
     372void Thread_impl::ComputeLatency(Time time) {
    373373  Time diff, delta;
    374374  diff = time - last;
     
    384384    return;
    385385
    386   if (delta > max_jitter)
    387     max_jitter = delta;
    388   if (delta < min_jitter)
    389     min_jitter = delta;
    390   mean_jitter += delta;
     386  if (delta > max_latency)
     387    max_latency = delta;
     388  if (delta < min_latency)
     389    min_latency = delta;
     390  mean_latency += delta;
    391391  cpt++;
    392392
    393   // Printf("Thread::%s jitter moy (ns):
    394   // %lld\n",self->ObjectName().c_str(),mean_jitter/cpt);
     393  // Printf("Thread::%s latency moy (ns):
     394  // %lld\n",self->ObjectName().c_str(),mean_latency/cpt);
    395395}
    396396
Note: See TracChangeset for help on using the changeset viewer.