Xmark revision 264fa531
1264fa531Smrg#! /bin/sh 2264fa531Smrg#$Xorg: Xmark.sh,v 1.3 2000/08/17 19:54:08 cpqbld Exp $ 3264fa531Smrg#XPC Header: Xmark,v 1.15 93/04/12 10:10:07 hmgr Exp 4264fa531Smrg# 5264fa531Smrg############################################################ 6264fa531Smrg# Xmark version XPC Revision: 1.15 7264fa531Smrg# 8264fa531Smrg# Usage: Xmark datafile 9264fa531Smrg# 10264fa531Smrg############################################################ 11264fa531Smrg# $XFree86: xc/programs/x11perf/Xmark.sh,v 1.2 1997/01/04 12:20:20 dawes Exp $ 12264fa531Smrg# 13264fa531Smrg# 14264fa531Smrg# CHANGE HISTORY: 15264fa531Smrg# 16264fa531Smrg# X11perfcompDR -- Creates a Digital Review compatible breakdown of 17264fa531Smrg# x11perf v1.2 results as described in "Take Your Pick Of Graphics" 18264fa531Smrg# by John Montgomery, Digital Review, May 7th, 1990, Page 44. 19264fa531Smrg# 8/30/90 v1.0 program created by Lonnie Mandigo 20264fa531Smrg# 1/18/91 Modification by Lonnie Mandigo 21264fa531Smrg# Fixed a bug to include UCIRC in data. 22264fa531Smrg# 2/5/91 Modification by Lonnie Mandigo 23264fa531Smrg# Now removes sum.tmp file when finished. 24264fa531Smrg# 3/18/91 v1.01 Increased resolution to handle zero ratios. 25264fa531Smrg# Minor aesethic cleanups and better error handling. 26264fa531Smrg# Lonnie Mandigo and Jason Levitt (jason@cs.utexas.edu) 27264fa531Smrg# 3/4/93 Converted to Xmark by Bob Kuseski 28264fa531Smrg# to produce a single number representing the ratio between 29264fa531Smrg# the xpc weighted averages of the output from x11perf Rev 1.3 30264fa531Smrg# for the server under test and a SparcStation 1 31264fa531Smrg# 3/10/93 Changed to produce THREE output numbers and added bounds 32264fa531Smrg# checking of input data. 33264fa531Smrg# 3/15/93 Removed usage of '-F' in grep for compatibility reasons 34264fa531Smrg# 3/16/93 Corrected usage of substr() and used two greps versus fgrep 35264fa531Smrg# 4/12/93 Eliminated use of functions and \n in echo 36264fa531Smrg# 37264fa531Smrg############################################################ 38264fa531Smrg# Copyright (c) 1993 by Hewlett-Packard Company 39264fa531Smrg# 40264fa531Smrg# Permission to use, copy, modify, and distribute this software and its 41264fa531Smrg# documentation for any purpose and without fee is hereby granted, 42264fa531Smrg# provided that the above copyright notice appear in all copies and that 43264fa531Smrg# both the copyright notice and this permission notice appear in 44264fa531Smrg# supporting documentation, and that the name of Hewlett-Packard not be 45264fa531Smrg# used in advertising or publicity pertaining to distribution of the 46264fa531Smrg# software without specific, written prior permission. 47264fa531Smrg# 48264fa531Smrg############################################################ 49264fa531Smrg# Instructions: 50264fa531Smrg# 51264fa531Smrg# Usage: Xmark datafile 52264fa531Smrg# 53264fa531Smrg# where: 'datafile' is created by running x11perf Rev 1.3 54264fa531Smrg# with the flags below: 55264fa531Smrg# 56264fa531Smrg# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy GXxor -all > datafile 57264fa531Smrg# or 58264fa531Smrg# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy -all > datafile 59264fa531Smrg# x11perf -display mysystem:0.0 -v1.3 -rop GXxor -all >> datafile 60264fa531Smrg# or 61264fa531Smrg# x11perf -display mysystem:0.0 -v1.3 -rop GXxor -all > datafile 62264fa531Smrg# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy -all >> datafile 63264fa531Smrg# 64264fa531Smrg# Xmark summarizes the results relative to the data contained in 65264fa531Smrg# the datafile. Xmark writes to standard out, so if you want to 66264fa531Smrg# capture the output in a file, use: 67264fa531Smrg# 68264fa531Smrg# Xmark datafile > output.comp 69264fa531Smrg# 70264fa531Smrg# The 'output.comp' contains THREE numbers: 71264fa531Smrg# - Weighted x11perf number of the server under test 72264fa531Smrg# - Weighted x11perf number of the SparcStation 1 73264fa531Smrg# - Xmark = the ratio of the above two numbers 74264fa531Smrg# 75264fa531Smrg# Note the SparcStation 1 number comes from a: 76264fa531Smrg# X11R5 Xsun 77264fa531Smrg# Standard with SunOS 4.1.2 78264fa531Smrg# SunOs 4.1.2 79264fa531Smrg# CG3 dumb Color Frame Buffer 80264fa531Smrg# 81264fa531Smrg############################################################ 82264fa531Smrg############################################################ 83264fa531Smrg 84264fa531Smrg# Cleanup on interrupt 85264fa531Smrgtrap \ 86264fa531Smrg"echo Interrupt: removing temporary files. >& 2 ;rm -f temp.$$ rates.$$ awkfile.$$; exit 1" 1 2 3 9 15 87264fa531Smrg 88264fa531Smrg# Must have only one file specified 89264fa531Smrgif [ "$#" -ne 1 ] 90264fa531Smrgthen 91264fa531Smrg echo "Usage: $0 datafile" >& 2 92264fa531Smrg exit 1 93264fa531Smrgfi 94264fa531Smrg 95264fa531Smrg# Must be an ordinary file 96264fa531Smrgif [ ! -f "$1" ] 97264fa531Smrgthen 98264fa531Smrg echo "Error: data file does not exist or is not ordinary." >& 2 99264fa531Smrg exit 1 100264fa531Smrgfi 101264fa531Smrg 102264fa531Smrg# See if the date file has the correct number of results. 103264fa531SmrgLC1=`grep trep "$1" | wc -l` 104264fa531SmrgLC2=441 # Number of test without Shared Memory Transport 105264fa531SmrgLC3=447 # Number of test with Shared Memory Transport 106264fa531Smrg 107264fa531Smrgif [ "$LC1" -ne "$LC2" ] && [ "$LC1" -ne "$LC3" ] 108264fa531Smrgthen 109264fa531Smrg echo "WARNING: datafile contains $LC1, not "$LC2" or "$LC3" 'trep' results;" >& 2 110264fa531Smrg if [ "$LC1" -gt "$LC2" ] 111264fa531Smrg then 112264fa531Smrg echo "extra results are probably OK." >& 2 113264fa531Smrg echo "" 114264fa531Smrg fi 115264fa531Smrgfi 116264fa531Smrg 117264fa531SmrgDATA=$1 118264fa531Smrg 119264fa531Smrggrep trep $DATA > temp.$$ 120264fa531Smrggrep server $DATA >> temp.$$ 121264fa531Smrg 122264fa531Smrg# convert the averages to standard form. 123264fa531Smrg 124264fa531Smrgcat > awkfile.$$ <<'EOS' 125264fa531Smrg BEGIN { 126264fa531Smrg weight["10x10 rectangle"] = 37; 127264fa531Smrg weight["Scroll 500x500 pixels"] = 33; 128264fa531Smrg weight["100x100 rectangle"] = 32; 129264fa531Smrg weight["10-pixel line segment"] = 31; 130264fa531Smrg weight["10-pixel line"] = 30; 131264fa531Smrg weight["PutImage 100x100 square"] = 30; 132264fa531Smrg weight["Scroll 100x100 pixels"] = 29; 133264fa531Smrg weight["PutImage 500x500 square"] = 29; 134264fa531Smrg weight["500x500 rectangle"] = 29; 135264fa531Smrg weight["100-pixel line"] = 28; 136264fa531Smrg weight["Char in 60-char line (9x15)"] = 28; 137264fa531Smrg weight["Char in 80-char image line (6x13)"] = 28; 138264fa531Smrg weight["Char in 80-char line (6x13)"] = 27; 139264fa531Smrg weight["Char in 80-char image line (TR 10)"] = 27; 140264fa531Smrg weight["100-pixel line segment"] = 27; 141264fa531Smrg weight["Char in 80-char line (TR 10)"] = 27; 142264fa531Smrg weight["Char in 60-char image line (9x15)"] = 26; 143264fa531Smrg weight["Copy 100x100 from pixmap to window"] = 26; 144264fa531Smrg weight["Copy 500x500 from pixmap to window"] = 26; 145264fa531Smrg weight["Char in 70-char line (8x13)"] = 24; 146264fa531Smrg weight["500-pixel line"] = 24; 147264fa531Smrg weight["Char in 20/40/20 line (6x13, TR 10)"] = 23; 148264fa531Smrg weight["Char in 70-char image line (8x13)"] = 23; 149264fa531Smrg weight["Change graphics context"] = 23; 150264fa531Smrg weight["Copy 100x100 from window to window"] = 23; 151264fa531Smrg weight["10-pixel horizontal line segment"] = 23; 152264fa531Smrg weight["10-pixel vertical line segment"] = 23; 153264fa531Smrg weight["Copy 500x500 from window to window"] = 22; 154264fa531Smrg weight["Char in 30-char line (TR 24)"] = 22; 155264fa531Smrg weight["Char16 in 40-char line (k14)"] = 22; 156264fa531Smrg weight["500-pixel line segment"] = 22; 157264fa531Smrg weight["Char in 30-char image line (TR 24)"] = 22; 158264fa531Smrg weight["100-pixel horizontal line segment"] = 22; 159264fa531Smrg weight["100-pixel vertical line segment"] = 22; 160264fa531Smrg weight["Scroll 10x10 pixels"] = 21; 161264fa531Smrg weight["Char16 in 40-char image line (k14)"] = 21; 162264fa531Smrg weight["GetImage 500x500 square"] = 21; 163264fa531Smrg weight["PutImage 10x10 square"] = 20; 164264fa531Smrg weight["GetImage 100x100 square"] = 20; 165264fa531Smrg weight["Move window (4 kids)"] = 20; 166264fa531Smrg weight["Copy 10x10 from pixmap to window"] = 20; 167264fa531Smrg weight["100x100 4x4 tiled rectangle"] = 20; 168264fa531Smrg weight["Copy 100x100 from window to pixmap"] = 19; 169264fa531Smrg weight["Hide/expose window via popup (4 kids)"] = 19; 170264fa531Smrg weight["Copy 500x500 from window to pixmap"] = 19; 171264fa531Smrg weight["500-pixel horizontal line segment"] = 19; 172264fa531Smrg weight["500-pixel vertical line segment"] = 19; 173264fa531Smrg weight["Fill 10x10 equivalent triangle"] = 19; 174264fa531Smrg weight["Char16 in 23-char line (k24)"] = 19; 175264fa531Smrg weight["1x1 rectangle"] = 19; 176264fa531Smrg weight["Char16 in 7/14/7 line (k14, k24)"] = 18; 177264fa531Smrg weight["10x10 4x4 tiled rectangle"] = 18; 178264fa531Smrg weight["100-pixel line segment (1 kid)"] = 18; 179264fa531Smrg weight["100x100 rectangle outline"] = 18; 180264fa531Smrg weight["Move window via parent (4 kids)"] = 18; 181264fa531Smrg weight["GetAtomName"] = 18; 182264fa531Smrg weight["GetProperty"] = 18; 183264fa531Smrg weight["Char16 in 23-char image line (k24)"] = 18; 184264fa531Smrg weight["100-pixel line segment (3 kids)"] = 17; 185264fa531Smrg weight["Resize window (4 kids)"] = 17; 186264fa531Smrg weight["Map window via parent (4 kids)"] = 17; 187264fa531Smrg weight["Copy 100x100 from pixmap to pixmap"] = 17; 188264fa531Smrg weight["Unmap window via parent (4 kids)"] = 17; 189264fa531Smrg weight["100-pixel line segment (2 kids)"] = 17; 190264fa531Smrg weight["10-pixel solid circle"] = 17; 191264fa531Smrg weight["1-pixel line"] = 17; 192264fa531Smrg weight["Move window (16 kids)"] = 16; 193264fa531Smrg weight["Fill 100x100 equivalent triangle"] = 16; 194264fa531Smrg weight["Hide/expose window via popup (16 kids)"] = 16; 195264fa531Smrg weight["Move window via parent (16 kids)"] = 16; 196264fa531Smrg weight["10x10 rectangle outline"] = 16; 197264fa531Smrg weight["Destroy window via parent (4 kids)"] = 16; 198264fa531Smrg weight["Create unmapped window (4 kids)"] = 16; 199264fa531Smrg weight["Copy 10x10 from window to window"] = 16; 200264fa531Smrg weight["Copy 100x100 1-bit deep plane"] = 16; 201264fa531Smrg weight["10-pixel circle"] = 16; 202264fa531Smrg weight["100x100 opaque stippled rectangle"] = 16; 203264fa531Smrg weight["500x500 4x4 tiled rectangle"] = 16; 204264fa531Smrg weight["100x100 stippled rectangle"] = 16; 205264fa531Smrg weight["Copy 500x500 from pixmap to pixmap"] = 16; 206264fa531Smrg weight["Create and map subwindows (16 kids)"] = 16; 207264fa531Smrg weight["10x10 stippled rectangle"] = 16; 208264fa531Smrg weight["Resize window (16 kids)"] = 16; 209264fa531Smrg weight["Map window via parent (16 kids)"] = 15; 210264fa531Smrg weight["100-pixel solid circle"] = 15; 211264fa531Smrg weight["Copy 500x500 1-bit deep plane"] = 15; 212264fa531Smrg weight["500x500 rectangle outline"] = 15; 213264fa531Smrg weight["Create and map subwindows (4 kids)"] = 15; 214264fa531Smrg weight["Destroy window via parent (16 kids)"] = 15; 215264fa531Smrg weight["10x1 wide horizontal line segment"] = 15; 216264fa531Smrg weight["10x1 wide vertical line segment"] = 15; 217264fa531Smrg weight["100x100 161x145 tiled rectangle"] = 15; 218264fa531Smrg weight["1-pixel line segment"] = 15; 219264fa531Smrg weight["Unmap window via parent (16 kids)"] = 15; 220264fa531Smrg weight["Fill 100x100 trapezoid"] = 14; 221264fa531Smrg weight["100-pixel circle"] = 14; 222264fa531Smrg weight["10x10 opaque stippled rectangle"] = 14; 223264fa531Smrg weight["100-pixel dashed line"] = 14; 224264fa531Smrg weight["500x500 161x145 tiled rectangle"] = 14; 225264fa531Smrg weight["Copy 10x10 from window to pixmap"] = 14; 226264fa531Smrg weight["100x10 wide horizontal line segment"] = 14; 227264fa531Smrg weight["100x10 wide vertical line segment"] = 14; 228264fa531Smrg weight["100x100 wide rectangle outline"] = 14; 229264fa531Smrg weight["100x100 216x208 tiled rectangle"] = 14; 230264fa531Smrg weight["Dot"] = 14; 231264fa531Smrg weight["10x10 161x145 tiled rectangle"] = 14; 232264fa531Smrg weight["Fill 100x100 equivalent complex polygons"] = 14; 233264fa531Smrg weight["Move window (50 kids)"] = 13; 234264fa531Smrg weight["Move window via parent (50 kids)"] = 13; 235264fa531Smrg weight["Circulate window (16 kids)"] = 13; 236264fa531Smrg weight["100-pixel dashed segment"] = 13; 237264fa531Smrg weight["Create and map subwindows (50 kids)"] = 13; 238264fa531Smrg weight["Create and map subwindows (25 kids)"] = 13; 239264fa531Smrg weight["10x10 wide rectangle outline"] = 13; 240264fa531Smrg weight["500x500 216x208 tiled rectangle"] = 13; 241264fa531Smrg weight["Hide/expose window via popup (25 kids)"] = 13; 242264fa531Smrg weight["Create and map subwindows (100 kids)"] = 13; 243264fa531Smrg weight["Map window via parent (50 kids)"] = 13; 244264fa531Smrg weight["Fill 10x10 trapezoid"] = 13; 245264fa531Smrg weight["100x10 wide line"] = 13; 246264fa531Smrg weight["10x10 216x208 tiled rectangle"] = 13; 247264fa531Smrg weight["10-pixel dashed line"] = 13; 248264fa531Smrg weight["Map window via parent (100 kids)"] = 13; 249264fa531Smrg weight["Copy 10x10 from pixmap to pixmap"] = 13; 250264fa531Smrg weight["Map window via parent (25 kids)"] = 13; 251264fa531Smrg weight["Create unmapped window (25 kids)"] = 13; 252264fa531Smrg weight["Move window (25 kids)"] = 13; 253264fa531Smrg weight["Circulate window (4 kids)"] = 12; 254264fa531Smrg weight["Move window via parent (25 kids)"] = 12; 255264fa531Smrg weight["Create unmapped window (16 kids)"] = 12; 256264fa531Smrg weight["Create and map subwindows (75 kids)"] = 12; 257264fa531Smrg weight["500x500 opaque stippled rectangle"] = 12; 258264fa531Smrg weight["Hide/expose window via popup (100 kids)"] = 12; 259264fa531Smrg weight["Create and map subwindows (200 kids)"] = 12; 260264fa531Smrg weight["Hide/expose window via popup (50 kids)"] = 12; 261264fa531Smrg weight["500x50 wide horizontal line segment"] = 12; 262264fa531Smrg weight["500x50 wide vertical line segment"] = 12; 263264fa531Smrg weight["100x100 161x145 opaque stippled rectangle"] = 12; 264264fa531Smrg weight["Resize window (25 kids)"] = 12; 265264fa531Smrg weight["Map window via parent (200 kids)"] = 12; 266264fa531Smrg weight["10x10 161x145 opaque stippled rectangle"] = 12; 267264fa531Smrg weight["X protocol NoOperation"] = 12; 268264fa531Smrg weight["10-pixel dashed segment"] = 12; 269264fa531Smrg weight["Resize unmapped window (16 kids)"] = 12; 270264fa531Smrg weight["Create unmapped window (100 kids)"] = 12; 271264fa531Smrg weight["Fill 10x10 equivalent complex polygon"] = 12; 272264fa531Smrg weight["Map window via parent (75 kids)"] = 12; 273264fa531Smrg weight["100x100 161x145 stippled rectangle"] = 12; 274264fa531Smrg weight["Moved unmapped window (16 kids)"] = 12; 275264fa531Smrg weight["Copy 10x10 1-bit deep plane"] = 12; 276264fa531Smrg weight["Unmap window via parent (50 kids)"] = 12; 277264fa531Smrg weight["GetImage 10x10 square"] = 12; 278264fa531Smrg weight["Fill 100x100 tiled trapezoid"] = 12; 279264fa531Smrg weight["500x500 wide rectangle outline"] = 12; 280264fa531Smrg weight["Fill 100x100 stippled trapezoid"] = 12; 281264fa531Smrg weight["500x500 stippled rectangle"] = 12; 282264fa531Smrg weight["Moved unmapped window (4 kids)"] = 12; 283264fa531Smrg weight["10x10 161x145 stippled rectangle"] = 12; 284264fa531Smrg weight["Unmap window via parent (25 kids)"] = 12; 285264fa531Smrg weight["500-pixel solid circle"] = 12; 286264fa531Smrg weight["Create unmapped window (50 kids)"] = 12; 287264fa531Smrg weight["Destroy window via parent (25 kids)"] = 11; 288264fa531Smrg weight["Resize window (200 kids)"] = 11; 289264fa531Smrg weight["100-pixel filled ellipse"] = 11; 290264fa531Smrg weight["Hide/expose window via popup (200 kids)"] = 11; 291264fa531Smrg weight["Unmap window via parent (100 kids)"] = 11; 292264fa531Smrg weight["Circulate window (25 kids)"] = 11; 293264fa531Smrg weight["Resize window (50 kids)"] = 11; 294264fa531Smrg weight["Hide/expose window via popup (75 kids)"] = 11; 295264fa531Smrg weight["Destroy window via parent (100 kids)"] = 11; 296264fa531Smrg weight["Destroy window via parent (50 kids)"] = 11; 297264fa531Smrg weight["Create unmapped window (200 kids)"] = 11; 298264fa531Smrg weight["Fill 100x100 opaque stippled trapezoid"] = 11; 299264fa531Smrg weight["Move window via parent (75 kids)"] = 11; 300264fa531Smrg weight["500-pixel filled ellipse"] = 11; 301264fa531Smrg weight["Resize unmapped window (4 kids)"] = 11; 302264fa531Smrg weight["Move window via parent (200 kids)"] = 11; 303264fa531Smrg weight["Move window (75 kids)"] = 11; 304264fa531Smrg weight["Fill 10x10 tiled trapezoid"] = 11; 305264fa531Smrg weight["Fill 100x100 161x145 stippled trapezoid"] = 11; 306264fa531Smrg weight["Move window (200 kids)"] = 11; 307264fa531Smrg weight["Fill 10x10 stippled trapezoid"] = 11; 308264fa531Smrg weight["Create unmapped window (75 kids)"] = 11; 309264fa531Smrg weight["100-pixel fill chord partial circle"] = 10; 310264fa531Smrg weight["Circulate Unmapped window (16 kids)"] = 10; 311264fa531Smrg weight["Circulate window (50 kids)"] = 10; 312264fa531Smrg weight["Move window (100 kids)"] = 10; 313264fa531Smrg weight["Circulate window (100 kids)"] = 10; 314264fa531Smrg weight["Move window via parent (100 kids)"] = 10; 315264fa531Smrg weight["500x50 wide line"] = 10; 316264fa531Smrg weight["500-pixel circle"] = 10; 317264fa531Smrg weight["100-pixel double-dashed line"] = 10; 318264fa531Smrg weight["Unmap window via parent (200 kids)"] = 10; 319264fa531Smrg weight["Moved unmapped window (50 kids)"] = 10; 320264fa531Smrg weight["10-pixel filled ellipse"] = 10; 321264fa531Smrg weight["Resize window (75 kids)"] = 10; 322264fa531Smrg weight["Fill 100x100 161x145 tiled trapezoid"] = 10; 323264fa531Smrg weight["500x500 161x145 opaque stippled rectangle"] = 10; 324264fa531Smrg weight["Fill 100x100 161x145 opaque stippled trapezoid"] = 10; 325264fa531Smrg weight["Unmap window via parent (75 kids)"] = 10; 326264fa531Smrg weight["Resize unmapped window (25 kids)"] = 10; 327264fa531Smrg weight["100-pixel ellipse"] = 10; 328264fa531Smrg weight["Destroy window via parent (75 kids)"] = 10; 329264fa531Smrg weight["Fill 1x1 equivalent triangle"] = 10; 330264fa531Smrg weight["500-pixel ellipse"] = 10; 331264fa531Smrg weight["Fill 10x10 opaque stippled trapezoid"] = 10; 332264fa531Smrg weight["Resize window (100 kids)"] = 10; 333264fa531Smrg weight["500x500 161x145 stippled rectangle"] = 10; 334264fa531Smrg weight["Destroy window via parent (200 kids)"] = 10; 335264fa531Smrg weight["100-pixel fill slice partial circle"] = 10; 336264fa531Smrg weight["Fill 100x100 216x208 tiled trapezoid"] = 9; 337264fa531Smrg weight["100-pixel wide circle"] = 9; 338264fa531Smrg weight["Moved unmapped window (25 kids)"] = 9; 339264fa531Smrg weight["10x1 wide line"] = 9; 340264fa531Smrg weight["Resize unmapped window (100 kids)"] = 9; 341264fa531Smrg weight["100-pixel double-dashed segment"] = 9; 342264fa531Smrg weight["10-pixel fill chord partial circle"] = 9; 343264fa531Smrg weight["Circulate window (75 kids)"] = 9; 344264fa531Smrg weight["100-pixel partial circle"] = 9; 345264fa531Smrg weight["Circulate window (200 kids)"] = 9; 346264fa531Smrg weight["Fill 10x10 161x145 stippled trapezoid"] = 9; 347264fa531Smrg weight["Circulate Unmapped window (4 kids)"] = 9; 348264fa531Smrg weight["100-pixel dashed circle"] = 9; 349264fa531Smrg weight["Circulate Unmapped window (25 kids)"] = 9; 350264fa531Smrg weight["10-pixel ellipse"] = 9; 351264fa531Smrg weight["Resize unmapped window (50 kids)"] = 9; 352264fa531Smrg weight["100-pixel partial ellipse"] = 9; 353264fa531Smrg weight["Fill 10x10 161x145 tiled trapezoid"] = 8; 354264fa531Smrg weight["100x10 wide dashed line"] = 8; 355264fa531Smrg weight["10-pixel partial circle"] = 8; 356264fa531Smrg weight["100-pixel wide ellipse"] = 8; 357264fa531Smrg weight["Fill 10x10 161x145 opaque stippled trapezoid"] = 8; 358264fa531Smrg weight["100-pixel wide partial circle"] = 8; 359264fa531Smrg weight["Moved unmapped window (75 kids)"] = 8; 360264fa531Smrg weight["Resize unmapped window (75 kids)"] = 8; 361264fa531Smrg weight["Circulate Unmapped window (100 kids)"] = 8; 362264fa531Smrg weight["100-pixel fill slice partial ellipse"] = 8; 363264fa531Smrg weight["100x10 wide double-dashed line"] = 8; 364264fa531Smrg weight["10-pixel fill slice partial circle"] = 8; 365264fa531Smrg weight["100-pixel dashed ellipse"] = 8; 366264fa531Smrg weight["100-pixel fill chord partial ellipse"] = 8; 367264fa531Smrg weight["100-pixel wide dashed circle"] = 8; 368264fa531Smrg weight["100-pixel double-dashed circle"] = 8; 369264fa531Smrg weight["Fill 10x10 216x208 tiled trapezoid"] = 7; 370264fa531Smrg weight["Moved unmapped window (100 kids)"] = 7; 371264fa531Smrg weight["10-pixel wide circle"] = 7; 372264fa531Smrg weight["Moved unmapped window (200 kids)"] = 7; 373264fa531Smrg weight["Resize unmapped window (200 kids)"] = 7; 374264fa531Smrg weight["Circulate Unmapped window (50 kids)"] = 7; 375264fa531Smrg weight["1-pixel circle"] = 7; 376264fa531Smrg weight["10-pixel partial ellipse"] = 7; 377264fa531Smrg weight["500-pixel wide circle"] = 7; 378264fa531Smrg weight["500-pixel wide ellipse"] = 7; 379264fa531Smrg weight["100-pixel wide partial ellipse"] = 7; 380264fa531Smrg weight["Circulate Unmapped window (75 kids)"] = 7; 381264fa531Smrg weight["100-pixel wide dashed ellipse"] = 7; 382264fa531Smrg weight["100-pixel double-dashed ellipse"] = 7; 383264fa531Smrg weight["10-pixel wide ellipse"] = 6; 384264fa531Smrg weight["10-pixel wide partial circle"] = 6; 385264fa531Smrg weight["1-pixel solid circle"] = 6; 386264fa531Smrg weight["100-pixel wide double-dashed circle"] = 6; 387264fa531Smrg weight["Circulate Unmapped window (200 kids)"] = 6; 388264fa531Smrg weight["1x1 4x4 tiled rectangle"] = 6; 389264fa531Smrg weight["10-pixel wide partial ellipse"] = 6; 390264fa531Smrg weight["10-pixel fill chord partial ellipse"] = 6; 391264fa531Smrg weight["10-pixel fill slice partial ellipse"] = 6; 392264fa531Smrg weight["100-pixel wide double-dashed ellipse"] = 5; 393264fa531Smrg weight["1x1 161x145 tiled rectangle"] = 5; 394264fa531Smrg weight["1x1 216x208 tiled rectangle"] = 5; 395264fa531Smrg weight["1x1 stippled rectangle"] = 5; 396264fa531Smrg weight["1x1 opaque stippled rectangle"] = 4; 397264fa531Smrg weight["1x1 161x145 opaque stippled rectangle"] = 4; 398264fa531Smrg weight["1x1 161x145 stippled rectangle"] = 4; 399264fa531Smrg weight["ShmPutImage 10x10 square"] = 0; 400264fa531Smrg weight["ShmPutImage 100x100 square"] = 0; 401264fa531Smrg weight["ShmPutImage 500x500 square"] = 0; 402264fa531Smrg weight["(xor) 100-pixel line"] = 16; 403264fa531Smrg weight["(xor) 10-pixel line segment"] = 14; 404264fa531Smrg weight["(xor) 10-pixel line"] = 13; 405264fa531Smrg weight["(xor) 100-pixel line segment"] = 13; 406264fa531Smrg weight["(xor) 500-pixel line segment"] = 13; 407264fa531Smrg weight["(xor) 500-pixel line"] = 12; 408264fa531Smrg weight["(xor) 10x10 rectangle"] = 12; 409264fa531Smrg weight["(xor) 100x100 rectangle"] = 12; 410264fa531Smrg weight["(xor) 100-pixel vertical line segment"] = 10; 411264fa531Smrg weight["(xor) 100x100 rectangle outline"] = 10; 412264fa531Smrg weight["(xor) 100-pixel horizontal line segment"] = 10; 413264fa531Smrg weight["(xor) 10-pixel vertical line segment"] = 10; 414264fa531Smrg weight["(xor) 100-pixel line segment (2 kids)"] = 10; 415264fa531Smrg weight["(xor) 10-pixel horizontal line segment"] = 10; 416264fa531Smrg weight["(xor) 100-pixel line segment (1 kid)"] = 9; 417264fa531Smrg weight["(xor) Char in 80-char line (6x13)"] = 9; 418264fa531Smrg weight["(xor) 500-pixel vertical line segment"] = 9; 419264fa531Smrg weight["(xor) Copy 100x100 from pixmap to window"] = 9; 420264fa531Smrg weight["(xor) 10x10 rectangle outline"] = 9; 421264fa531Smrg weight["(xor) 500-pixel horizontal line segment"] = 9; 422264fa531Smrg weight["(xor) 100-pixel line segment (3 kids)"] = 9; 423264fa531Smrg weight["(xor) PutImage 100x100 square"] = 9; 424264fa531Smrg weight["(xor) 500x500 rectangle outline"] = 9; 425264fa531Smrg weight["(xor) Char in 80-char line (TR 10)"] = 9; 426264fa531Smrg weight["(xor) 500x500 rectangle"] = 9; 427264fa531Smrg weight["(xor) Copy 500x500 from pixmap to window"] = 8; 428264fa531Smrg weight["(xor) Char in 20/40/20 line (6x13, TR 10)"] = 8; 429264fa531Smrg weight["(xor) 100-pixel dashed line"] = 8; 430264fa531Smrg weight["(xor) Copy 100x100 1-bit deep plane"] = 8; 431264fa531Smrg weight["(xor) Char in 60-char line (9x15)"] = 8; 432264fa531Smrg weight["(xor) Char16 in 40-char line (k14)"] = 7; 433264fa531Smrg weight["(xor) Fill 10x10 equivalent triangle"] = 7; 434264fa531Smrg weight["(xor) PutImage 500x500 square"] = 7; 435264fa531Smrg weight["(xor) Copy 100x100 from window to window"] = 7; 436264fa531Smrg weight["(xor) 100-pixel dashed segment"] = 7; 437264fa531Smrg weight["(xor) 100x100 wide rectangle outline"] = 6; 438264fa531Smrg weight["(xor) Char16 in 7/14/7 line (k14, k24)"] = 6; 439264fa531Smrg weight["(xor) Fill 100x100 trapezoid"] = 6; 440264fa531Smrg weight["(xor) 100-pixel solid circle"] = 6; 441264fa531Smrg weight["(xor) 10-pixel solid circle"] = 6; 442264fa531Smrg weight["(xor) 1-pixel line segment"] = 6; 443264fa531Smrg weight["(xor) 1-pixel line"] = 6; 444264fa531Smrg weight["(xor) 10x1 wide horizontal line segment"] = 6; 445264fa531Smrg weight["(xor) 10x1 wide vertical line segment"] = 6; 446264fa531Smrg weight["(xor) Copy 100x100 from pixmap to pixmap"] = 6; 447264fa531Smrg weight["(xor) 10-pixel dashed line"] = 6; 448264fa531Smrg weight["(xor) Char in 30-char line (TR 24)"] = 6; 449264fa531Smrg weight["(xor) Fill 100x100 equivalent triangle"] = 6; 450264fa531Smrg weight["(xor) Copy 10x10 from pixmap to window"] = 6; 451264fa531Smrg weight["(xor) Fill 10x10 trapezoid"] = 6; 452264fa531Smrg weight["(xor) Char in 70-char line (8x13)"] = 6; 453264fa531Smrg weight["(xor) 100-pixel circle"] = 6; 454264fa531Smrg weight["(xor) Copy 100x100 from window to pixmap"] = 6; 455264fa531Smrg weight["(xor) 10-pixel dashed segment"] = 5; 456264fa531Smrg weight["(xor) 10-pixel circle"] = 5; 457264fa531Smrg weight["(xor) 10x10 wide rectangle outline"] = 5; 458264fa531Smrg weight["(xor) 100x100 stippled rectangle"] = 5; 459264fa531Smrg weight["(xor) 100-pixel filled ellipse"] = 5; 460264fa531Smrg weight["(xor) 10x10 4x4 tiled rectangle"] = 5; 461264fa531Smrg weight["(xor) PutImage 10x10 square"] = 5; 462264fa531Smrg weight["(xor) Copy 500x500 from window to window"] = 5; 463264fa531Smrg weight["(xor) 500x500 wide rectangle outline"] = 5; 464264fa531Smrg weight["(xor) 10x10 stippled rectangle"] = 5; 465264fa531Smrg weight["(xor) 100x10 wide line"] = 5; 466264fa531Smrg weight["(xor) 100x10 wide horizontal line segment"] = 5; 467264fa531Smrg weight["(xor) 100x10 wide vertical line segment"] = 5; 468264fa531Smrg weight["(xor) Scroll 100x100 pixels"] = 5; 469264fa531Smrg weight["(xor) Char16 in 23-char line (k24)"] = 5; 470264fa531Smrg weight["(xor) Dot"] = 5; 471264fa531Smrg weight["(xor) Copy 500x500 1-bit deep plane"] = 5; 472264fa531Smrg weight["(xor) 100-pixel ellipse"] = 5; 473264fa531Smrg weight["(xor) 100x100 4x4 tiled rectangle"] = 5; 474264fa531Smrg weight["(xor) Copy 10x10 1-bit deep plane"] = 5; 475264fa531Smrg weight["(xor) 1x1 rectangle"] = 5; 476264fa531Smrg weight["(xor) 500-pixel solid circle"] = 4; 477264fa531Smrg weight["(xor) 500-pixel filled ellipse"] = 4; 478264fa531Smrg weight["(xor) 10-pixel filled ellipse"] = 4; 479264fa531Smrg weight["(xor) Fill 100x100 stippled trapezoid"] = 4; 480264fa531Smrg weight["(xor) 500x50 wide line"] = 4; 481264fa531Smrg weight["(xor) 500-pixel circle"] = 4; 482264fa531Smrg weight["(xor) 100-pixel double-dashed line"] = 4; 483264fa531Smrg weight["(xor) 500x50 wide horizontal line segment"] = 4; 484264fa531Smrg weight["(xor) 500x50 wide vertical line segment"] = 4; 485264fa531Smrg weight["(xor) 100-pixel dashed circle"] = 4; 486264fa531Smrg weight["(xor) 10x10 opaque stippled rectangle"] = 4; 487264fa531Smrg weight["(xor) 10-pixel ellipse"] = 4; 488264fa531Smrg weight["(xor) Copy 500x500 from pixmap to pixmap"] = 4; 489264fa531Smrg weight["(xor) 100x100 161x145 stippled rectangle"] = 4; 490264fa531Smrg weight["(xor) 10x10 161x145 tiled rectangle"] = 4; 491264fa531Smrg weight["(xor) Copy 10x10 from window to window"] = 4; 492264fa531Smrg weight["(xor) Copy 10x10 from pixmap to pixmap"] = 4; 493264fa531Smrg weight["(xor) 10x10 161x145 stippled rectangle"] = 4; 494264fa531Smrg weight["(xor) 100-pixel wide circle"] = 4; 495264fa531Smrg weight["(xor) 500x500 stippled rectangle"] = 4; 496264fa531Smrg weight["(xor) 500-pixel ellipse"] = 4; 497264fa531Smrg weight["(xor) 10x10 216x208 tiled rectangle"] = 4; 498264fa531Smrg weight["(xor) Fill 100x100 equivalent complex polygons"] = 4; 499264fa531Smrg weight["(xor) 100-pixel double-dashed segment"] = 3; 500264fa531Smrg weight["(xor) 10x10 161x145 opaque stippled rectangle"] = 3; 501264fa531Smrg weight["(xor) Fill 10x10 opaque stippled trapezoid"] = 3; 502264fa531Smrg weight["(xor) 100-pixel partial circle"] = 3; 503264fa531Smrg weight["(xor) Fill 10x10 161x145 stippled trapezoid"] = 3; 504264fa531Smrg weight["(xor) Fill 10x10 161x145 opaque stippled trapezoid"] = 3; 505264fa531Smrg weight["(xor) Scroll 500x500 pixels"] = 3; 506264fa531Smrg weight["(xor) 100x100 opaque stippled rectangle"] = 3; 507264fa531Smrg weight["(xor) Fill 10x10 stippled trapezoid"] = 3; 508264fa531Smrg weight["(xor) 100x10 wide dashed line"] = 3; 509264fa531Smrg weight["(xor) Copy 10x10 from window to pixmap"] = 3; 510264fa531Smrg weight["(xor) Copy 500x500 from window to pixmap"] = 3; 511264fa531Smrg weight["(xor) 500x500 opaque stippled rectangle"] = 3; 512264fa531Smrg weight["(xor) Fill 10x10 tiled trapezoid"] = 3; 513264fa531Smrg weight["(xor) 100x100 161x145 tiled rectangle"] = 3; 514264fa531Smrg weight["(xor) 100-pixel partial ellipse"] = 3; 515264fa531Smrg weight["(xor) 100-pixel fill slice partial circle"] = 3; 516264fa531Smrg weight["(xor) Fill 1x1 equivalent triangle"] = 3; 517264fa531Smrg weight["(xor) 100-pixel double-dashed circle"] = 3; 518264fa531Smrg weight["(xor) 500x500 4x4 tiled rectangle"] = 3; 519264fa531Smrg weight["(xor) 100-pixel wide ellipse"] = 3; 520264fa531Smrg weight["(xor) 100-pixel fill chord partial circle"] = 3; 521264fa531Smrg weight["(xor) 100x100 216x208 tiled rectangle"] = 3; 522264fa531Smrg weight["(xor) Fill 10x10 161x145 tiled trapezoid"] = 3; 523264fa531Smrg weight["(xor) Fill 100x100 216x208 tiled trapezoid"] = 3; 524264fa531Smrg weight["(xor) 500x500 161x145 stippled rectangle"] = 3; 525264fa531Smrg weight["(xor) 500x500 161x145 tiled rectangle"] = 3; 526264fa531Smrg weight["(xor) 100x100 161x145 opaque stippled rectangle"] = 3; 527264fa531Smrg weight["(xor) 500x500 161x145 opaque stippled rectangle"] = 3; 528264fa531Smrg weight["(xor) 10x1 wide line"] = 3; 529264fa531Smrg weight["(xor) 500x500 216x208 tiled rectangle"] = 3; 530264fa531Smrg weight["(xor) 100-pixel dashed ellipse"] = 3; 531264fa531Smrg weight["(xor) Fill 100x100 opaque stippled trapezoid"] = 3; 532264fa531Smrg weight["(xor) 10-pixel partial circle"] = 3; 533264fa531Smrg weight["(xor) 100x10 wide double-dashed line"] = 3; 534264fa531Smrg weight["(xor) Fill 100x100 161x145 stippled trapezoid"] = 3; 535264fa531Smrg weight["(xor) Fill 100x100 161x145 opaque stippled trapezoid"] = 3; 536264fa531Smrg weight["(xor) 100-pixel fill slice partial ellipse"] = 3; 537264fa531Smrg weight["(xor) 1-pixel circle"] = 3; 538264fa531Smrg weight["(xor) Fill 10x10 equivalent complex polygon"] = 3; 539264fa531Smrg weight["(xor) 100-pixel wide dashed circle"] = 2; 540264fa531Smrg weight["(xor) 100-pixel wide double-dashed circle"] = 2; 541264fa531Smrg weight["(xor) Scroll 10x10 pixels"] = 2; 542264fa531Smrg weight["(xor) 10-pixel wide circle"] = 2; 543264fa531Smrg weight["(xor) 100-pixel fill chord partial ellipse"] = 2; 544264fa531Smrg weight["(xor) Fill 100x100 tiled trapezoid"] = 2; 545264fa531Smrg weight["(xor) 100-pixel double-dashed ellipse"] = 2; 546264fa531Smrg weight["(xor) 100-pixel wide dashed ellipse"] = 2; 547264fa531Smrg weight["(xor) 100-pixel wide double-dashed ellipse"] = 2; 548264fa531Smrg weight["(xor) 10-pixel partial ellipse"] = 2; 549264fa531Smrg weight["(xor) 100-pixel wide partial circle"] = 2; 550264fa531Smrg weight["(xor) 100-pixel wide partial ellipse"] = 2; 551264fa531Smrg weight["(xor) 10-pixel fill slice partial circle"] = 2; 552264fa531Smrg weight["(xor) 10-pixel wide ellipse"] = 2; 553264fa531Smrg weight["(xor) Fill 100x100 161x145 tiled trapezoid"] = 2; 554264fa531Smrg weight["(xor) Fill 10x10 216x208 tiled trapezoid"] = 2; 555264fa531Smrg weight["(xor) 10-pixel fill chord partial circle"] = 2; 556264fa531Smrg weight["(xor) 500-pixel wide circle"] = 2; 557264fa531Smrg weight["(xor) 500-pixel wide ellipse"] = 2; 558264fa531Smrg weight["(xor) 1-pixel solid circle"] = 2; 559264fa531Smrg weight["(xor) 10-pixel fill chord partial ellipse"] = 2; 560264fa531Smrg weight["(xor) 10-pixel fill slice partial ellipse"] = 2; 561264fa531Smrg weight["(xor) 10-pixel wide partial circle"] = 1; 562264fa531Smrg weight["(xor) 10-pixel wide partial ellipse"] = 1; 563264fa531Smrg weight["(xor) 1x1 stippled rectangle"] = 1; 564264fa531Smrg weight["(xor) 1x1 161x145 stippled rectangle"] = 1; 565264fa531Smrg weight["(xor) 1x1 opaque stippled rectangle"] = 1; 566264fa531Smrg weight["(xor) 1x1 161x145 opaque stippled rectangle"] = 1; 567264fa531Smrg weight["(xor) 1x1 4x4 tiled rectangle"] = 1; 568264fa531Smrg weight["(xor) 1x1 161x145 tiled rectangle"] = 1; 569264fa531Smrg weight["(xor) 1x1 216x208 tiled rectangle"] = 1; 570264fa531Smrg weight["(xor) ShmPutImage 10x10 square"] = 0; 571264fa531Smrg weight["(xor) ShmPutImage 100x100 square"] = 0; 572264fa531Smrg weight["(xor) ShmPutImage 500x500 square"] = 0; 573264fa531Smrg sumofweights = 0; 574264fa531Smrg } 575264fa531Smrg $0 ~ /server/ { 576264fa531Smrg printf("name:%s\n",substr($0,1,index($0,"server")-2)); 577264fa531Smrg } 578264fa531Smrg { 579264fa531Smrg split($0,parts,":"); # get rate and name 580264fa531Smrg start = index(parts[1],"(") + 1; # find left parentheses 581264fa531Smrg end = index(parts[1],"/"); # find terminating '/' 582264fa531Smrg rate = substr(parts[1],start,end-start);# get ops/sec 583264fa531Smrg 584264fa531Smrg name = parts[2]; 585264fa531Smrg while (substr(name,1,1) == " ") { # remove leading spaces 586264fa531Smrg name = substr(name,2,length(name)); 587264fa531Smrg } 588264fa531Smrg 589264fa531Smrg thisweight = weight[name]; 590264fa531Smrg weight[name] = 0; # clear to avoid double counting 591264fa531Smrg sumofweights += thisweight; 592264fa531Smrg printf("%d:",thisweight); # output in new format 593264fa531Smrg printf("%.1f\n",rate); 594264fa531Smrg } 595264fa531Smrg END{ 596264fa531Smrg printf("sumof:%.1f\n",sumofweights); 597264fa531Smrg } 598264fa531SmrgEOS 599264fa531Smrg 600264fa531Smrgawk -f awkfile.$$ temp.$$ > rates.$$ 601264fa531Smrgrm -f awkfile.$$ # cleanup 602264fa531Smrg 603264fa531Smrg# calculate the weighted average 604264fa531Smrg 605264fa531Smrgsumofweights=`grep sumof rates.$$ | awk -F: ' { print($2) }' - ` 606264fa531Smrgif [ "$sumofweights" != "4566.0" ] 607264fa531Smrgthen 608264fa531Smrg echo "ERROR: sum of weights =$sumofweights, not equal to 4566.0;" 609264fa531Smrg echo "ABORTING!" 610264fa531Smrg rm -f rates.$$ temp.$$ 611264fa531Smrg exit 1 612264fa531Smrgfi 613264fa531Smrg 614264fa531Smrgawk -F: ' 615264fa531Smrg BEGIN { 616264fa531Smrg logsum = 0; 617264fa531Smrg name = "tested" 618264fa531Smrg } 619264fa531Smrg $1 == "name" { name = $2;next } 620264fa531Smrg { 621264fa531Smrg weight = $1; 622264fa531Smrg rate = $2; 623264fa531Smrg if (rate > 0.0) { 624264fa531Smrg # generate weighted log sum 625264fa531Smrg logsum += ( log( rate ) * weight ); 626264fa531Smrg } 627264fa531Smrg } 628264fa531Smrg END { 629264fa531Smrg SparcStation1 = 2118.51; 630264fa531Smrg WeightedAverage = exp(logsum/4566.0); 631264fa531Smrg printf("Weighted x11perf of %s server =%6.0f\n", name,WeightedAverage); 632264fa531Smrg printf("Weighted x11perf of SparcStation 1 server =%5.0f\n", SparcStation1); 633264fa531Smrg printf("Xmark =%8.4f\n", WeightedAverage/SparcStation1); 634264fa531Smrg }' rates.$$ 635264fa531Smrg 636264fa531Smrgrm -f temp.$$ rates.$$ awkfile.$$ # cleanup 637264fa531Smrg 638264fa531Smrgexit 0 639