diff options
Diffstat (limited to 'same-android/src')
2 files changed, 11 insertions, 0 deletions
diff --git a/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleHttpServerActivity.java b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleHttpServerActivity.java index 695988d..700030c 100644 --- a/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleHttpServerActivity.java +++ b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleHttpServerActivity.java @@ -3,6 +3,7 @@ package com.orbekk.same.android.benchmark; import android.app.Activity; import com.orbekk.same.benchmark.ExampleServer; +import com.orbekk.same.benchmark.HttpClientBenchmark; import com.orbekk.same.benchmark.HttpExampleServer; public class ExampleHttpServerActivity extends Activity { @@ -12,6 +13,9 @@ public class ExampleHttpServerActivity extends Activity { super.onResume(); try { server.runServer(12000); + HttpClientBenchmark.benchmark( + "http://localhost:12000/HttpExampleService.json", + 100, 2000); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); diff --git a/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java index c6be5a4..f4a2f05 100644 --- a/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java +++ b/same-android/src/main/java/com/orbekk/same/android/benchmark/ExampleProtobufServerActivity.java @@ -1,7 +1,9 @@ package com.orbekk.same.android.benchmark; import android.app.Activity; +import android.os.Debug; +import com.orbekk.same.benchmark.ClientBenchmark; import com.orbekk.same.benchmark.ExampleServer; public class ExampleProtobufServerActivity extends Activity { @@ -10,6 +12,11 @@ public class ExampleProtobufServerActivity extends Activity { @Override public void onResume() { super.onResume(); server.runServer(12000); + try { + ClientBenchmark.benchmark("localhost", 12000, 100, 2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } } @Override public void onStop() { |