blob: f4a2f056bd10cfbd7a302f0d4db1d76f2bf77099 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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 {
public final ExampleServer server = new ExampleServer();
@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() {
super.onStop();
server.stopServer();
}
}
|