| configVariablesLoad | R Documentation |
These are functions to read, validate and execute a report configuration file placing its output as a series of variables in a hidden scope; they also access and check existence of the variables. Variables whose names begin 'config.' will be printed at load time along with their values.
configVariablesLoad(fileName="report.config")
configVariableGet(name)
configVariableIs(name)
configVariablesAll()
configVariableSet(name, value)
fileName |
The name of the configuration file |
name |
The name of a variable from the config file. |
value |
The value to be assigned to the config variable name. |
The configuration file is an R script that is intended to be used to define the variables and helper functions that control the supplied sample report script. The config file may be executed more than once as part of validating its content.
String values in the config file should be quoted using double quote characters. Lists of values are written using the R c() function, for example c("a","b")
Switches controlling behaviour
config.projectNameThe Project name for the cover page of the document. This is also printed on the internal page headers.
Required
No Default Value
config.documentNameThe name to be printed on the document cover page.
Required
No Default value
config.current.dataDirData is assumed to be stored in a directory hierarchy, with a root directory and a series of child directories corresponding with the individual web servers, this variable specifies the root directory of that hierarchy. For example a directory structure might be a series of server specific logs under /var/logs/apache, with the individual servers' logs being located in /var/logs/apache/server1, /var/logs/apache/server2 and /var/logs/apache/server3. the data dir in this case is /var/logs/apache with the config.current.dirNames being specified as c("server1", "server2", "server3").
Required
No Default Value
config.current.dirNamesThis is the list of child directory paths, often corresponding with a list of server names, it must be a concatenation of strings, for example c("PRODMAW1","PRODMAW2").
Multiple directory names can be coded here: c("PRODMAW1/app1","PRODMAW2/app1").
Required
No Default Value
config.current.columnListThe list of column names in the log file, for example
c("Apache", "elapsedus", "jsessionid").
See logFileRead for the list of valid column names. The name Apache is an abbreviation for the Apache common log format:
c("userip", "ignored column 1", "username", "ApacheTimestamp", "url", "httpcode", "responsebytes")
Required
No Default Value
config.readBaselineRead a baseline log to be compared with current behaviour. Valid values are either TRUE or FALSE.
Optional
Default value: FALSE
config.baseline.dataDirThe root directory for the baseline data files
Must be supplied if config.readBaseline=TRUE
No Default Value
config.baseline.dirNamesThe list of baseline log server-specific directories, usually a list of server names, it must be a concatenation of strings, for example c("PRODMAW1","PRODMAW2")
Must be specified if config.readBaseline=TRUE
No Default Value,
config.baseline.columnListThe list of columns to be read. It is the baseline version of
config.current.columnList
Must be specified if config.readBaseline=TRUE
No Default Value
config.generateGraphForTimeOverResponse time graphs and histograms are generated for URLs whose maximum elapsed time exceeds this number of milliseconds
Optional
Default Value: 10000
config.generateServerSessionStatsGenerate histograms and counts of requests by server. These are only generated if jsessionid is also one of the column names in the current data
Optional
Default Value: TRUE
config.generatePercentileRankingsGenerate tables that compare frequencies and total elapsed times of URLs in the baseline and current data. Intended to be used for calibrating performance test workloads
Optional
Default Value: FALSE
config.fix.dataAn R function definition that is used to adjust the data read from the log files. This is provided in the sample report configuration file. The function must categorise records using the literals "Static Content Requests" and "Monitoring". The function supplied in the sample.config file created by workingDirectoryPopulate is a good starting point and can be used to subset or correct the log data as it is read to focus on a smaller subset of records.
Optional
No Default Value
config.fix.current.dataThe function to be used to adjust baseline data if different cleaning functions are to be applied to current and baseline data
Optional
No Default Value
config.fix.baseline.dataThe function to use if different functions are to be applied to current and baseline data
Optional
Default value: config.fix.current.data
config.tempdirThe name of the temp dir to be used for storage of generated graphics.
Optional
Default Value: ./txdata/
config.useragent.generateFrequenciesGenerate the User Agent Frequency Section of the report. Setting this to FALSE suppresses the report, which in any case is only produced if the current dataset contains user agent strings.
Optional
Default Value: TRUE
config.useragent.minimumPercentageThe minimum percentage that a User Agent family or version must represent to be considered.
Optional
Default Value: 2
config.useragent.maximumPercentileThe maximum cumulative percentile to report. The last few percent is made up of very low frequency of occurrence User agents that are not feasible (or in many cases possible) to test.
Optional
Default Value: 96
config.useragent.discardOtherDiscard browser family "Other" records. These are typically monitoring or heartbeat sources whose frequencies distort the percentile calculations.
Optional
Default Value: TRUE
config.authorName of the author of the report. Displayed on the default first page and in the page footer.
Optional
Default Value: Author
config.securityClassThe security classification of the document. Displayed on the default first page and in the page footer.
Optional
Default Value: Commercial-In-Confidence
config.longurls.thresholdThe length in characters of a URL above which the URL text is replaced by a placeholder and the URL content is logged. Increasing this number will allow processing of longer URL text, but can lead to problems in LaTeX's processing the file.
Optional
Default Value: 1000
configVariableIs returns a boolean to indicate existence of a named variable configVariableGet returns the value of the variable configVariableAll returns a list of all variables configVariableSet does not return a value
Greg Hunt <greg@firmansyah.com>
workingDirectoryPopulate
logFileRead
logFileListRead
configVariablesLoad(fileName=paste0(tempdir(),"/xx/sample.config"))
if(configVariableIs("config.documentName"))
{
print(configVariableGet("config.documentName"))
}
allvars = configVariablesAll()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.