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