|
Packit Service |
623930 |
/*
|
|
Packit Service |
623930 |
* Copyright (C) 2010 Miroslav Lichvar <mlichvar@redhat.com>
|
|
Packit Service |
623930 |
*
|
|
Packit Service |
623930 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit Service |
623930 |
* it under the terms of the GNU General Public License as published by
|
|
Packit Service |
623930 |
* the Free Software Foundation; either version 2 of the License, or
|
|
Packit Service |
623930 |
* (at your option) any later version.
|
|
Packit Service |
623930 |
*
|
|
Packit Service |
623930 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
623930 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
623930 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
623930 |
* GNU General Public License for more details.
|
|
Packit Service |
623930 |
*
|
|
Packit Service |
623930 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
623930 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
623930 |
*/
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
#ifndef STATS_H
|
|
Packit Service |
623930 |
#define STATS_H
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
#include "clock.h"
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
class Stats {
|
|
Packit Service |
623930 |
double offset_sum2;
|
|
Packit Service |
623930 |
double offset_abs_sum;
|
|
Packit Service |
623930 |
double offset_sum;
|
|
Packit Service |
623930 |
double offset_abs_max;
|
|
Packit Service |
623930 |
double freq_sum2;
|
|
Packit Service |
623930 |
double freq_abs_sum;
|
|
Packit Service |
623930 |
double freq_sum;
|
|
Packit Service |
623930 |
double freq_abs_max;
|
|
Packit Service |
623930 |
double rawfreq_sum2;
|
|
Packit Service |
623930 |
double rawfreq_abs_sum;
|
|
Packit Service |
623930 |
double rawfreq_sum;
|
|
Packit Service |
623930 |
double rawfreq_abs_max;
|
|
Packit Service |
623930 |
unsigned long samples;
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
double packets_in_sum2;
|
|
Packit Service |
623930 |
double packets_out_sum2;
|
|
Packit Service |
623930 |
unsigned long packets_in;
|
|
Packit Service |
623930 |
unsigned long packets_out;
|
|
Packit Service |
623930 |
double packets_in_time_last;
|
|
Packit Service |
623930 |
double packets_out_time_last;
|
|
Packit Service |
623930 |
double packets_in_int_sum;
|
|
Packit Service |
623930 |
double packets_out_int_sum;
|
|
Packit Service |
623930 |
double packets_in_int_min;
|
|
Packit Service |
623930 |
double packets_out_int_min;
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
unsigned long wakeups_int_sum;
|
|
Packit Service |
623930 |
unsigned long wakeups;
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
public:
|
|
Packit Service |
623930 |
Stats();
|
|
Packit Service |
623930 |
~Stats();
|
|
Packit Service |
623930 |
void reset();
|
|
Packit Service |
623930 |
void reset_clock_stats();
|
|
Packit Service |
623930 |
void update_clock_stats(double offset, double freq, double rawfreq);
|
|
Packit Service |
623930 |
void update_packet_stats(bool incoming, double time, double delay);
|
|
Packit Service |
623930 |
void update_wakeup_stats();
|
|
Packit Service |
623930 |
void print(int verbosity) const;
|
|
Packit Service |
623930 |
};
|
|
Packit Service |
623930 |
|
|
Packit Service |
623930 |
#endif
|