########################################################################
#
# SPECweb_Support.config
#
# SPECweb2005 Support workload-specific properties file.
#
# Copyright (c) 2004-2006 Standard Performance Evaluation Corporation (SPEC)
# All rights reserved.
#
########################################################################

########################################################################
# Configurable workload properties
# These can be changed and still result in a valid benchmark run
########################################################################

# DYNAMIC_SCRIPT is the name of a *single* dynamic script used for
# *all* requests. For request-specific scripts, use DYN_SCRIPT_x, below,
# instead. DYN_SCRIPT_PATH, below, is prepended to this file
DYNAMIC_SCRIPT = "spec05support.php"

# INIT_SCRIPT is the initialization script run on the web server
# INIT_SCRIPT = "spec05support.php?command=init"
INIT_SCRIPT = "init.php"

# IMG_PATH is the relative path (below the web server root directory) where
# the *page* images are located on server
IMG_PATH = "/support/images"

# DYN_SCRIPT_PATH is the relative path (below the web server root directory)
# where the support scripts are located
DYN_SCRIPT_PATH = "/support/"

# DOWNLOAD_PATH is the URI (below the web server root directory) where
# the downloads are located on server
DOWNLOAD_PATH = "/support/downloads"

# PADDING_DIR is the directory in which the dynamic page padding files are
# located
PADDING_DIR = "/var/www/html/support/dynamic_padding/"

# DOWNLOAD_SUBDIRS must be the same value as the SUBDIRSCALING value
# used in the Wafgen rc file when creating the product images using Wafgen
# (or set to 0 if not used).   The concatenation of DOWNLOAD_PATH and
# BASE_SUBDIR_NAME needs to match the value of BASESUBDIRNAME used in
# the Wafgen rc file when creating the product images. Likewise,
# FIRST_SUBDIR_NUM must match the FIRSTSUBDIRECTORY value used in the
# Wafgen rc file used to create the product images.

DOWNLOAD_SUBDIRS = 0
BASE_SUBDIR_NAME = "/subdir0000"
FIRST_SUBDIR_NUM = 1

# Request-specific script file names; Use to specify any dynamic script
# for which the DYNAMIC_PATH script is not used. If you use just one
# script for all types of dynamic requests, these should be commented
# out, and that script should be specified under DYNAMIC_SCRIPT
DYN_SCRIPT_0 = "index.php"
DYN_SCRIPT_1 = "search.php"
DYN_SCRIPT_2 = "catalog.php"
DYN_SCRIPT_3 = "product.php"
DYN_SCRIPT_4 = "fileCatalog.php"
DYN_SCRIPT_5 = "file.php"
DYN_SCRIPT_6 = "download.php"

# Dynamic request commands for each page
DYN_CMD_0 = "home"
DYN_CMD_1 = "search"
DYN_CMD_2 = "catalog"
DYN_CMD_3 = "product"
DYN_CMD_4 = "fileCatalog"
DYN_CMD_5 = "file"
DYN_CMD_6 = "download"

# LG_BUF_SIZE is the size (in bytes) of the largest response returned by
# the web server for any type of request. 
LG_BUF_SIZE = 20480


########################################################################
# Fixed workload properties
# Changing these values will result in an invalid benchmark run
########################################################################

# Mean wait time (in seconds) between requests
THINK_TIME = 10

# Measured value for percentage of requests using think time
THINK_TIME_REQ_PCT = 93.20

# Max wait time (in seconds) between requests; should be evenly
# divisible by THINK_INTERVAL
# (note: effectively, max think time will not be more than ~15x the
#  mean wait time, regardless of longer specified times)
THINK_MAX = 150
THINK_INTERVAL = 1

USE_SSL = 1
# INVALIDATE_SESSION_PCT = 100

# Set SESSION_TIMEOUT > 0 to emulate session timeout for some sessions
# (with % of sessions timing out controlled by state transition values);
# set to 0 to end all sessions by logging out, instead
SESSION_TIMEOUT = 1

