Learn R Programming

WebAnalytics (version 0.9.13)

summaryTxDataFrameCreate: Creates a dataframe containing summary URL performance metrics

Description

From a dataframe containing log data, calculate 95th percentile response, total wait and error counts, embed TeX hyperlinks referencing the URL. Return these in a dataframe intended for printing in a report.

Usage

summaryTxDataFrameCreate(logDataframe)

Value

Returns a dataframe containing columns

Response (sec, 95th pctl)

95th Percentile response time for the URL

Transaction

The URL

Count

Number of requests for that URL

Total Wait (sec)

Total wait time for the URL in seconds

Server Errors

Number of HTTP 5xx errors

Client Error

Number of HTTP 4xx errors

Redirect

Number of HTTP 3xx responses

Success

Number of HTTP 200 responses

Arguments

logDataframe

a dataframe created by the functions that read log files.

Author

Greg Hunt <greg@firmansyah.com>

Examples

Run this code
# \dontshow{
datd = paste0(tempdir(),"/minconfigtemp")
unlink(datd)
dir.create(paste0(tempdir(),"/minconfigtemp"))
logfile = paste0(datd,"/log.log")
fileConn = gzfile(system.file("extdata", "compressed.log", package = "WebAnalytics"))
writeLines(readLines(fileConn),con=logfile)
close(fileConn)
# set the files directory name suitable for an R example
configVariableSet("config.workdir", tempdir())
# }
logFileName = logFileNamesGetLast(dataDirectory=datd, 
  directoryNames=c(".", "."), 
  fileNamePattern="*[.]log")[[1]]

cols = logFileFieldsGetIIS(logFileName)

logdf = logFileRead(logFileName, columnList=cols, 
            logTimeZone = "", timeFormat = "")

summarydf = summaryTxDataFrameCreate(logdf)

Run the code above in your browser using DataLab