/****************************************************************** 
 *
 * const.h --
 *
 *     Constants and definitions (including those created
 *     by autoconf in config.h)
 *
 *
 * Created: 7 June 1998
 * $Author: mstoufer $
 * $Date: 2000/12/05 19:52:32 $
 * $Id: const.h,v 1.1.1.1 2000/12/05 19:52:32 mstoufer Exp $
 *
 *
 ****************************************************************** 
 */
#ifndef NLV_CONST_INCLUDED
#define NLV_CONST_INCLUDED

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#define NLV_TM_TO_SEC 1000000.0   /* Divide by this to convert times to seconds */
#define NLV_IDSTR_SEP   "&"       /* Field separator for concat-ted ID strings */
#define NLV_TICKLABELWIDTH 30     /* Max. width of a graph tick label (string) */
#define NLV_MAX_KS_CLIENTS 1024   /* Maximum number of clients at 1 time per-keyset */
#define NLV_MAX_POINTS 31         /* Maximum # of points in a graphed line */
#define NLV_MAX_ELEMENTS 4000     /* Maximum number of elements on-screen, per-type */
#define NLV_MAX_COLORS 64         /* Maximum number of colors for elements at 1 time */
#define NLV_BUFLINE 500           /* Maximum # of lines buffered on window redraw */
#define NLV_MAX_KEYSETS 64        /* Maximum number of sets of keys, or "events" */
#define NLV_MAX_CLIENTS (NLV_MAX_KS_CLIENTS)*(NLV_MAX_KEYSETS) /* Total max clients */
#define NLV_MAX_FORMULA 32        /* Maximum # of formulas per keyset */
#define NLV_NUM_ELEMENT_TYPES 2   /* Number of types of elements (line/point) */
#define NLV_NOTYPE 0              /* Element type = none */
#define NLV_LINE   0              /* Element type = line */
#define NLV_POINT  1              /* Element type = point */
#define NLV_LOAD   2              /* Element type = load */
#define NLV_USEC_FLD "NL.USEC"    /* Hardcoded NetLogger field name */
#define NLV_SEC_FLD "NL.SEC"      /* Hardcoded NetLogger field name */
#define NLV_EVNT_FLD "NL.EVNT"    /* Hardcoded NetLogger field name */
#define NLV_MAXLINE 1024          /* Maximum # of characters in a single log line */
#define NLV_NUM_THREADS 2         /* Sun needs to know how many threads are running */
#define NLV_MAX_BACKWARDS -200000 /* Max amount of seconds out-of-order for events */ 
#define NLV_EXTRA_LEFT 0.5        /* Extra amount of window to look to left on refresh */
#define NLV_EXTRA_RIGHT 0.5       /* Extra amount of window to look to right on refresh */
#define NLV_EXTRA_FORWARD 0.5     /* Extra win amt. to look forwards for data */
#define NLV_INDEX_USLEEP 1000     /* usecs for indexer to sleep between iterations */
#define NLV_SYM_LENGTH 32         /* symbol string length, max */
#define NLV_SKIP_WIN 3            /* Number of windows of empty space to trigger a skip */
#define NLV_SPIN_LENGTH 100000    /* # microseconds to wait before looking for new data */
#define LATENCY_STR "LATENCY"
#define THROUGHPUT_STR "THROUGHPUT"
#define NLV_NOT_DRAWN -2          /* Code meaning no line/point was drawn */
#define NLV_RESCALE_SLOP 0.05     /* Additional fraction to expand by on rescale */
#define NLV_SCALE_COMPRESS 0.8    /* Fraction to compress scaled elements on the screen */
#define NLV_EPSILON 1E-6          /* Good enough for government! */
#endif