# Validatation directives - commenting out disables validation; results
# in non-compliant benchmark result (assigned value meaningless)
VALIDATE_TITLE = 1
VALIDATE_DYN_DATA = 1
VALIDATE_EMB_TXT = 1

# Time-based QOS criteria. The time limit (in milliseconds) below 
# which response times meet the respective QOS
TIME_GOOD = 3000
TIME_TOLERABLE = 5000
TIME_GOOD_PCT = 95
TIME_TOL_PCT = 99
MIN_REQUESTS = 100

# Byte-rate-based QOS criteria. The number of bytes/sec that a
# request is expected to meet for each defined QOS
BYTE_RATE_GOOD = 99000
BYTE_RATE_TOLERABLE = 95000

ZIPF_ALPHA = 0.55

# RESULT_REF_SCORE is the reference value used to calculate the
# final benchmark result value (relative to this reference point)
RESULT_REF_SCORE = 162

# State transition probabilities
# If cumulative probability is less than 1 and time-outs are enabled, the
# remainder is timeout probability.
NUM_STATES = "7"

STATE_0 = "1,0.25,2,0.75"
STATE_1 = "3,0.5,1,0.5"
STATE_2 = "3,0.75,1,0.25"
STATE_3 = "4,0.80,2,0.20"
STATE_4 = "5,0.60,3,0.40"
STATE_5 = "6,0.50,4,0.20,3,0.05,2,0.05,1,0.10,0,0.10"
STATE_6 = "7,1.0"

NUM_PAGES = 7

# Page Files
PAGE_0_FILES = "4,6,7,8,14,17,23,24,26,27"
PAGE_1_FILES = "4,6,8,14,17,23,24,26,31"
PAGE_2_FILES = "4,6,7,8,14,17,23,24"
PAGE_3_FILES = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,29,30"
PAGE_4_FILES = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25"
PAGE_5_FILES = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25"
PAGE_6_FILES = ""

DYN_CMD_0_EXPECTED_PCT = 8.1072
DYN_CMD_1_EXPECTED_PCT = 12.6125
DYN_CMD_2_EXPECTED_PCT = 11.7088
DYN_CMD_3_EXPECTED_PCT = 24.7746
DYN_CMD_4_EXPECTED_PCT = 22.5237
DYN_CMD_5_EXPECTED_PCT = 13.5135
DYN_CMD_6_EXPECTED_PCT = 6.7597

APPEND_SZ_0 = 51700
APPEND_SZ_1 = 18000
APPEND_SZ_2 = 27500
APPEND_SZ_3 = 52700
APPEND_SZ_4 = 94500
APPEND_SZ_5 = 113300
APPEND_SZ_6 = -1

# Image File Details
# <File#> = "<File Name>,<File Size>,<304 Response %>"
NUM_FILES = 31
FILE_1_DATA  = "aaa,34,0.66"
FILE_2_DATA  = "ccc,34,0.66"
FILE_3_DATA  = "___,810,0.66"
FILE_4_DATA  = "bar,60,0.8"
FILE_5_DATA  = "blue_arrow_right,50,0.66"
FILE_6_DATA  = "blue_arrow_top,50,0.8"
FILE_7_DATA  = "content_action,270,0.75"
FILE_8_DATA  = "content_arrow,130,0.8"
FILE_9_DATA  = "email,110,0.66"
FILE_10_DATA = "flattab_nl,80,0.66"
FILE_11_DATA = "flattab_nr,90,0.66"
FILE_12_DATA = "flattab_sl,90,0.66"
FILE_13_DATA = "flattab_sr,90,0.66"
FILE_14_DATA = "global,4180,0.8"
FILE_15_DATA = "help,700,0.66"
FILE_16_DATA = "H_D,1830,0.66"
FILE_17_DATA = "masthead_transparent,1510,0.8"
FILE_18_DATA = "masthead_global,110,0.66"
FILE_19_DATA = "masthead_local_sep,70,0.66"
FILE_20_DATA = "masthead_subnavsep,60,0.66"
FILE_21_DATA = "nav_q,250,0.66"
FILE_22_DATA = "print,360,0.66"
FILE_23_DATA = "spacer,40,0.8"
FILE_24_DATA = "template_javascripts,5670,0.8"
FILE_25_DATA = "us,80,0.66"
FILE_26_DATA = "note,980,0.5"
FILE_27_DATA = "h_product_selection,1920,0.0"
FILE_28_DATA = "button-1,240,0.0"
FILE_29_DATA = "button-2,260,0.0"
FILE_30_DATA = "button-3,260,0.0"
FILE_31_DATA = "H_Service_Tag_Unkown,2170,0.0"

