You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/11/16 18:15:53 UTC
[09/10] brooklyn-server git commit: Performance tests: minor tidy up
Performance tests: minor tidy up
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/02881692
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/02881692
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/02881692
Branch: refs/heads/master
Commit: 02881692851648ddeaa3d7a03b234eb69b5f363c
Parents: bfccd60
Author: Aled Sage <al...@gmail.com>
Authored: Wed Nov 16 18:01:31 2016 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Wed Nov 16 18:09:16 2016 +0000
----------------------------------------------------------------------
.../qa/performance/AbstractPerformanceTest.java | 4 +--
.../EntityPerformanceLongevityTest.java | 35 --------------------
.../qa/performance/EntityPerformanceTest.java | 3 ++
.../GroovyYardStickPerformanceTest.groovy | 2 +-
.../qa/performance/TaskPerformanceTest.java | 1 -
.../ssh/cli/SshCliToolPerformanceTest.java | 7 ----
6 files changed, 6 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/AbstractPerformanceTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/AbstractPerformanceTest.java b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/AbstractPerformanceTest.java
index 739877b..d6b77d3 100644
--- a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/AbstractPerformanceTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/AbstractPerformanceTest.java
@@ -28,9 +28,9 @@ import org.apache.brooklyn.core.entity.Entities;
import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
import org.apache.brooklyn.core.location.SimulatedLocation;
import org.apache.brooklyn.core.test.entity.TestApplication;
+import org.apache.brooklyn.test.performance.PerformanceMeasurer;
import org.apache.brooklyn.test.performance.PerformanceTestDescriptor;
import org.apache.brooklyn.test.performance.PerformanceTestResult;
-import org.apache.brooklyn.test.performance.PerformanceMeasurer;
import org.apache.brooklyn.util.internal.DoubleSystemProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -87,7 +87,7 @@ public class AbstractPerformanceTest {
protected PerformanceTestResult measure(PerformanceTestDescriptor options) {
PerformanceTestResult result = PerformanceMeasurer.run(options);
- System.out.println("test="+options+"; result="+result);
+ LOG.info("test="+options+"; result="+result);
return result;
}
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceLongevityTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceLongevityTest.java b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceLongevityTest.java
deleted file mode 100644
index 87cdf2a..0000000
--- a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceLongevityTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.core.test.qa.performance;
-
-import org.testng.annotations.Test;
-
-
-@Test(groups={"Integration", "Acceptance"})
-public class EntityPerformanceLongevityTest extends EntityPerformanceTest {
-
- // TODO enable this to some big number to see what happens when things run for a long time.
- // e.g. will we eventually get OOME when storing all tasks relating to effector calls?
-
-// @Override
-// protected int numIterations() {
-// return 1000000;
-// }
-
-}
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceTest.java b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceTest.java
index c73b344..6f77ab3 100644
--- a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/EntityPerformanceTest.java
@@ -41,6 +41,9 @@ import com.google.common.collect.Lists;
public class EntityPerformanceTest extends AbstractPerformanceTest {
+ // TODO could have variant with a much larger numIterations, as a longevity test.
+ // e.g. will we eventually get OOME when storing all tasks relating to effector calls?
+
private static final long TIMEOUT_MS = 10*1000;
TestEntity entity;
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/GroovyYardStickPerformanceTest.groovy
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/GroovyYardStickPerformanceTest.groovy b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/GroovyYardStickPerformanceTest.groovy
index 3940b49..eba28ef 100644
--- a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/GroovyYardStickPerformanceTest.groovy
+++ b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/GroovyYardStickPerformanceTest.groovy
@@ -57,7 +57,7 @@ public class GroovyYardStickPerformanceTest extends AbstractPerformanceTest {
double minRatePerSec = 1000000 * PERFORMANCE_EXPECTATION;
AtomicInteger i = new AtomicInteger();
- measure(MeasurementOptions.create()
+ measure(PerformanceTestDescriptor.create()
.summary("GroovyYardStickPerformanceTest.noop")
.iterations(numIterations)
.minAcceptablePerSecond(minRatePerSec)
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/TaskPerformanceTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/TaskPerformanceTest.java b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/TaskPerformanceTest.java
index b0f9a07..ca05734 100644
--- a/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/TaskPerformanceTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/test/qa/performance/TaskPerformanceTest.java
@@ -29,7 +29,6 @@ import org.apache.brooklyn.util.collections.MutableMap;
import org.apache.brooklyn.util.core.task.BasicExecutionManager;
import org.apache.brooklyn.util.core.task.SingleThreadedScheduler;
import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.time.Duration;
import org.apache.brooklyn.util.time.Time;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/02881692/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliToolPerformanceTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliToolPerformanceTest.java b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliToolPerformanceTest.java
index 364d21c..acc04b7 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliToolPerformanceTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/internal/ssh/cli/SshCliToolPerformanceTest.java
@@ -22,8 +22,6 @@ import java.util.Map;
import org.apache.brooklyn.util.core.internal.ssh.SshTool;
import org.apache.brooklyn.util.core.internal.ssh.SshToolAbstractPerformanceTest;
-import org.apache.brooklyn.util.core.internal.ssh.cli.SshCliTool;
-import org.testng.annotations.Test;
/**
* Test the performance of different variants of invoking the sshj tool.
@@ -36,9 +34,4 @@ public class SshCliToolPerformanceTest extends SshToolAbstractPerformanceTest {
protected SshTool newSshTool(Map<String,?> flags) {
return new SshCliTool(flags);
}
-
- // Need to have at least one test method here (rather than just inherited) for eclipse to recognize it
- @Test(enabled = false)
- public void testDummy() throws Exception {
- }
}