blob: d24c803afea76040790f4db2dfc8b29b9da811a2 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
package org.linaro.iasenov.benchmarkframework;
import android.content.Intent;
import android.util.Log;
import graphics_benchmarks.lesson16.RunNehe16;
import graphics_benchmarks.teapot.TeapotES;
/**
* Created by iasenov on 10/11/16.
*/
public class Test25 extends BaseBenchmark{
private String TAG = "TeapotES(GPU)";
static boolean isJavaCanceled = false;
public String startBenchmark(int count) {
isJavaCanceled = false;
version = " TeapotES(GPU) ";
benchmarkName = "Test25";
integrationType = "SL";
chartName = "TeapotES(GPU)";
clear();
startTest = 0;//System.currentTimeMillis();
MainActivity.LOCK.setCondition(false);
Intent i = new Intent(MainActivity.mActivity, TeapotES.class);
i.putExtra(MainActivity.GRAPHICS_ROUND, 1000);
MainActivity.mActivity.startActivityForResult(i, 100);
synchronized (MainActivity.LOCK) {
while (!MainActivity.LOCK.conditionMet()) {
try {
MainActivity.LOCK.wait();
Log.i(TAG, "waiting is finished");
} catch (InterruptedException e) {
Log.e(TAG, "Exception when waiting for condition", e);
}
}
}
float second = (elapsedFromActivityTest / 1000f);
float fps = (float) mRound / second; // milliseconds to seconds
xout[2] = "Round = " + mRound +" fps = " + fps + "\n" + Interceptor.outputTxt;
Interceptor.clear();
endTest = elapsedFromActivityTest;//System.currentTimeMillis();
sendElapsedTimeToChart();
submitElapsedTime(endTest - startTest);
//Log.i(TAG, "return");
return benchmarkName + ":" + getBenchmarkResult(5, integrationType);
}
public boolean stopBenchmark(){
isJavaCanceled = true;
Log.i(TAG, "stopBenchmark: isJavaCanceled");
return true;
}
}
|