PAGE_0_TITLE = "SPECweb2005: Support Home"
PAGE_1_TITLE = "SPECweb2005: Support Search Results for"
PAGE_2_TITLE = "SPECweb2005: Support Category"
PAGE_3_TITLE = "SPECweb2005: Support Product"
PAGE_4_TITLE = "SPECweb2005: Support Product"
PAGE_5_TITLE = "SPECweb2005: Support File"
PAGE_6_TITLE = ""

NUM_LANGUAGE_LIST = 30
NUM_OS_LIST = 10
NUM_DOWNLOAD_LIST = 20

# MARKER_FREQ is the interval between special characters in the
# wafgen-generated text files. It must be equal to the MARKERFREQUENCY
# value used by Wafgen in creating these files.
MARKER_FREQ = 4096

# how many digits the download directory name is (i.e. dir0000000001)
DOWNLOAD_NUM_LEN = 10

# Directory scaling, this must match the wafgen rc file
DIRSCALING = "0.10"

# NUM_CLASSES, CLASS_n_DIST, DOWNLOADS_PER_DIR, CLASS_n_FILE_DIST, 
# and CLASS_n_FILE SIZE must be synchronized with each other to work 
# correctly. Specifically, the sum of the class distributions 
# (CLASS_n_DIST) for the number of classes used (NUM_CLASSES) must be 
# equal to 1.0. Comment out unused class distributions or insert 
# additional class distributions, as needed.
NUM_CLASSES = 7
CLASS_0_DIST = 0.117
CLASS_1_DIST = 0.106
CLASS_2_DIST = 0.264
CLASS_3_DIST = 0.203
CLASS_4_DIST = 0.105
CLASS_5_DIST = 0.105
CLASS_6_DIST = 0.100

# Number of downloads in each directory; determined by the number of
# classes and files in wafgen file. This number must equal the number of 
# probability values for *all* of CLASS_n_FILE_DIST, below.
DOWNLOADS_PER_DIR = "24"

# CLASS_n_FILE_DIST indicates the probabilities of being chosen for each 
# file within a class. The sum of these values for each line must be 1.0.
CLASS_0_FILE_DIST = "0.273, 0.091, 0.165, 0.186, 0.285"
CLASS_1_FILE_DIST = "0.579, 0.178, 0.243"
CLASS_2_FILE_DIST = "0.275, 0.170, 0.170, 0.385"
CLASS_3_FILE_DIST = "0.667, 0.333"
CLASS_4_FILE_DIST = "0.575, 0.425"
CLASS_5_FILE_DIST = "0.350, 0.220, 0.115, 0.100, 0.100, 0.115"
CLASS_6_FILE_DIST = "0.475, 0.525"

# The first value in each pair is the size for the first file of that 
# class (the "base" file size). The second value represents the file
# size increment for each additional file in that class. 
CLASS_0_FILE_SIZE = "104858, 104858"
CLASS_1_FILE_SIZE = "629146, 125829"
CLASS_2_FILE_SIZE = "1048576, 256001"
CLASS_3_FILE_SIZE = "2097154, 1048573"
CLASS_4_FILE_SIZE = "3524287, 428901"
CLASS_5_FILE_SIZE = "4302606, 904575"
CLASS_6_FILE_SIZE = "35242871, 3904575"

