Xmark revision 264fa531
1#! /bin/sh 2#$Xorg: Xmark.sh,v 1.3 2000/08/17 19:54:08 cpqbld Exp $ 3#XPC Header: Xmark,v 1.15 93/04/12 10:10:07 hmgr Exp 4# 5############################################################ 6# Xmark version XPC Revision: 1.15 7# 8# Usage: Xmark datafile 9# 10############################################################ 11# $XFree86: xc/programs/x11perf/Xmark.sh,v 1.2 1997/01/04 12:20:20 dawes Exp $ 12# 13# 14# CHANGE HISTORY: 15# 16# X11perfcompDR -- Creates a Digital Review compatible breakdown of 17# x11perf v1.2 results as described in "Take Your Pick Of Graphics" 18# by John Montgomery, Digital Review, May 7th, 1990, Page 44. 19# 8/30/90 v1.0 program created by Lonnie Mandigo 20# 1/18/91 Modification by Lonnie Mandigo 21# Fixed a bug to include UCIRC in data. 22# 2/5/91 Modification by Lonnie Mandigo 23# Now removes sum.tmp file when finished. 24# 3/18/91 v1.01 Increased resolution to handle zero ratios. 25# Minor aesethic cleanups and better error handling. 26# Lonnie Mandigo and Jason Levitt (jason@cs.utexas.edu) 27# 3/4/93 Converted to Xmark by Bob Kuseski 28# to produce a single number representing the ratio between 29# the xpc weighted averages of the output from x11perf Rev 1.3 30# for the server under test and a SparcStation 1 31# 3/10/93 Changed to produce THREE output numbers and added bounds 32# checking of input data. 33# 3/15/93 Removed usage of '-F' in grep for compatibility reasons 34# 3/16/93 Corrected usage of substr() and used two greps versus fgrep 35# 4/12/93 Eliminated use of functions and \n in echo 36# 37############################################################ 38# Copyright (c) 1993 by Hewlett-Packard Company 39# 40# Permission to use, copy, modify, and distribute this software and its 41# documentation for any purpose and without fee is hereby granted, 42# provided that the above copyright notice appear in all copies and that 43# both the copyright notice and this permission notice appear in 44# supporting documentation, and that the name of Hewlett-Packard not be 45# used in advertising or publicity pertaining to distribution of the 46# software without specific, written prior permission. 47# 48############################################################ 49# Instructions: 50# 51# Usage: Xmark datafile 52# 53# where: 'datafile' is created by running x11perf Rev 1.3 54# with the flags below: 55# 56# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy GXxor -all > datafile 57# or 58# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy -all > datafile 59# x11perf -display mysystem:0.0 -v1.3 -rop GXxor -all >> datafile 60# or 61# x11perf -display mysystem:0.0 -v1.3 -rop GXxor -all > datafile 62# x11perf -display mysystem:0.0 -v1.3 -rop GXcopy -all >> datafile 63# 64# Xmark summarizes the results relative to the data contained in 65# the datafile. Xmark writes to standard out, so if you want to 66# capture the output in a file, use: 67# 68# Xmark datafile > output.comp 69# 70# The 'output.comp' contains THREE numbers: 71# - Weighted x11perf number of the server under test 72# - Weighted x11perf number of the SparcStation 1 73# - Xmark = the ratio of the above two numbers 74# 75# Note the SparcStation 1 number comes from a: 76# X11R5 Xsun 77# Standard with SunOS 4.1.2 78# SunOs 4.1.2 79# CG3 dumb Color Frame Buffer 80# 81############################################################ 82############################################################ 83 84# Cleanup on interrupt 85trap \ 86"echo Interrupt: removing temporary files. >& 2 ;rm -f temp.$$ rates.$$ awkfile.$$; exit 1" 1 2 3 9 15 87 88# Must have only one file specified 89if [ "$#" -ne 1 ] 90then 91 echo "Usage: $0 datafile" >& 2 92 exit 1 93fi 94 95# Must be an ordinary file 96if [ ! -f "$1" ] 97then 98 echo "Error: data file does not exist or is not ordinary." >& 2 99 exit 1 100fi 101 102# See if the date file has the correct number of results. 103LC1=`grep trep "$1" | wc -l` 104LC2=441 # Number of test without Shared Memory Transport 105LC3=447 # Number of test with Shared Memory Transport 106 107if [ "$LC1" -ne "$LC2" ] && [ "$LC1" -ne "$LC3" ] 108then 109 echo "WARNING: datafile contains $LC1, not "$LC2" or "$LC3" 'trep' results;" >& 2 110 if [ "$LC1" -gt "$LC2" ] 111 then 112 echo "extra results are probably OK." >& 2 113 echo "" 114 fi 115fi 116 117DATA=$1 118 119grep trep $DATA > temp.$$ 120grep server $DATA >> temp.$$ 121 122# convert the averages to standard form. 123 124cat > awkfile.$$ <<'EOS' 125 BEGIN { 126 weight["10x10 rectangle"] = 37; 127 weight["Scroll 500x500 pixels"] = 33; 128 weight["100x100 rectangle"] = 32; 129 weight["10-pixel line segment"] = 31; 130 weight["10-pixel line"] = 30; 131 weight["PutImage 100x100 square"] = 30; 132 weight["Scroll 100x100 pixels"] = 29; 133 weight["PutImage 500x500 square"] = 29; 134 weight["500x500 rectangle"] = 29; 135 weight["100-pixel line"] = 28; 136 weight["Char in 60-char line (9x15)"] = 28; 137 weight["Char in 80-char image line (6x13)"] = 28; 138 weight["Char in 80-char line (6x13)"] = 27; 139 weight["Char in 80-char image line (TR 10)"] = 27; 140 weight["100-pixel line segment"] = 27; 141 weight["Char in 80-char line (TR 10)"] = 27; 142 weight["Char in 60-char image line (9x15)"] = 26; 143 weight["Copy 100x100 from pixmap to window"] = 26; 144 weight["Copy 500x500 from pixmap to window"] = 26; 145 weight["Char in 70-char line (8x13)"] = 24; 146 weight["500-pixel line"] = 24; 147 weight["Char in 20/40/20 line (6x13, TR 10)"] = 23; 148 weight["Char in 70-char image line (8x13)"] = 23; 149 weight["Change graphics context"] = 23; 150 weight["Copy 100x100 from window to window"] = 23; 151 weight["10-pixel horizontal line segment"] = 23; 152 weight["10-pixel vertical line segment"] = 23; 153 weight["Copy 500x500 from window to window"] = 22; 154 weight["Char in 30-char line (TR 24)"] = 22; 155 weight["Char16 in 40-char line (k14)"] = 22; 156 weight["500-pixel line segment"] = 22; 157 weight["Char in 30-char image line (TR 24)"] = 22; 158 weight["100-pixel horizontal line segment"] = 22; 159 weight["100-pixel vertical line segment"] = 22; 160 weight["Scroll 10x10 pixels"] = 21; 161 weight["Char16 in 40-char image line (k14)"] = 21; 162 weight["GetImage 500x500 square"] = 21; 163 weight["PutImage 10x10 square"] = 20; 164 weight["GetImage 100x100 square"] = 20; 165 weight["Move window (4 kids)"] = 20; 166 weight["Copy 10x10 from pixmap to window"] = 20; 167 weight["100x100 4x4 tiled rectangle"] = 20; 168 weight["Copy 100x100 from window to pixmap"] = 19; 169 weight["Hide/expose window via popup (4 kids)"] = 19; 170 weight["Copy 500x500 from window to pixmap"] = 19; 171 weight["500-pixel horizontal line segment"] = 19; 172 weight["500-pixel vertical line segment"] = 19; 173 weight["Fill 10x10 equivalent triangle"] = 19; 174 weight["Char16 in 23-char line (k24)"] = 19; 175 weight["1x1 rectangle"] = 19; 176 weight["Char16 in 7/14/7 line (k14, k24)"] = 18; 177 weight["10x10 4x4 tiled rectangle"] = 18; 178 weight["100-pixel line segment (1 kid)"] = 18; 179 weight["100x100 rectangle outline"] = 18; 180 weight["Move window via parent (4 kids)"] = 18; 181 weight["GetAtomName"] = 18; 182 weight["GetProperty"] = 18; 183 weight["Char16 in 23-char image line (k24)"] = 18; 184 weight["100-pixel line segment (3 kids)"] = 17; 185 weight["Resize window (4 kids)"] = 17; 186 weight["Map window via parent (4 kids)"] = 17; 187 weight["Copy 100x100 from pixmap to pixmap"] = 17; 188 weight["Unmap window via parent (4 kids)"] = 17; 189 weight["100-pixel line segment (2 kids)"] = 17; 190 weight["10-pixel solid circle"] = 17; 191 weight["1-pixel line"] = 17; 192 weight["Move window (16 kids)"] = 16; 193 weight["Fill 100x100 equivalent triangle"] = 16; 194 weight["Hide/expose window via popup (16 kids)"] = 16; 195 weight["Move window via parent (16 kids)"] = 16; 196 weight["10x10 rectangle outline"] = 16; 197 weight["Destroy window via parent (4 kids)"] = 16; 198 weight["Create unmapped window (4 kids)"] = 16; 199 weight["Copy 10x10 from window to window"] = 16; 200 weight["Copy 100x100 1-bit deep plane"] = 16; 201 weight["10-pixel circle"] = 16; 202 weight["100x100 opaque stippled rectangle"] = 16; 203 weight["500x500 4x4 tiled rectangle"] = 16; 204 weight["100x100 stippled rectangle"] = 16; 205 weight["Copy 500x500 from pixmap to pixmap"] = 16; 206 weight["Create and map subwindows (16 kids)"] = 16; 207 weight["10x10 stippled rectangle"] = 16; 208 weight["Resize window (16 kids)"] = 16; 209 weight["Map window via parent (16 kids)"] = 15; 210 weight["100-pixel solid circle"] = 15; 211 weight["Copy 500x500 1-bit deep plane"] = 15; 212 weight["500x500 rectangle outline"] = 15; 213 weight["Create and map subwindows (4 kids)"] = 15; 214 weight["Destroy window via parent (16 kids)"] = 15; 215 weight["10x1 wide horizontal line segment"] = 15; 216 weight["10x1 wide vertical line segment"] = 15; 217 weight["100x100 161x145 tiled rectangle"] = 15; 218 weight["1-pixel line segment"] = 15; 219 weight["Unmap window via parent (16 kids)"] = 15; 220 weight["Fill 100x100 trapezoid"] = 14; 221 weight["100-pixel circle"] = 14; 222 weight["10x10 opaque stippled rectangle"] = 14; 223 weight["100-pixel dashed line"] = 14; 224 weight["500x500 161x145 tiled rectangle"] = 14; 225 weight["Copy 10x10 from window to pixmap"] = 14; 226 weight["100x10 wide horizontal line segment"] = 14; 227 weight["100x10 wide vertical line segment"] = 14; 228 weight["100x100 wide rectangle outline"] = 14; 229 weight["100x100 216x208 tiled rectangle"] = 14; 230 weight["Dot"] = 14; 231 weight["10x10 161x145 tiled rectangle"] = 14; 232 weight["Fill 100x100 equivalent complex polygons"] = 14; 233 weight["Move window (50 kids)"] = 13; 234 weight["Move window via parent (50 kids)"] = 13; 235 weight["Circulate window (16 kids)"] = 13; 236 weight["100-pixel dashed segment"] = 13; 237 weight["Create and map subwindows (50 kids)"] = 13; 238 weight["Create and map subwindows (25 kids)"] = 13; 239 weight["10x10 wide rectangle outline"] = 13; 240 weight["500x500 216x208 tiled rectangle"] = 13; 241 weight["Hide/expose window via popup (25 kids)"] = 13; 242 weight["Create and map subwindows (100 kids)"] = 13; 243 weight["Map window via parent (50 kids)"] = 13; 244 weight["Fill 10x10 trapezoid"] = 13; 245 weight["100x10 wide line"] = 13; 246 weight["10x10 216x208 tiled rectangle"] = 13; 247 weight["10-pixel dashed line"] = 13; 248 weight["Map window via parent (100 kids)"] = 13; 249 weight["Copy 10x10 from pixmap to pixmap"] = 13; 250 weight["Map window via parent (25 kids)"] = 13; 251 weight["Create unmapped window (25 kids)"] = 13; 252 weight["Move window (25 kids)"] = 13; 253 weight["Circulate window (4 kids)"] = 12; 254 weight["Move window via parent (25 kids)"] = 12; 255 weight["Create unmapped window (16 kids)"] = 12; 256 weight["Create and map subwindows (75 kids)"] = 12; 257 weight["500x500 opaque stippled rectangle"] = 12; 258 weight["Hide/expose window via popup (100 kids)"] = 12; 259 weight["Create and map subwindows (200 kids)"] = 12; 260 weight["Hide/expose window via popup (50 kids)"] = 12; 261 weight["500x50 wide horizontal line segment"] = 12; 262 weight["500x50 wide vertical line segment"] = 12; 263 weight["100x100 161x145 opaque stippled rectangle"] = 12; 264 weight["Resize window (25 kids)"] = 12; 265 weight["Map window via parent (200 kids)"] = 12; 266 weight["10x10 161x145 opaque stippled rectangle"] = 12; 267 weight["X protocol NoOperation"] = 12; 268 weight["10-pixel dashed segment"] = 12; 269 weight["Resize unmapped window (16 kids)"] = 12; 270 weight["Create unmapped window (100 kids)"] = 12; 271 weight["Fill 10x10 equivalent complex polygon"] = 12; 272 weight["Map window via parent (75 kids)"] = 12; 273 weight["100x100 161x145 stippled rectangle"] = 12; 274 weight["Moved unmapped window (16 kids)"] = 12; 275 weight["Copy 10x10 1-bit deep plane"] = 12; 276 weight["Unmap window via parent (50 kids)"] = 12; 277 weight["GetImage 10x10 square"] = 12; 278 weight["Fill 100x100 tiled trapezoid"] = 12; 279 weight["500x500 wide rectangle outline"] = 12; 280 weight["Fill 100x100 stippled trapezoid"] = 12; 281 weight["500x500 stippled rectangle"] = 12; 282 weight["Moved unmapped window (4 kids)"] = 12; 283 weight["10x10 161x145 stippled rectangle"] = 12; 284 weight["Unmap window via parent (25 kids)"] = 12; 285 weight["500-pixel solid circle"] = 12; 286 weight["Create unmapped window (50 kids)"] = 12; 287 weight["Destroy window via parent (25 kids)"] = 11; 288 weight["Resize window (200 kids)"] = 11; 289 weight["100-pixel filled ellipse"] = 11; 290 weight["Hide/expose window via popup (200 kids)"] = 11; 291 weight["Unmap window via parent (100 kids)"] = 11; 292 weight["Circulate window (25 kids)"] = 11; 293 weight["Resize window (50 kids)"] = 11; 294 weight["Hide/expose window via popup (75 kids)"] = 11; 295 weight["Destroy window via parent (100 kids)"] = 11; 296 weight["Destroy window via parent (50 kids)"] = 11; 297 weight["Create unmapped window (200 kids)"] = 11; 298 weight["Fill 100x100 opaque stippled trapezoid"] = 11; 299 weight["Move window via parent (75 kids)"] = 11; 300 weight["500-pixel filled ellipse"] = 11; 301 weight["Resize unmapped window (4 kids)"] = 11; 302 weight["Move window via parent (200 kids)"] = 11; 303 weight["Move window (75 kids)"] = 11; 304 weight["Fill 10x10 tiled trapezoid"] = 11; 305 weight["Fill 100x100 161x145 stippled trapezoid"] = 11; 306 weight["Move window (200 kids)"] = 11; 307 weight["Fill 10x10 stippled trapezoid"] = 11; 308 weight["Create unmapped window (75 kids)"] = 11; 309 weight["100-pixel fill chord partial circle"] = 10; 310 weight["Circulate Unmapped window (16 kids)"] = 10; 311 weight["Circulate window (50 kids)"] = 10; 312 weight["Move window (100 kids)"] = 10; 313 weight["Circulate window (100 kids)"] = 10; 314 weight["Move window via parent (100 kids)"] = 10; 315 weight["500x50 wide line"] = 10; 316 weight["500-pixel circle"] = 10; 317 weight["100-pixel double-dashed line"] = 10; 318 weight["Unmap window via parent (200 kids)"] = 10; 319 weight["Moved unmapped window (50 kids)"] = 10; 320 weight["10-pixel filled ellipse"] = 10; 321 weight["Resize window (75 kids)"] = 10; 322 weight["Fill 100x100 161x145 tiled trapezoid"] = 10; 323 weight["500x500 161x145 opaque stippled rectangle"] = 10; 324 weight["Fill 100x100 161x145 opaque stippled trapezoid"] = 10; 325 weight["Unmap window via parent (75 kids)"] = 10; 326 weight["Resize unmapped window (25 kids)"] = 10; 327 weight["100-pixel ellipse"] = 10; 328 weight["Destroy window via parent (75 kids)"] = 10; 329 weight["Fill 1x1 equivalent triangle"] = 10; 330 weight["500-pixel ellipse"] = 10; 331 weight["Fill 10x10 opaque stippled trapezoid"] = 10; 332 weight["Resize window (100 kids)"] = 10; 333 weight["500x500 161x145 stippled rectangle"] = 10; 334 weight["Destroy window via parent (200 kids)"] = 10; 335 weight["100-pixel fill slice partial circle"] = 10; 336 weight["Fill 100x100 216x208 tiled trapezoid"] = 9; 337 weight["100-pixel wide circle"] = 9; 338 weight["Moved unmapped window (25 kids)"] = 9; 339 weight["10x1 wide line"] = 9; 340 weight["Resize unmapped window (100 kids)"] = 9; 341 weight["100-pixel double-dashed segment"] = 9; 342 weight["10-pixel fill chord partial circle"] = 9; 343 weight["Circulate window (75 kids)"] = 9; 344 weight["100-pixel partial circle"] = 9; 345 weight["Circulate window (200 kids)"] = 9; 346 weight["Fill 10x10 161x145 stippled trapezoid"] = 9; 347 weight["Circulate Unmapped window (4 kids)"] = 9; 348 weight["100-pixel dashed circle"] = 9; 349 weight["Circulate Unmapped window (25 kids)"] = 9; 350 weight["10-pixel ellipse"] = 9; 351 weight["Resize unmapped window (50 kids)"] = 9; 352 weight["100-pixel partial ellipse"] = 9; 353 weight["Fill 10x10 161x145 tiled trapezoid"] = 8; 354 weight["100x10 wide dashed line"] = 8; 355 weight["10-pixel partial circle"] = 8; 356 weight["100-pixel wide ellipse"] = 8; 357 weight["Fill 10x10 161x145 opaque stippled trapezoid"] = 8; 358 weight["100-pixel wide partial circle"] = 8; 359 weight["Moved unmapped window (75 kids)"] = 8; 360 weight["Resize unmapped window (75 kids)"] = 8; 361 weight["Circulate Unmapped window (100 kids)"] = 8; 362 weight["100-pixel fill slice partial ellipse"] = 8; 363 weight["100x10 wide double-dashed line"] = 8; 364 weight["10-pixel fill slice partial circle"] = 8; 365 weight["100-pixel dashed ellipse"] = 8; 366 weight["100-pixel fill chord partial ellipse"] = 8; 367 weight["100-pixel wide dashed circle"] = 8; 368 weight["100-pixel double-dashed circle"] = 8; 369 weight["Fill 10x10 216x208 tiled trapezoid"] = 7; 370 weight["Moved unmapped window (100 kids)"] = 7; 371 weight["10-pixel wide circle"] = 7; 372 weight["Moved unmapped window (200 kids)"] = 7; 373 weight["Resize unmapped window (200 kids)"] = 7; 374 weight["Circulate Unmapped window (50 kids)"] = 7; 375 weight["1-pixel circle"] = 7; 376 weight["10-pixel partial ellipse"] = 7; 377 weight["500-pixel wide circle"] = 7; 378 weight["500-pixel wide ellipse"] = 7; 379 weight["100-pixel wide partial ellipse"] = 7; 380 weight["Circulate Unmapped window (75 kids)"] = 7; 381 weight["100-pixel wide dashed ellipse"] = 7; 382 weight["100-pixel double-dashed ellipse"] = 7; 383 weight["10-pixel wide ellipse"] = 6; 384 weight["10-pixel wide partial circle"] = 6; 385 weight["1-pixel solid circle"] = 6; 386 weight["100-pixel wide double-dashed circle"] = 6; 387 weight["Circulate Unmapped window (200 kids)"] = 6; 388 weight["1x1 4x4 tiled rectangle"] = 6; 389 weight["10-pixel wide partial ellipse"] = 6; 390 weight["10-pixel fill chord partial ellipse"] = 6; 391 weight["10-pixel fill slice partial ellipse"] = 6; 392 weight["100-pixel wide double-dashed ellipse"] = 5; 393 weight["1x1 161x145 tiled rectangle"] = 5; 394 weight["1x1 216x208 tiled rectangle"] = 5; 395 weight["1x1 stippled rectangle"] = 5; 396 weight["1x1 opaque stippled rectangle"] = 4; 397 weight["1x1 161x145 opaque stippled rectangle"] = 4; 398 weight["1x1 161x145 stippled rectangle"] = 4; 399 weight["ShmPutImage 10x10 square"] = 0; 400 weight["ShmPutImage 100x100 square"] = 0; 401 weight["ShmPutImage 500x500 square"] = 0; 402 weight["(xor) 100-pixel line"] = 16; 403 weight["(xor) 10-pixel line segment"] = 14; 404 weight["(xor) 10-pixel line"] = 13; 405 weight["(xor) 100-pixel line segment"] = 13; 406 weight["(xor) 500-pixel line segment"] = 13; 407 weight["(xor) 500-pixel line"] = 12; 408 weight["(xor) 10x10 rectangle"] = 12; 409 weight["(xor) 100x100 rectangle"] = 12; 410 weight["(xor) 100-pixel vertical line segment"] = 10; 411 weight["(xor) 100x100 rectangle outline"] = 10; 412 weight["(xor) 100-pixel horizontal line segment"] = 10; 413 weight["(xor) 10-pixel vertical line segment"] = 10; 414 weight["(xor) 100-pixel line segment (2 kids)"] = 10; 415 weight["(xor) 10-pixel horizontal line segment"] = 10; 416 weight["(xor) 100-pixel line segment (1 kid)"] = 9; 417 weight["(xor) Char in 80-char line (6x13)"] = 9; 418 weight["(xor) 500-pixel vertical line segment"] = 9; 419 weight["(xor) Copy 100x100 from pixmap to window"] = 9; 420 weight["(xor) 10x10 rectangle outline"] = 9; 421 weight["(xor) 500-pixel horizontal line segment"] = 9; 422 weight["(xor) 100-pixel line segment (3 kids)"] = 9; 423 weight["(xor) PutImage 100x100 square"] = 9; 424 weight["(xor) 500x500 rectangle outline"] = 9; 425 weight["(xor) Char in 80-char line (TR 10)"] = 9; 426 weight["(xor) 500x500 rectangle"] = 9; 427 weight["(xor) Copy 500x500 from pixmap to window"] = 8; 428 weight["(xor) Char in 20/40/20 line (6x13, TR 10)"] = 8; 429 weight["(xor) 100-pixel dashed line"] = 8; 430 weight["(xor) Copy 100x100 1-bit deep plane"] = 8; 431 weight["(xor) Char in 60-char line (9x15)"] = 8; 432 weight["(xor) Char16 in 40-char line (k14)"] = 7; 433 weight["(xor) Fill 10x10 equivalent triangle"] = 7; 434 weight["(xor) PutImage 500x500 square"] = 7; 435 weight["(xor) Copy 100x100 from window to window"] = 7; 436 weight["(xor) 100-pixel dashed segment"] = 7; 437 weight["(xor) 100x100 wide rectangle outline"] = 6; 438 weight["(xor) Char16 in 7/14/7 line (k14, k24)"] = 6; 439 weight["(xor) Fill 100x100 trapezoid"] = 6; 440 weight["(xor) 100-pixel solid circle"] = 6; 441 weight["(xor) 10-pixel solid circle"] = 6; 442 weight["(xor) 1-pixel line segment"] = 6; 443 weight["(xor) 1-pixel line"] = 6; 444 weight["(xor) 10x1 wide horizontal line segment"] = 6; 445 weight["(xor) 10x1 wide vertical line segment"] = 6; 446 weight["(xor) Copy 100x100 from pixmap to pixmap"] = 6; 447 weight["(xor) 10-pixel dashed line"] = 6; 448 weight["(xor) Char in 30-char line (TR 24)"] = 6; 449 weight["(xor) Fill 100x100 equivalent triangle"] = 6; 450 weight["(xor) Copy 10x10 from pixmap to window"] = 6; 451 weight["(xor) Fill 10x10 trapezoid"] = 6; 452 weight["(xor) Char in 70-char line (8x13)"] = 6; 453 weight["(xor) 100-pixel circle"] = 6; 454 weight["(xor) Copy 100x100 from window to pixmap"] = 6; 455 weight["(xor) 10-pixel dashed segment"] = 5; 456 weight["(xor) 10-pixel circle"] = 5; 457 weight["(xor) 10x10 wide rectangle outline"] = 5; 458 weight["(xor) 100x100 stippled rectangle"] = 5; 459 weight["(xor) 100-pixel filled ellipse"] = 5; 460 weight["(xor) 10x10 4x4 tiled rectangle"] = 5; 461 weight["(xor) PutImage 10x10 square"] = 5; 462 weight["(xor) Copy 500x500 from window to window"] = 5; 463 weight["(xor) 500x500 wide rectangle outline"] = 5; 464 weight["(xor) 10x10 stippled rectangle"] = 5; 465 weight["(xor) 100x10 wide line"] = 5; 466 weight["(xor) 100x10 wide horizontal line segment"] = 5; 467 weight["(xor) 100x10 wide vertical line segment"] = 5; 468 weight["(xor) Scroll 100x100 pixels"] = 5; 469 weight["(xor) Char16 in 23-char line (k24)"] = 5; 470 weight["(xor) Dot"] = 5; 471 weight["(xor) Copy 500x500 1-bit deep plane"] = 5; 472 weight["(xor) 100-pixel ellipse"] = 5; 473 weight["(xor) 100x100 4x4 tiled rectangle"] = 5; 474 weight["(xor) Copy 10x10 1-bit deep plane"] = 5; 475 weight["(xor) 1x1 rectangle"] = 5; 476 weight["(xor) 500-pixel solid circle"] = 4; 477 weight["(xor) 500-pixel filled ellipse"] = 4; 478 weight["(xor) 10-pixel filled ellipse"] = 4; 479 weight["(xor) Fill 100x100 stippled trapezoid"] = 4; 480 weight["(xor) 500x50 wide line"] = 4; 481 weight["(xor) 500-pixel circle"] = 4; 482 weight["(xor) 100-pixel double-dashed line"] = 4; 483 weight["(xor) 500x50 wide horizontal line segment"] = 4; 484 weight["(xor) 500x50 wide vertical line segment"] = 4; 485 weight["(xor) 100-pixel dashed circle"] = 4; 486 weight["(xor) 10x10 opaque stippled rectangle"] = 4; 487 weight["(xor) 10-pixel ellipse"] = 4; 488 weight["(xor) Copy 500x500 from pixmap to pixmap"] = 4; 489 weight["(xor) 100x100 161x145 stippled rectangle"] = 4; 490 weight["(xor) 10x10 161x145 tiled rectangle"] = 4; 491 weight["(xor) Copy 10x10 from window to window"] = 4; 492 weight["(xor) Copy 10x10 from pixmap to pixmap"] = 4; 493 weight["(xor) 10x10 161x145 stippled rectangle"] = 4; 494 weight["(xor) 100-pixel wide circle"] = 4; 495 weight["(xor) 500x500 stippled rectangle"] = 4; 496 weight["(xor) 500-pixel ellipse"] = 4; 497 weight["(xor) 10x10 216x208 tiled rectangle"] = 4; 498 weight["(xor) Fill 100x100 equivalent complex polygons"] = 4; 499 weight["(xor) 100-pixel double-dashed segment"] = 3; 500 weight["(xor) 10x10 161x145 opaque stippled rectangle"] = 3; 501 weight["(xor) Fill 10x10 opaque stippled trapezoid"] = 3; 502 weight["(xor) 100-pixel partial circle"] = 3; 503 weight["(xor) Fill 10x10 161x145 stippled trapezoid"] = 3; 504 weight["(xor) Fill 10x10 161x145 opaque stippled trapezoid"] = 3; 505 weight["(xor) Scroll 500x500 pixels"] = 3; 506 weight["(xor) 100x100 opaque stippled rectangle"] = 3; 507 weight["(xor) Fill 10x10 stippled trapezoid"] = 3; 508 weight["(xor) 100x10 wide dashed line"] = 3; 509 weight["(xor) Copy 10x10 from window to pixmap"] = 3; 510 weight["(xor) Copy 500x500 from window to pixmap"] = 3; 511 weight["(xor) 500x500 opaque stippled rectangle"] = 3; 512 weight["(xor) Fill 10x10 tiled trapezoid"] = 3; 513 weight["(xor) 100x100 161x145 tiled rectangle"] = 3; 514 weight["(xor) 100-pixel partial ellipse"] = 3; 515 weight["(xor) 100-pixel fill slice partial circle"] = 3; 516 weight["(xor) Fill 1x1 equivalent triangle"] = 3; 517 weight["(xor) 100-pixel double-dashed circle"] = 3; 518 weight["(xor) 500x500 4x4 tiled rectangle"] = 3; 519 weight["(xor) 100-pixel wide ellipse"] = 3; 520 weight["(xor) 100-pixel fill chord partial circle"] = 3; 521 weight["(xor) 100x100 216x208 tiled rectangle"] = 3; 522 weight["(xor) Fill 10x10 161x145 tiled trapezoid"] = 3; 523 weight["(xor) Fill 100x100 216x208 tiled trapezoid"] = 3; 524 weight["(xor) 500x500 161x145 stippled rectangle"] = 3; 525 weight["(xor) 500x500 161x145 tiled rectangle"] = 3; 526 weight["(xor) 100x100 161x145 opaque stippled rectangle"] = 3; 527 weight["(xor) 500x500 161x145 opaque stippled rectangle"] = 3; 528 weight["(xor) 10x1 wide line"] = 3; 529 weight["(xor) 500x500 216x208 tiled rectangle"] = 3; 530 weight["(xor) 100-pixel dashed ellipse"] = 3; 531 weight["(xor) Fill 100x100 opaque stippled trapezoid"] = 3; 532 weight["(xor) 10-pixel partial circle"] = 3; 533 weight["(xor) 100x10 wide double-dashed line"] = 3; 534 weight["(xor) Fill 100x100 161x145 stippled trapezoid"] = 3; 535 weight["(xor) Fill 100x100 161x145 opaque stippled trapezoid"] = 3; 536 weight["(xor) 100-pixel fill slice partial ellipse"] = 3; 537 weight["(xor) 1-pixel circle"] = 3; 538 weight["(xor) Fill 10x10 equivalent complex polygon"] = 3; 539 weight["(xor) 100-pixel wide dashed circle"] = 2; 540 weight["(xor) 100-pixel wide double-dashed circle"] = 2; 541 weight["(xor) Scroll 10x10 pixels"] = 2; 542 weight["(xor) 10-pixel wide circle"] = 2; 543 weight["(xor) 100-pixel fill chord partial ellipse"] = 2; 544 weight["(xor) Fill 100x100 tiled trapezoid"] = 2; 545 weight["(xor) 100-pixel double-dashed ellipse"] = 2; 546 weight["(xor) 100-pixel wide dashed ellipse"] = 2; 547 weight["(xor) 100-pixel wide double-dashed ellipse"] = 2; 548 weight["(xor) 10-pixel partial ellipse"] = 2; 549 weight["(xor) 100-pixel wide partial circle"] = 2; 550 weight["(xor) 100-pixel wide partial ellipse"] = 2; 551 weight["(xor) 10-pixel fill slice partial circle"] = 2; 552 weight["(xor) 10-pixel wide ellipse"] = 2; 553 weight["(xor) Fill 100x100 161x145 tiled trapezoid"] = 2; 554 weight["(xor) Fill 10x10 216x208 tiled trapezoid"] = 2; 555 weight["(xor) 10-pixel fill chord partial circle"] = 2; 556 weight["(xor) 500-pixel wide circle"] = 2; 557 weight["(xor) 500-pixel wide ellipse"] = 2; 558 weight["(xor) 1-pixel solid circle"] = 2; 559 weight["(xor) 10-pixel fill chord partial ellipse"] = 2; 560 weight["(xor) 10-pixel fill slice partial ellipse"] = 2; 561 weight["(xor) 10-pixel wide partial circle"] = 1; 562 weight["(xor) 10-pixel wide partial ellipse"] = 1; 563 weight["(xor) 1x1 stippled rectangle"] = 1; 564 weight["(xor) 1x1 161x145 stippled rectangle"] = 1; 565 weight["(xor) 1x1 opaque stippled rectangle"] = 1; 566 weight["(xor) 1x1 161x145 opaque stippled rectangle"] = 1; 567 weight["(xor) 1x1 4x4 tiled rectangle"] = 1; 568 weight["(xor) 1x1 161x145 tiled rectangle"] = 1; 569 weight["(xor) 1x1 216x208 tiled rectangle"] = 1; 570 weight["(xor) ShmPutImage 10x10 square"] = 0; 571 weight["(xor) ShmPutImage 100x100 square"] = 0; 572 weight["(xor) ShmPutImage 500x500 square"] = 0; 573 sumofweights = 0; 574 } 575 $0 ~ /server/ { 576 printf("name:%s\n",substr($0,1,index($0,"server")-2)); 577 } 578 { 579 split($0,parts,":"); # get rate and name 580 start = index(parts[1],"(") + 1; # find left parentheses 581 end = index(parts[1],"/"); # find terminating '/' 582 rate = substr(parts[1],start,end-start);# get ops/sec 583 584 name = parts[2]; 585 while (substr(name,1,1) == " ") { # remove leading spaces 586 name = substr(name,2,length(name)); 587 } 588 589 thisweight = weight[name]; 590 weight[name] = 0; # clear to avoid double counting 591 sumofweights += thisweight; 592 printf("%d:",thisweight); # output in new format 593 printf("%.1f\n",rate); 594 } 595 END{ 596 printf("sumof:%.1f\n",sumofweights); 597 } 598EOS 599 600awk -f awkfile.$$ temp.$$ > rates.$$ 601rm -f awkfile.$$ # cleanup 602 603# calculate the weighted average 604 605sumofweights=`grep sumof rates.$$ | awk -F: ' { print($2) }' - ` 606if [ "$sumofweights" != "4566.0" ] 607then 608 echo "ERROR: sum of weights =$sumofweights, not equal to 4566.0;" 609 echo "ABORTING!" 610 rm -f rates.$$ temp.$$ 611 exit 1 612fi 613 614awk -F: ' 615 BEGIN { 616 logsum = 0; 617 name = "tested" 618 } 619 $1 == "name" { name = $2;next } 620 { 621 weight = $1; 622 rate = $2; 623 if (rate > 0.0) { 624 # generate weighted log sum 625 logsum += ( log( rate ) * weight ); 626 } 627 } 628 END { 629 SparcStation1 = 2118.51; 630 WeightedAverage = exp(logsum/4566.0); 631 printf("Weighted x11perf of %s server =%6.0f\n", name,WeightedAverage); 632 printf("Weighted x11perf of SparcStation 1 server =%5.0f\n", SparcStation1); 633 printf("Xmark =%8.4f\n", WeightedAverage/SparcStation1); 634 }' rates.$$ 635 636rm -f temp.$$ rates.$$ awkfile.$$ # cleanup 637 638exit 0 639