4c221b0da1816acf2ca302b10092df059484468dvboxsync/*
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Copyright 2002 Red Hat Inc., Durham, North Carolina.
4c221b0da1816acf2ca302b10092df059484468dvboxsync *
4c221b0da1816acf2ca302b10092df059484468dvboxsync * All Rights Reserved.
4c221b0da1816acf2ca302b10092df059484468dvboxsync *
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Permission is hereby granted, free of charge, to any person obtaining
4c221b0da1816acf2ca302b10092df059484468dvboxsync * a copy of this software and associated documentation files (the
4c221b0da1816acf2ca302b10092df059484468dvboxsync * "Software"), to deal in the Software without restriction, including
4c221b0da1816acf2ca302b10092df059484468dvboxsync * without limitation on the rights to use, copy, modify, merge,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * and to permit persons to whom the Software is furnished to do so,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * subject to the following conditions:
4c221b0da1816acf2ca302b10092df059484468dvboxsync *
4c221b0da1816acf2ca302b10092df059484468dvboxsync * The above copyright notice and this permission notice (including the
4c221b0da1816acf2ca302b10092df059484468dvboxsync * next paragraph) shall be included in all copies or substantial
4c221b0da1816acf2ca302b10092df059484468dvboxsync * portions of the Software.
4c221b0da1816acf2ca302b10092df059484468dvboxsync *
4c221b0da1816acf2ca302b10092df059484468dvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4c221b0da1816acf2ca302b10092df059484468dvboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4c221b0da1816acf2ca302b10092df059484468dvboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
4c221b0da1816acf2ca302b10092df059484468dvboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
4c221b0da1816acf2ca302b10092df059484468dvboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
4c221b0da1816acf2ca302b10092df059484468dvboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4c221b0da1816acf2ca302b10092df059484468dvboxsync * SOFTWARE.
4c221b0da1816acf2ca302b10092df059484468dvboxsync */
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsync/*
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Authors:
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
4c221b0da1816acf2ca302b10092df059484468dvboxsync *
4c221b0da1816acf2ca302b10092df059484468dvboxsync */
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsync/** \file
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Interface for statistic gathering interface. \see dmxstat.c */
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsync#ifndef _DMXSTAT_H_
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define _DMXSTAT_H_
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define DMX_STAT_LENGTH 10 /**< number of events for moving average */
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define DMX_STAT_INTERVAL 1000 /**< msec between printouts */
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define DMX_STAT_BINS 3 /**< number of bins */
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define DMX_STAT_BIN0 10000 /**< us for bin[0] */
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define DMX_STAT_BINMULT 100 /**< multiplier for next bin[] */
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern int dmxStatInterval; /**< Only for dmxstat.c and dmxsync.c */
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern void dmxStatActivate(const char *interval, const char *displays);
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern DMXStatInfo *dmxStatAlloc(void);
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern void dmxStatFree(DMXStatInfo *);
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern void dmxStatInit(void);
4c221b0da1816acf2ca302b10092df059484468dvboxsyncextern void dmxStatSync(DMXScreenInfo *dmxScreen,
4c221b0da1816acf2ca302b10092df059484468dvboxsync struct timeval *stop, struct timeval *start,
4c221b0da1816acf2ca302b10092df059484468dvboxsync unsigned long pending);
4c221b0da1816acf2ca302b10092df059484468dvboxsync
4c221b0da1816acf2ca302b10092df059484468dvboxsync#endif