home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
x
/
x11p-13.zip
/
RCS
/
x11perf.h,v
< prev
next >
Wrap
Text File
|
1989-12-14
|
10KB
|
371 lines
head 2.5;
access ;
symbols pre-merge:2.0;
locks ; strict;
comment @ * @;
2.5
date 89.12.14.09.46.54; author joel; state Exp;
branches ;
next 2.4;
2.4
date 89.12.07.16.44.37; author joel; state Exp;
branches ;
next 2.3;
2.3
date 89.05.11.16.42.02; author joel; state Exp;
branches ;
next 2.2;
2.2
date 89.05.08.18.39.47; author joel; state Exp;
branches ;
next 2.1;
2.1
date 89.05.03.14.18.34; author joel; state Exp;
branches ;
next 2.0;
2.0
date 89.01.31.17.08.44; author erik; state Exp;
branches ;
next 1.4;
1.4
date 89.01.31.17.08.44; author joel; state Exp;
branches ;
next 1.3;
1.3
date 89.01.05.18.29.44; author joel; state Exp;
branches ;
next 1.2;
1.2
date 88.12.07.20.41.21; author joel; state Exp;
branches ;
next 1.1;
1.1
date 88.06.17.15.06.36; author joel; state Exp;
branches ;
next ;
desc
@@
2.5
log
@Added ``pack'' field, so rects can decide whether to space out rects or not
@
text
@/*****************************************************************************
Copyright 1988, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************************/
#ifndef VMS
#include <X11/Xlib.h>
#else
#include <decw$include/Xlib.h>
#endif
#ifndef NULL
#define NULL 0
#endif
#define POLY 1000 /* # (small) items in poly calls */
#define MAXROWS 40 /* Max rows of items in poly calls */
#define MAXCOLS 25 /* Max columns of items */
#define WIDTH 600 /* Size of large window to work within */
#define HEIGHT 600
#define CHILDSIZE 8 /* Size of children on windowing tests */
#define CHILDSPACE 4 /* Space between children */
typedef Bool (*InitProc) (/* XParms xp; Parms p */);
typedef void (*Proc) (/* XParms xp; Parms p */);
extern void NullProc (/* XParms xp; Parms p */);
extern Bool NullInitProc (/* XParms xp; Parms p */);
typedef struct _Parms {
/* Required fields */
int objects; /* Number of objects to process in one X call */
/* Optional fields. (Wouldn't object-oriented programming be nice ?) */
int special; /* Usually size of objects to paint */
char *font, *bfont;
int fillStyle; /* Solid, transparent stipple, opaque stipple, tile */
} ParmRec, *Parms;
typedef struct _XParms {
Display *d;
Window w;
GC fggc;
GC bggc;
unsigned long foreground;
unsigned long background;
Bool pack;
} XParmRec, *XParms;
typedef enum {
WINDOW, /* Windowing test, GXxor has no affect */
XOR, /* Graphics test, GXxor has some affect */
NONXOR /* Graphics or overhead test, GXxor has no affect */
} TestType;
typedef struct _Test {
char *option; /* Name to use in prompt line */
char *label; /* Fuller description of test */
InitProc init; /* Initialization procedure */
Proc proc; /* Timed benchmark procedure */
Proc passCleanup;/* Cleanup between repetitions of same test */
Proc cleanup; /* Cleanup after test */
TestType testType; /* Windowing, graphics, nonxor */
int clips; /* Number of obscuring windows to force clipping*/
ParmRec parms; /* Parameters passed to test procedures */
} Test;
extern Test test[];
extern int subs[];
#define ForEachTest(x) for (x = 0; test[x].option != NULL; x++)
/*****************************************************************************
About x11perf:
Many graphics benchmarks assume that the graphics device is used to display the
output of a single fancy graphics application, and that the user gets his work
done on some other device, like a terminal. Such benchmarks usually measure
drawing speed for lines, polygons, text, etc.
Since workstations are not used as standalone graphics engines, but as
super-terminals, x11perf measures window management performance as well as
traditional graphics performace. x11perf includes benchmarks for the time it
takes to create and map windows (as when you start up an application); to map a
pre-existing set of windows onto the screen (as when you deiconify an
application or pop up a menu); and to rearrange windows (as when you slosh
windows to and fro trying to find the one you want).
x11perf also measures graphics performance for operations not normally used in
standalone graphics displays, but are nonetheless used frequently by X
applications. Such operations include CopyPlane (used by the PostScript
previewer), scrolling (used in text windows), and various stipples and tiles
(used for CAD and half-toning, respectively).
x11perf DOES NOT attempt to whittle down measurements to a single ``HeXStones''
number. We consider such numbers to be uninformative at best and misleading at
worst. x11perf should be used to analyze particular strengths and weaknesses
of servers, and is most useful when used by a server writer who wants to
analyze and improve a server.
For repeatable results, x11perf should be run using a local connection on a
freshly-started server. The default configuration runs each test 5 times, in
order to see if each trial takes approximately the same amount of time.
Strange glitches should be examined; if non-repeatable I chalk them up to
daemons and network traffic. Each trial is run for 5 seconds, in order to
reduce random time differences. The number of objects processed per second is
displayed to 3 significant digits, but you'll be lucky on most UNIX system if
the numbers are actually consistent to 2 digits.
The current program is mostly the responsibility of Joel McCormack. It is
based upon the x11perf developed by Phil Karlton, Susan Angebranndt, and Chris
Kent, who wanted to assess performance differences between various servers.
Mary Walker, Todd Newman, and I added several tests in order to write and tune
the pmax (DECStation 3100) servers. For a general release to the world, I've
basically rewritten x11perf to ease making comparisons between widely varying
machines, to cover most important X functionality (the notable exception being
wide lines), and to exercise graphics operations in as many different
orientations and alignments as possible.
******************************************************************************/
@
2.4
log
@Changed interface to p->reps
@
text
@d66 1
@
2.3
log
@Parameters to all routines now (xp, p)
MAXROWS used in all routines
Junked most global communication variables
@
text
@d50 5
a54 3
int reps; /* required of all */
int objects; /* required of all */
int special;
d56 1
a56 1
int fillStyle; /* Solid, transparent stipple, or opqaque stipple? */
d68 6
d75 9
a83 9
char *option; /* Name to use in prompt line */
char *label; /* Fuller description of test */
InitProc init; /* Initialization procedure */
Proc proc; /* Timed benchmark procedure */
Proc passCleanup;/* Cleanup between repetitions of same test */
Proc cleanup; /* Cleanup after test */
Bool children; /* Windowing test for differing number of kids? */
int clips; /* Number of obscuring windows to force clipping */
ParmRec parms; /* Parameters passed to test procedures */
@
2.2
log
@# chars now in x11perf_tests.c table, rather than hardwired constant
@
text
@d1 23
d33 3
a35 2
#define POLY 1000 /* multiple of 25, please */
#define COLS 25
d37 2
a38 2
#define WIDTH 600 /* Size of large window to work within */
#define HEIGHT 600
d40 2
a41 2
#define CHILDSIZE 8 /* Size of children on windowing tests */
#define CHILDSPACE 4 /* Space between children */
d43 2
a44 2
typedef Bool (*InitProc) (/* Display *dpy; int numObjects */);
typedef void (*Proc) (/* Display *dpy; int numObjects */);
d46 2
a47 1
#define NullProc ((Proc)0)
d57 9
a79 1
extern Window root;
a80 2
extern int fgPixel, bgPixel;
d83 50
a132 1
extern void CreatePerfStuff(/* dpy, width, height, &w, &bggc, &fggc */);
@
2.1
log
@Massive changes, I'm not going to go into details.
@
text
@a10 1
#define CHARS 100 /* length of text strings */
@
2.0
log
@version from /usr/src/pmax
@
text
@d10 2
a11 2
#define POLY 1000 /* multiple of 25, please */
#define CHARS 100 /* length of text strings */
d13 2
a14 1
#define WIDTH 600
d17 2
a18 1
typedef void (*Proc)(/* Display *dpy; int numObjects */);
d20 3
d34 9
a42 9
char *option;
char *label;
Proc init;
Proc proc;
Proc passCleanup;
Proc cleanup;
Bool children;
Bool doit;
ParmRec parms;
@
1.4
log
@Added -fg -bg capabilities
@
text
@@
1.3
log
@Changed stipple boolean in parameters to fillStyle selection
@
text
@d44 2
d48 1
a48 1
extern void CreatePerfStuff(/* dpy, width, height, &w, &whitegc, &blackgc */);
@
1.2
log
@stipple field added to param record
@
text
@d25 1
a25 1
int stipple; /* Do stipple? */
@
1.1
log
@Initial revision
@
text
@d21 3
a23 3
int reps; /* required of all */
int objects; /* required of all */
int special;
d25 1
@