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