Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ponkotuy
committed
Feb 12, 2015
1 parent
df12928
commit 6fb0a9e
Showing
4 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import play.api.libs.iteratee.Iteratee | ||
import play.api.libs.concurrent.Execution.Implicits._ | ||
|
||
/** | ||
* | ||
* @author ponkotuy | ||
* Date: 15/02/13. | ||
*/ | ||
object Common { | ||
val printIteratee: Iteratee[Array[Byte], Unit] = Iteratee.foreach(ary => println(ary.length)) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import controllers.ViewSta | ||
import play.api.test.Helpers._ | ||
import play.api.test._ | ||
|
||
import scala.concurrent.Await | ||
import scala.util.Try | ||
import scala.concurrent.duration._ | ||
|
||
/** | ||
* | ||
* @author ponkotuy | ||
* Date: 15/02/13. | ||
*/ | ||
object DropStage extends App { | ||
import Common._ | ||
val count = Try { args(0).toInt }.getOrElse(100) | ||
running(FakeApplication(additionalConfiguration = Settings.dbMap)) { | ||
val futures = (1 to count).map { _ => | ||
ViewSta.dropStage().apply(FakeRequest()) | ||
} | ||
futures.map { f => | ||
Await.result(f, 10.second).body.run(printIteratee) | ||
} | ||
} | ||
} |
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
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