Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve TestSystemPerformance reporting
Also, temporarily disabled some asserts.
- Loading branch information
Showing
2 changed files
with
126 additions
and
36 deletions.
There are no files selected for viewing
56 changes: 51 additions & 5 deletions
56
testing/story/src/test/java/com/evolveum/midpoint/testing/story/sysperf/OtherParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,64 @@ | ||
package com.evolveum.midpoint.testing.story.sysperf; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import static com.evolveum.midpoint.testing.story.sysperf.TestSystemPerformance.*; | ||
|
||
public class OtherParameters { | ||
|
||
private static final String PROP_LABEL = "label"; | ||
private static final String PROP_TASK_TIMEOUT = "taskTimeout"; | ||
|
||
final String label; | ||
final int taskTimeout; | ||
|
||
private OtherParameters(int taskTimeout) { | ||
this.taskTimeout = taskTimeout; | ||
private OtherParameters() { | ||
this.label = System.getProperty(PROP_LABEL, createDefaultLabel()); | ||
this.taskTimeout = Integer.parseInt(System.getProperty(PROP_TASK_TIMEOUT, "1800000")); // 30 minutes | ||
} | ||
|
||
private String createDefaultLabel() { | ||
return SOURCES_CONFIGURATION.getNumberOfResources() + "s-" + | ||
getSourceMappingsLabel() + "-" + | ||
TARGETS_CONFIGURATION.getNumberOfResources() + "t-" + | ||
getTargetMappingsLabel() + "-" + | ||
getAssignmentsLabel() | ||
; | ||
} | ||
|
||
@NotNull | ||
private String getSourceMappingsLabel() { | ||
int single = SOURCES_CONFIGURATION.getSingleValuedMappings(); | ||
int multi = SOURCES_CONFIGURATION.getMultiValuedMappings(); | ||
if (single == multi) { | ||
return single + "m"; | ||
} else { | ||
return single + "sm-" + multi + "mm"; | ||
} | ||
} | ||
|
||
@NotNull | ||
private String getTargetMappingsLabel() { | ||
int single = TARGETS_CONFIGURATION.getSingleValuedMappings(); | ||
int multi = TARGETS_CONFIGURATION.getMultiValuedMappings(); | ||
if (single == multi) { | ||
return single + "m"; | ||
} else { | ||
return single + "sm" + multi + "mm"; | ||
} | ||
} | ||
|
||
private String getAssignmentsLabel() { | ||
int min = ROLES_CONFIGURATION.getNumberOfAssignmentsMin(); | ||
int max = ROLES_CONFIGURATION.getNumberOfAssignmentsMax(); | ||
if (min == max) { | ||
return min + "a"; | ||
} else { | ||
return min + "-" + max + "a"; | ||
} | ||
} | ||
|
||
static OtherParameters setup() { | ||
return new OtherParameters( | ||
Integer.parseInt(System.getProperty(PROP_TASK_TIMEOUT, "1800000")) // 30 minutes | ||
); | ||
return new OtherParameters(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters