plotByRate {WebAnalytics}R Documentation

Generates a plot that compares how percentile values in a metric of interest vary as an underlying rate metric changes.

Description

Data is supplied as separate columns for time, data, base rate,

Usage

plotByRate(timecol, 
      datacol, 
      baseratecol, 
      percentile, 
      breaksString, 
      baseratetimes = timecol, 
      xlab = "Rate", 
      ylab="Variation from overall 95th percentile", 
      title="", 
      baseTimeCol = NULL, 
      baseDataCol=NULL, 
      baseBaseRateCol = NULL, 
      outlierPercentile=NULL) 

Arguments

timecol

the timestamps for the data column

datacol

the data to be compared with the rate column (y axis)

baseratecol

the underlying rate (x axis on the plot), as a list of counts (setting a dataframe column to 1 works for a web server log dataframe). The rate is calculated over the breaksString interval, meaning that if you want to aggregate over a ten minute interval and report an indicative per-second rate the counts in this column must be scaled by dividing them by 600, the number of seconds in ten minutes.

percentile

the percentile value that the values are calculated at, the percentiles are calculated for each breaksString interval and converted to differences from the value of the percentile calculated over the whole period.

breaksString

the time interval used for calculation of percentile values, it is supplied to the cut function to group the data values.

baseratetimes

the timestamps for the base data if they are not the same as the timestamps for the data column (defaults to the data column timestamps). The two sets of timestamps must correspond in some way and the extent to which they do not align must be accounted for in the breaks interval, for example a few seconds or minutes difference would not be an issue for an aggregation interval of an hour, but would be a problem if aggregation is being done by minute or second

xlab

label for the rate metric

ylab

label for the data metric

title

the plot title

baseTimeCol

Use this parameteter and the associated baseDataCol as an alternative time base and data to summarise the data.

baseDataCol

Data values associated with the rate column above.

baseBaseRateCol

Rate column for the prevoious two columns.

outlierPercentile

discard data above this percentile

Value

Returns an R base graphics plot. This function is intended to be wrapped in a call to plotSave

Author(s)

Greg Hunt <greg@firmansyah.com>

See Also

cut

Examples



logFileName = logFileNamesGetLast(dataDirectory=datd, 
  directoryNames=c(".", "."), 
  fileNamePattern="*[.]log")[[1]]

cols = logFileFieldsGetIIS(logFileName)

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

plotByRate(logdf$ts, 
      logdf$elapsed, 
      logdf$numrequestsinthisrecord, 
      0.95, 
      "10 mins", 
      xlab="request rate (10 minutes)",
      ylab="variance from overall 95th percentile response time (milliseconds)")


[Package WebAnalytics version 0.9.12 Index]