Beispiel #1
0
void TestStats::Tick()
{
   time_t now = time(NULL);
   int cAdvance = generic_stats_Tick(
      now,
      this->RecentWindowMax,     // RecentMaxTime
      test_stats_window_quantum, // RecentQuantum
      this->InitTime,
      this->StatsLastUpdateTime,
      this->RecentStatsTickTime,
      this->StatsLifetime,
      this->RecentStatsLifetime);
   if (cAdvance > 0)
      Pool.Advance(cAdvance);
}
Beispiel #2
0
time_t StarterStatistics::Tick(time_t now) {
    if (!now) now = time(NULL);

    int cAdvance = generic_stats_Tick(now,
                                      this->RecentWindowMax,
                                      this->RecentWindowQuantum,
                                      this->InitTime,
                                      this->StatsLastUpdateTime,
                                      this->RecentStatsTickTime,
                                      this->StatsLifetime,
                                      this->RecentStatsLifetime);

    if (cAdvance) Pool.Advance(cAdvance);

    return now;
}
Beispiel #3
0
time_t DaemonCore::Stats::Tick(time_t now)
{
   if ( ! now) now = time(NULL);

   int cAdvance = generic_stats_Tick(
      now,
      this->RecentWindowMax,   // RecentMaxTime
      this->RecentWindowQuantum, // RecentQuantum
      this->InitTime,
      this->StatsLastUpdateTime,
      this->RecentStatsTickTime,
      this->StatsLifetime,
      this->RecentStatsLifetime);

   if (cAdvance)
      Pool.Advance(cAdvance);

   return now;
}
Beispiel #4
0
// call this when time may have changed to update LastUpdateTime, etc.
//
// when the time since last update exceeds the time quantum, then we advance the ring
// buffers so that we throw away the oldest value and begin accumulating the latest
// value in a new slot.
//
time_t DefragStats::Tick(time_t now)
{
    if ( ! now) now = time(NULL);

    int cAdvance = generic_stats_Tick(
                       now,
                       this->RecentWindowMax,
                       this->RecentWindowQuantum,
                       this->InitTime,
                       this->LastUpdateTime,
                       this->RecentTickTime,
                       this->Lifetime,
                       this->RecentLifetime);

    if (cAdvance)
        Pool.Advance(cAdvance);

    return now;
}
Beispiel #5
0
// call this when time may have changed to update StatsUpdateTime, etc.
//
// when the time since last update exceeds the time quantum, then we Advance the ring
// buffers so that we throw away the oldest value and begin accumulating the latest
// value in a new slot. 
//
time_t ScheddStatistics::Tick(time_t now)
{
   if ( ! now) now = time(NULL);

   int cAdvance = generic_stats_Tick(
      now,
      this->RecentWindowMax,   // RecentMaxTime
      schedd_stats_window_quantum, // RecentQuantum
      this->InitTime,
      this->StatsLastUpdateTime,
      this->RecentStatsTickTime,
      this->StatsLifetime,
      this->RecentStatsLifetime);

   if (cAdvance)
      Pool.Advance(cAdvance);

   return now;
}