Class PerformanceTestRecorder
- java.lang.Object
-
- com.exasol.performancetestrecorder.PerformanceTestRecorder
-
public class PerformanceTestRecorder extends Object
This class records the execution of commands in a standardized format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePerformanceTestRecorder.RunnableWithExceptionFunctional interface for the method under test that can throw an exception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PathgetCsvFile()Get the path to the CSV file with the records.static PerformanceTestRecordergetInstance()Get a singleton instance ofPerformanceTestRecordervoidrecordExecution(org.junit.jupiter.api.TestInfo testInfo, PerformanceTestRecorder.RunnableWithException methodUnderTest)Record the execution of a command.
-
-
-
Method Detail
-
getInstance
public static PerformanceTestRecorder getInstance()
Get a singleton instance ofPerformanceTestRecorder- Returns:
- instance of
PerformanceTestRecorder
-
recordExecution
public void recordExecution(org.junit.jupiter.api.TestInfo testInfo, PerformanceTestRecorder.RunnableWithException methodUnderTest) throws ExceptionRecord the execution of a command.- Parameters:
testInfo- JUnit test info (used to get the name of the test-case)methodUnderTest- function that's execution time is recorded.- Throws:
Exception- passed through from methodUnderTest
-
getCsvFile
public Path getCsvFile()
Get the path to the CSV file with the records.- Returns:
- path to the file
-
-