All Packages Class Hierarchy This Package Previous Next Index
Class spec.harness.Context
spec.harness.Context
- public final class Context
This class is used to define the context for the execution of the
benchmark. This container class has the parameters which can hold
the benchmark run specific parameters like the run time, speed,
files opened, number of cached_files, SpecBasePath, console window
for displaying the trace
-
out
- out is the PrintStream into which the trace messages will be written.
-
Context()
-
-
addCachedDataSize(int)
- Increments the the cached_data parameter by the integer passed.
-
addIOtime(long)
- Increments the IOTime by the value provided
-
appendWindow(String)
- Output to console window
-
cdInput()
- This function changes the basepath to point to the input directory
of the benchmark.
-
clearIOtime()
- Clears the IOtiming.
-
DecrementNumOpenFiles()
-
Decrements the number of Files open parameter
-
getBasePath()
- Returns the spec base path.
-
getCachedDataSize()
- gets the cached data size.
-
getCommandLineMode()
- Get commandLineMode flag
-
getGraphicsMode()
- Returns the graphic mode flag value
-
getIOtime()
- Returns the IO time
-
getNumCachedFiles()
- gets the numbef of cached files.
-
getNumOpenFiles()
-
returns the number of files open
-
getSpecBasePath()
- returns the specbase path
-
getSpeed()
- Returns the speed of the benchmark.
-
getUserPropFile()
- Returns the properties file name
-
getValue(String, int)
- This function returns the integer value given the String form
of it.
-
getVerify()
- Get verify flag
-
IncrementNumCachedFiles()
- Increments the the num_cached_files parameter by 1.
-
IncrementNumOpenFiles()
-
Increments the number of Files open parameter.
-
isBatch()
- Returns whether SpecJVMClient is running in batch mode
-
isCachedInput()
- Returns the cached input flag
-
isNetworkAccess()
- Indicates whether SpecJVMClient is running as an applet or application
-
setBatch(boolean)
- Sets the batch flag
-
setBenchmarkRelPath(String)
- sets the benchmark relative path.
-
setCachedInputFlag(boolean)
- Sets the CachedInput flag.
-
setCommandLineMode(boolean)
- Set commandLineMode flag
-
setGraphicsMode(boolean)
- Sets the graphics mode.
-
setNetworkAccess(boolean)
-
Sets the network access flag
-
setSpecBasePath(String)
- This function set the SpecBasePath to the string value passed with
some data stripped.
-
setSpeed(int)
-
Sets the speed of execution to the value passed.
-
setupConsoleWindow()
- This function creates the new Console window and the print stream
-
setUserPropFile(String)
- Sets the user properties file.
-
setVerify(boolean)
- Set verify flag
-
startOutputWindow()
- Start output window
-
stopOutputWindow()
- Stop output window
out
public static PrintStream out
- out is the PrintStream into which the trace messages will be written.
This is assigned to the System.output stream by default
Context
public Context()
getValue
public static int getValue(String s,
int deft)
- This function returns the integer value given the String form
of it. In case of any number format exception, the function returns
default value.
- Parameters:
- s - String value passed
- deft - the default value to be returned.
setupConsoleWindow
public static void setupConsoleWindow()
- This function creates the new Console window and the print stream
- See Also:
- ConsoleWindow
setSpecBasePath
public static void setSpecBasePath(String basepath)
- This function set the SpecBasePath to the string value passed with
some data stripped.
- Parameters:
- basePath - The URL of the file
getSpecBasePath
public static String getSpecBasePath()
- returns the specbase path
addCachedDataSize
public static void addCachedDataSize(int num)
- Increments the the cached_data parameter by the integer passed.
- Parameters:
- num - increment value
getCachedDataSize
public static int getCachedDataSize()
- gets the cached data size.
- Returns:
- The cached_data value
IncrementNumCachedFiles
public static void IncrementNumCachedFiles()
- Increments the the num_cached_files parameter by 1.
getNumCachedFiles
public static int getNumCachedFiles()
- gets the numbef of cached files.
- Returns:
- The num_cached_files value
IncrementNumOpenFiles
public static void IncrementNumOpenFiles()
- Increments the number of Files open parameter. The number of files
open parameter is used for debugging purposes to findout whether the
finalizers are called or not
DecrementNumOpenFiles
public static void DecrementNumOpenFiles()
- Decrements the number of Files open parameter
getNumOpenFiles
public static int getNumOpenFiles()
- returns the number of files open
setBenchmarkRelPath
public static void setBenchmarkRelPath(String rpath)
- sets the benchmark relative path. For example if SpecBasepath is
/var/htdocs/v11/spec, The relative benchmark path path for
_201_compress is benchmarks/_201_compress. This function adds these
two strings and forms the BasePath
BasePath = /var/htdocs/v11/spec + benchmarks/_201_compress
- Parameters:
- rpath - Relative path of the benchmark
cdInput
public static void cdInput()
- This function changes the basepath to point to the input directory
of the benchmark. this function just concatinates the "/input"
to the existing basepath if it is not added already.
setNetworkAccess
public static void setNetworkAccess(boolean flag)
- Sets the network access flag
- Parameters:
- flag - Flag indicating the network access
getBasePath
public static String getBasePath()
- Returns the spec base path. This function is handly in loading the files
from the relative directories.
isNetworkAccess
public static boolean isNetworkAccess()
- Indicates whether SpecJVMClient is running as an applet or application
setSpeed
public static void setSpeed(int n)
- Sets the speed of execution to the value passed. Depending on the
user's selection, the speed of execution is set as 1% 10% or 100%
- Parameters:
- n - Speed selected by the user
getSpeed
public static int getSpeed()
- Returns the speed of the benchmark.
setCachedInputFlag
public static void setCachedInputFlag(boolean cif)
- Sets the CachedInput flag. The data is read from the Cache during the second
run if this flag is set.
setBatch
public static void setBatch(boolean b)
- Sets the batch flag
- Parameters:
- b - boolean value for the batch flag
isBatch
public static boolean isBatch()
- Returns whether SpecJVMClient is running in batch mode
setGraphicsMode
public static void setGraphicsMode(boolean mode)
- Sets the graphics mode. Normally SepcJVM client runs with graphics disabled.
This flag is for future extensions and debugging
getGraphicsMode
public static boolean getGraphicsMode()
- Returns the graphic mode flag value
setUserPropFile
public static void setUserPropFile(String s)
- Sets the user properties file. These properties are stored in the mail sent at
the end of the test
- Parameters:
- s - Properties file name
getUserPropFile
public static String getUserPropFile()
- Returns the properties file name
isCachedInput
public static boolean isCachedInput()
- Returns the cached input flag
clearIOtime
public static void clearIOtime()
- Clears the IOtiming. This is normally done before starting a benchmark
addIOtime
public static void addIOtime(long time)
- Increments the IOTime by the value provided
- Parameters:
- time - Incremental value
getIOtime
public static long getIOtime()
- Returns the IO time
setCommandLineMode
public static void setCommandLineMode(boolean value)
- Set commandLineMode flag
getCommandLineMode
public static boolean getCommandLineMode()
- Get commandLineMode flag
setVerify
public static void setVerify(boolean value)
- Set verify flag
getVerify
public static boolean getVerify()
- Get verify flag
startOutputWindow
public static void startOutputWindow()
- Start output window
stopOutputWindow
public static void stopOutputWindow()
- Stop output window
appendWindow
public static void appendWindow(String s)
- Output to console window
All Packages Class Hierarchy This Package Previous Next Index