Add results from android stress testing
This commit is contained in:
parent
51a99f8d6e
commit
c8b7ff3ebe
7 changed files with 6614 additions and 9 deletions
|
@ -19,8 +19,7 @@ class MainActivity : AppCompatActivity() {
|
|||
// This is the entry point for the second thread.
|
||||
override fun run() {
|
||||
while (runningThreads) {
|
||||
val p =
|
||||
Pattern.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b")
|
||||
val p = Pattern.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,17 +41,13 @@ class MainActivity : AppCompatActivity() {
|
|||
Log.i("CPU-Stress", "Run #$i")
|
||||
|
||||
runningThreads = true
|
||||
for (i in 1..20) {
|
||||
for (i in 1..8 ) {
|
||||
RegexThread()
|
||||
}
|
||||
val start = System.currentTimeMillis()
|
||||
while (System.currentTimeMillis() - start > 1000) {
|
||||
}
|
||||
Thread.sleep(2000);
|
||||
runningThreads = false
|
||||
|
||||
val startSleep = System.currentTimeMillis()
|
||||
while (System.currentTimeMillis() - startSleep > 1000) {
|
||||
}
|
||||
Thread.sleep(2000);
|
||||
|
||||
i++
|
||||
if (i == 100) {
|
||||
|
|
Reference in a new issue