This is an automated email from the ASF dual-hosted git repository. kbowers pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-benchmarks.git
commit 73d8aeb33319cf0d94d4c62963c41991c4746b89 Author: Marián Macik <[email protected]> AuthorDate: Wed Jul 7 21:12:50 2021 +0200 BAQE-1912 - Parameterize CPU affinity --- kogito-benchmarks-tests/pom.xml | 5 +++++ .../test/java/org/kie/kogito/benchmarks/AbstractTemplateTest.java | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kogito-benchmarks-tests/pom.xml b/kogito-benchmarks-tests/pom.xml index be0a998..e1d993e 100644 --- a/kogito-benchmarks-tests/pom.xml +++ b/kogito-benchmarks-tests/pom.xml @@ -16,9 +16,13 @@ <description>Benchmarks of sample Kogito apps themselves</description> <properties> + <!-- Framework --> <appsDir>apps-dir-needs-to-be-specified</appsDir> <archivedLogsDir>${project.basedir}/archived-logs</archivedLogsDir> + <!-- Test Suite --> + <cpuAffinity>4</cpuAffinity> <!-- Positive number sets the CPU affinity explicitly --> + <version.org.apache.httpcomponents>4.5.13</version.org.apache.httpcomponents> </properties> @@ -57,6 +61,7 @@ <systemPropertyVariables> <appsDir>${appsDir}</appsDir> <archivedLogsDir>${archivedLogsDir}</archivedLogsDir> + <cpuAffinity>${cpuAffinity}</cpuAffinity> </systemPropertyVariables> </configuration> </plugin> diff --git a/kogito-benchmarks-tests/src/test/java/org/kie/kogito/benchmarks/AbstractTemplateTest.java b/kogito-benchmarks-tests/src/test/java/org/kie/kogito/benchmarks/AbstractTemplateTest.java index 3763365..d144781 100644 --- a/kogito-benchmarks-tests/src/test/java/org/kie/kogito/benchmarks/AbstractTemplateTest.java +++ b/kogito-benchmarks-tests/src/test/java/org/kie/kogito/benchmarks/AbstractTemplateTest.java @@ -68,6 +68,7 @@ public abstract class AbstractTemplateTest { private static final Logger logger = LoggerFactory.getLogger(AbstractTemplateTest.class); public static final int START_STOP_ITERATIONS = 3; + public static final int CPU_AFFINITY = Integer.parseInt(System.getProperty("cpuAffinity")); public static final String LOCALHOST = "http://localhost:8080"; public void startStop(TestInfo testInfo, App app) throws IOException, InterruptedException { @@ -223,7 +224,9 @@ public abstract class AbstractTemplateTest { // Start the App RunInfo runInfo = startApp(app, whatIDidReport); - setCPUAffinity(runInfo, 4); + if (CPU_AFFINITY > 0) { + setCPUAffinity(runInfo, CPU_AFFINITY); + } pA = runInfo.getProcess(); runLogA = runInfo.getRunLog(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
