summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2013-11-19 22:12:48 -0800
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2013-11-19 22:12:48 -0800
commit63693bb563b8dee714d633c365e72943782e442b (patch)
tree700bfe3941f4c26895f57522850bcd4cd3f861a2
parent200e3c8d47e19308f6c2fbfe2943f5d894445828 (diff)
parentaac2990148111ff1e416857b87acdd0dabaa151c (diff)
downloademulator-test-63693bb563b8dee714d633c365e72943782e442b.tar.gz
emulator-test-63693bb563b8dee714d633c365e72943782e442b.tar.bz2
emulator-test-63693bb563b8dee714d633c365e72943782e442b.zip
Merge "performance_test: changed the result of IOZone test" into tizen
-rw-r--r--integration/TestResultOrganizer/src/org/tizen/emulator/test/resultorganizer/module/IOZonePurifier.java95
1 files changed, 74 insertions, 21 deletions
diff --git a/integration/TestResultOrganizer/src/org/tizen/emulator/test/resultorganizer/module/IOZonePurifier.java b/integration/TestResultOrganizer/src/org/tizen/emulator/test/resultorganizer/module/IOZonePurifier.java
index d480e71..a26d1a6 100644
--- a/integration/TestResultOrganizer/src/org/tizen/emulator/test/resultorganizer/module/IOZonePurifier.java
+++ b/integration/TestResultOrganizer/src/org/tizen/emulator/test/resultorganizer/module/IOZonePurifier.java
@@ -21,42 +21,95 @@ public class IOZonePurifier extends StdInPurifier {
while((line = reader.readLine()) != null) {
String[] token = line.trim().split("\\s+");
+
try {
Integer.valueOf(token[0]);
} catch (NumberFormatException e) {
continue;
}
+ int fileSize, recordSize;
+ final int defaultFileSize = 10240;
+ final String unit = " (milliseconds/10MiB)";
+
try {
- int file_size, record_size;
-
- file_size = Integer.valueOf(token[0]);
- record_size = Integer.valueOf(token[1]);
-
- TestCase tc_write = container.newTestCase();
- tc_write.name = file_size + "KB_" + record_size + "KB_write";
- tc_write.time_ms = Integer.valueOf(token[2]);
-
- TestCase tc_read = container.newTestCase();
- tc_read.name = file_size + "KB_" + record_size + "KB_read";
- tc_read.time_ms = Integer.valueOf(token[3]);
-
- TestCase tc_rewrite = container.newTestCase();
- tc_rewrite.name = file_size + "KB_" + record_size + "KB_rewrite";
- tc_rewrite.time_ms = Integer.valueOf(token[4]);
+ fileSize = Integer.valueOf(token[0]);
+ recordSize = Integer.valueOf(token[1]);
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ TestCase tc_iofailure = container.newTestCase();
+ tc_iofailure.success = false;
+ break;
+ }
- TestCase tc_reread = container.newTestCase();
- tc_reread.name = file_size + "KB_" + record_size + "KB_reread";
- tc_reread.time_ms = Integer.valueOf(token[5]);
+ TestCase tc_write = container.newTestCase();
+ try {
+ tc_write.name = fileSize + "KB_" + recordSize
+ + "KB_write" + unit;
+ tc_write.time_ms =
+ (int)((double)defaultFileSize / (double)Integer.valueOf(token[2]) * 1000);
+ if (tc_write.time_ms < 0) {
+ tc_write.success = false;
+ }
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ tc_write.time_ms = -1;
+ tc_write.success = false;
+ }
+
+ TestCase tc_read = container.newTestCase();
+ try {
+ tc_read.name = fileSize + "KB_" + recordSize
+ + "KB_read" + unit;
+ tc_read.time_ms =
+ (int)((double)defaultFileSize / (double)Integer.valueOf(token[3]) * 1000);
+ if (tc_read.time_ms < 0) {
+ tc_read.success = false;
+ }
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ tc_read.time_ms = -1;
+ tc_read.success = false;
+ break;
+ }
+
+ TestCase tc_rewrite = container.newTestCase();
+ try {
+ tc_rewrite.name = fileSize + "KB_" + recordSize
+ + "KB_rewrite" + unit;
+ tc_rewrite.time_ms =
+ (int)((double)defaultFileSize / (double)Integer.valueOf(token[4]) * 1000);
+ if (tc_rewrite.time_ms < 0) {
+ tc_rewrite.success = false;
+ }
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ tc_rewrite.time_ms = -1;
+ tc_rewrite.success = false;
+ break;
+ }
+
+ TestCase tc_reread = container.newTestCase();
+ try {
+ tc_reread.name = fileSize + "KB_" + recordSize
+ + "KB_reread" + unit;
+ tc_reread.time_ms =
+ (int)((double)defaultFileSize / (double)Integer.valueOf(token[5]) * 1000);
+ if (tc_reread.time_ms < 0) {
+ tc_reread.success = false;
+ }
} catch (NumberFormatException e) {
e.printStackTrace();
- container = null;
+ tc_reread.time_ms = -1;
+ tc_reread.success = false;
+
break;
}
}
} catch (IOException e) {
e.printStackTrace();
- container = null;
+ TestCase tc_iofailure = container.newTestCase();
+ tc_iofailure.success = false;
}
return container;