public class ReportLogger extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReportLogger.ReportType |
Modifier and Type | Field and Description |
---|---|
static String |
REPORTS_DIR |
Modifier and Type | Method and Description |
---|---|
static List<org.junit.runner.notification.Failure> |
checkAllThresholds()
Check all thresholds for all records in all registered loggers
|
List<org.junit.runner.notification.Failure> |
checkThresholds()
Test if any of the PerformanceRecord exceeds their threshold against the reference
|
static ReportLogger |
getOrCreate(String testSuiteName,
String testCaseName,
String className,
String referenceMethod)
Factory method for ReportRecorder.
|
void |
recordStatistics(String methodName,
org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics,
double threshold)
Record statistics for given method
|
static void |
writeAllResults()
Write results from all registered loggers
|
static void |
writeReport(String testSuiteName,
String testCaseName,
String className,
String methodName,
org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics,
ReportLogger.ReportType reportType,
PerformanceRunner.ReportLevel reportLevel)
Method the writes the performance report after a test is run
|
static void |
writeReportTxt(String testSuiteName,
String testCaseName,
String className,
String methodName,
org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics,
PerformanceRunner.ReportLevel reportLevel)
Method the writes the performance report after a test is run, in text format
|
static void |
writeReportTxt(String testSuiteName,
String testCaseName,
String className,
String methodName,
double min,
double percentile10,
double percentile50,
double percentile90,
double max,
PerformanceRunner.ReportLevel reportLevel)
Method that writes the performance report
|
static void |
writeReportTxt(String testSuiteName,
String testCaseName,
String className,
String methodName,
double min,
double percentile10,
double percentile50,
double percentile90,
double max,
PerformanceRunner.ReportLevel reportLevel,
boolean showDecimals)
Method that writes the performance report
|
void |
writeResults()
Write all records to file in TXT format
|
public static final String REPORTS_DIR
public static ReportLogger getOrCreate(String testSuiteName, String testCaseName, String className, String referenceMethod)
testSuiteName
- testCaseName
- className
- referenceMethod
- public static void writeReport(String testSuiteName, String testCaseName, String className, String methodName, org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics, ReportLogger.ReportType reportType, PerformanceRunner.ReportLevel reportLevel) throws Exception
testSuiteName
- testCaseName
- className
- methodName
- statistics
- reportType
- reportLevel
- Exception
public static void writeReportTxt(String testSuiteName, String testCaseName, String className, String methodName, org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics, PerformanceRunner.ReportLevel reportLevel) throws Exception
testSuiteName
- testCaseName
- className
- methodName
- statistics
- reportLevel
- Exception
public static void writeReportTxt(String testSuiteName, String testCaseName, String className, String methodName, double min, double percentile10, double percentile50, double percentile90, double max, PerformanceRunner.ReportLevel reportLevel) throws Exception
testSuiteName
- testCaseName
- className
- methodName
- min
- percentile10
- percentile50
- percentile90
- max
- reportLevel
- Exception
public static void writeReportTxt(String testSuiteName, String testCaseName, String className, String methodName, double min, double percentile10, double percentile50, double percentile90, double max, PerformanceRunner.ReportLevel reportLevel, boolean showDecimals) throws Exception
testSuiteName
- testCaseName
- className
- methodName
- min
- percentile10
- percentile50
- percentile90
- max
- reportLevel
- showDecimals
- Exception
public static void writeAllResults() throws Exception
Exception
public static List<org.junit.runner.notification.Failure> checkAllThresholds() throws ClassNotFoundException
ClassNotFoundException
public void recordStatistics(String methodName, org.apache.commons.math.stat.descriptive.DescriptiveStatistics statistics, double threshold)
methodName
- statistics
- public void writeResults() throws Exception
Exception
public List<org.junit.runner.notification.Failure> checkThresholds() throws ClassNotFoundException
ClassNotFoundException
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.