You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/02/14 00:37:54 UTC
incubator-usergrid git commit: Changed the feeder to be infinite so
the tests can be time based.
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o-import 4323ab1df -> bb0132d88
Changed the feeder to be infinite so the tests can be time based.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/bb0132d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/bb0132d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/bb0132d8
Branch: refs/heads/two-dot-o-import
Commit: bb0132d882eddbf66b8c4360e444d698a26a672a
Parents: 4323ab1
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Feb 13 16:37:52 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Fri Feb 13 16:37:52 2015 -0700
----------------------------------------------------------------------
.../datagenerators/FeederGenerator.scala | 22 +++++++++++++-------
.../PostCustomEntitySimulation.scala | 2 +-
2 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bb0132d8/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
index 6733f62..6bd28a7 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
@@ -143,13 +143,19 @@
}
- def generateCustomEntityFeeder(numEntities: Int): Array[Map[String, String]] = {
- var entityArray: ArrayBuffer[Map[String, String]] = new ArrayBuffer[Map[String, String]]
- for (entityCount <- 1 to numEntities) {
- var entity: Map[String, String] = EntityDataGenerator.generateCustomEntity(entityCount.toString)
- entityArray += entity
- }
- return entityArray.toArray
- }
+
+
+
+ /**
+ * Generate users forever
+ * @param seed The seed
+ * @return
+ */
+ def generateCustomEntityInfinite(seed:Int): Iterator[Map[String, String]] = {
+ val userFeeder = Iterator.from(seed).map(i=>EntityDataGenerator.generateCustomEntity(i.toString))
+ return userFeeder
+ }
+
+
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bb0132d8/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
index 5846191..c0ef23a 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostCustomEntitySimulation.scala
@@ -48,7 +48,7 @@ class PostCustomEntitySimulation extends Simulation {
val collectionType:String = "restaurants"
val rampTime:Int = Settings.rampTime
val throttle:Int = Settings.throttle
- val feeder = FeederGenerator.generateCustomEntityFeeder(numEntities).queue
+ val feeder = FeederGenerator.generateCustomEntityInfinite(0)
val httpConf = Settings.httpConf
val scnToRun = scenario("POST custom entities")