org.apache.sling.performance

## Class PerformanceRecord

- java.lang.Object
- - org.apache.sling.performance.PerformanceRecord

    public class PerformanceRecord
    extends Object

Wrapper for recorded performance statistics and defined threshold

### Constructor Summary

Constructors
Constructor and Description
`PerformanceRecord(org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics, Number threshold)`

### Method Summary

Methods
`String` `checkThreshold(org.apache.commons.math.stat.descriptive.DescriptiveStatistics reference)` Checks internal statistics against `reference`.
`org.apache.commons.math.stat.descriptive.DescriptiveStatistics` `getStatistics()`
`Number` `getThreshold()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PerformanceRecord

    public PerformanceRecord(org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics,
                     Number threshold)

### Method Detail

#### getStatistics

    public org.apache.commons.math.stat.descriptive.DescriptiveStatistics getStatistics()

#### getThreshold

    public Number getThreshold()

#### checkThreshold

    public String checkThreshold(org.apache.commons.math.stat.descriptive.DescriptiveStatistics reference)

Checks internal statistics against `reference`. Current implementation looks at 50 percentile.

Parameters:
  `reference` - Reference statistics
Returns:
  An error string if threshold is exceeded, `null` if not