diff options
author | Ivaylo Asenov <ivaylo.asenov@linaro.org> | 2016-09-02 09:28:45 +0300 |
---|---|---|
committer | Ivaylo Asenov <ivaylo.asenov@linaro.org> | 2016-09-02 09:53:00 +0300 |
commit | dda723a9709d50f61837cb0023e5a3fbf5e045ec (patch) | |
tree | 27def2e17a190dc82f81389ca1c466f2c60c0f83 | |
parent | 521e8e746308ece38b0a8d9cff7abc60b6ccf456 (diff) | |
download | benchmark-dda723a9709d50f61837cb0023e5a3fbf5e045ec.tar.gz |
Some modifications done.
Add Iozone3_465 as executable.
Add logic using list of commands to be run for each test.
Add multiple choice of tests and always save results automaticaly.
Some layout changes done.
Change-Id: Ica11f3004edd5743a442fc3e7f8ba8f1e8aa61c4
Signed-off-by: Ivaylo Asenov <ivaylo.asenov@linaro.org>
15 files changed, 306 insertions, 85 deletions
diff --git a/BenchmarkFramework/Readme.txt b/BenchmarkFramework/Readme.txt index 4fb14b1..241df5f 100644 --- a/BenchmarkFramework/Readme.txt +++ b/BenchmarkFramework/Readme.txt @@ -14,23 +14,26 @@ This file includes a little info about "benchmarkframework" application. - "Linaro-Libc-Bench" // This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 // Source code: git://android-git.linaro.org/platform/external/libc-bench -- "Linaro-StringBench" //This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 +- "Linaro-StringBench" // This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 // Source code: git://android-git.linaro.org/platform/external/stringbench -- "Linaro-Harness" //This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 +- "Linaro-Harness" // This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 // Source code: git://android-git.linaro.org/platform/external/stringbench -- "Linaro-Dhrystone" //This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 +- "Linaro-Dhrystone" // This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 // Source code: git://android-git.linaro.org/platform/external/stringbench +- "Iozone" // This benchmark is integrated as executable file related to task: https://projects.linaro.org/browse/LMG-1420 + // Source code: http://www.iozone.org/ + // Version: Iozone3_465 3)Functionality: - 3.1) Select single test and run it pressing [RUN TEST] button. After test is finished results are displayed. If you want to save them press [SAVE] button. + 3.1) Select one or more tests and run them by pressing [RUN TEST] button. After all selected tests are finished the results for them will be saved automaticaly. 3.2) Pressing [RUN AUTO] button starts all 6 tests one by one in row. After all tests are finished the results for them will be saved automaticaly. 3.3) Pressing [i] button give some help about the usage. - + 3.4) [SAVE] button save result shown on UI (display) to text file (Not needed anymore and will be removed in future) 4)Notes: The started test cannot be stopped for now (No "Cancel" button on ProgressDialog) so wait until test is finished. The most time consumer test is "Linaro-StringBench". diff --git a/BenchmarkFramework/app/src/main/assets/dhry b/BenchmarkFramework/app/src/main/assets/dhry Binary files differindex d8b7cd4..d423549 100755 --- a/BenchmarkFramework/app/src/main/assets/dhry +++ b/BenchmarkFramework/app/src/main/assets/dhry diff --git a/BenchmarkFramework/app/src/main/assets/dhry_modified b/BenchmarkFramework/app/src/main/assets/dhry_modified Binary files differnew file mode 100755 index 0000000..d8b7cd4 --- /dev/null +++ b/BenchmarkFramework/app/src/main/assets/dhry_modified diff --git a/BenchmarkFramework/app/src/main/assets/iozone b/BenchmarkFramework/app/src/main/assets/iozone Binary files differnew file mode 100755 index 0000000..0c49a2c --- /dev/null +++ b/BenchmarkFramework/app/src/main/assets/iozone diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/BaseBenchmark.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/BaseBenchmark.java index b78c55e..3082dde 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/BaseBenchmark.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/BaseBenchmark.java @@ -13,8 +13,11 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.Date; +import java.util.List; /** * Created by iasenov on 8/22/16. @@ -24,14 +27,62 @@ public class BaseBenchmark { public String benchmarkName; public String version; public String date$; + public String executable_name; public static long startTest; public static long endTest; public static double testTime; + public List<String> TESTCOMMANDS; //List with Specific test commands public String[] xout = new String[20]; private String TAG = "BaseBenchmark"; + //List with All tests commands + public List<String> ALLCOMMANDS = Arrays.asList( + "harness -t bounce", + "harness -t memchr", + "harness -t memcpy", + "harness -t memset", + "harness -t strchr", + "harness -t strcmp", + "harness -t strcpy", + "harness -t strlen", + "dhry N", +// "iozone -a -i 0 -b output.xls", + "iozone -E -C 70 -L -S -W" + + + ); + + + + //********************************************************************************************** + //Get all commands by executable_name + //********************************************************************************************** + public List<String> getCommands(String executable_name) + { + + List<String> cmdListStr = new ArrayList<String>(); + int len = executable_name.length(); + + for(String command: ALLCOMMANDS) + { + if(command.length() >= len) { + + String subCmd = command.substring(0, len); + //Log.i(TAG, "subCmd: " + subCmd); + + if (executable_name.equals(subCmd)) { + cmdListStr.add(command.substring(len + 1)); + //Log.i(TAG, "add command: " + command.substring(len + 1)); + } + } + } + + return cmdListStr; + } + + //********************************************************************************************** //Clear test tags and result and fill version and date for the test @@ -202,10 +253,13 @@ public class BaseBenchmark { //Copy "executable_filename" from assets to "EXECUTABLE_PATH" and execute this file //Return String from process's stdout //********************************************************************************************** - public String copyAssetsExecFileAndRun(String executable_filename, String param) { + public String copyAssetsExecFileAndRun(String executable_filename, List<String> TESTCOMMANDS) { String executableFilePath = MainActivity.EXECUTABLE_PATH; StringBuilder log = null; + File dir_local = new File(executableFilePath); + String currentCommand = ""; + String result = ""; File dir = new File(executableFilePath); @@ -234,36 +288,44 @@ public class BaseBenchmark { Log.i(TAG, "Copy success: " + executable_filename); - try { + if(TESTCOMMANDS.size() == 0) TESTCOMMANDS.add(""); //add empty command to run test once - File execFile = new File(executableFilePath + "/" + executable_filename); - execFile.setExecutable(true); + for(String command: TESTCOMMANDS) { + currentCommand = command; - Process process = Runtime.getRuntime().exec(executableFilePath + "/" + executable_filename + " " + param); - Log.i(TAG, "process:" + process.toString()); + try { - BufferedReader bufferedReader = new BufferedReader( - new InputStreamReader(process.getInputStream())); + File execFile = new File(executableFilePath + "/" + executable_filename); + execFile.setExecutable(true); - String separator = System.getProperty("line.separator"); + Process process = Runtime.getRuntime().exec(executableFilePath + "/" + executable_filename + " " + currentCommand, null, dir_local); + Log.i(TAG, "process:" + process.toString()); + Log.i(TAG, "Execute: "+ executable_filename + " " + currentCommand); - log = new StringBuilder(); - String line; - while ((line = bufferedReader.readLine()) != null) { - line = line.replace("null", ""); - log.append(line); - log.append(separator); - log.append(separator); - Log.i(TAG, "process line:" + line); - } + BufferedReader bufferedReader = new BufferedReader( + new InputStreamReader(process.getInputStream())); - process.destroy(); + String separator = System.getProperty("line.separator"); - }catch(Exception e){ - Log.i(TAG, "Failed execute: " + executableFilePath + "/" + executable_filename, e); + log = new StringBuilder(); + String line; + while ((line = bufferedReader.readLine()) != null) { + line = line.replace("null", ""); + log.append(line); + log.append(separator); + log.append(separator); + Log.i(TAG, "*****************" + line); + } + + result = result + log.toString(); + process.destroy(); + + } catch (Exception e) { + Log.i(TAG, "Failed execute: " + executableFilePath + "/" + executable_filename, e); + } } - return log.toString(); + return result; } //********************************************************************************************** }//BaseBenchmark diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/MainActivity.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/MainActivity.java index e794a22..45cab75 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/MainActivity.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/MainActivity.java @@ -22,6 +22,7 @@ import android.util.TypedValue; import android.view.View; import android.view.Menu; import android.view.MenuItem; +import android.view.Window; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; @@ -61,14 +62,17 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe private String mSelectedClassTest = ""; private String autoTestFileNameIdentifier = "Default"; private String mTestResult = ""; + private String mAllTestsResult = ""; private String PACKAGE_NAME; private List<String> mAllTests; - + private ArrayList selectedClassTests; private int nextTestIndex; private int allTestsCount; + private int numberOfCheckedTests = 0; private boolean isAuto = false; + private boolean isSelected = false; public boolean isTempLogFileNeeded = false; private Context mContext; @@ -84,7 +88,8 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe public File autoTestFile; //file for auto saving tests results(when isAuto); - final String[] classNameTestItems = new String[6]; + final String[] classNameTestItems = new String[7]; + public ArrayAdapter listAdapter; @@ -143,30 +148,42 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe classNameTestItems[3] = "Test4"; classNameTestItems[4] = "Test5"; classNameTestItems[5] = "Test6"; + classNameTestItems[6] = "Test7"; + - String[] displayNames = new String[6]; + String[] displayNames = new String[7]; displayNames[0] = "MemSpeed"; displayNames[1] = "RandMem"; displayNames[2] = "Linaro-Libc-Bench"; displayNames[3] = "Linaro-StringBench"; displayNames[4] = "Linaro-Harness"; displayNames[5] = "Linaro-Dhrystone"; + displayNames[6] = "Iozone"; - ArrayAdapter listAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_checked, displayNames); + listAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_checked, displayNames); //ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, displayNames); mListView.setAdapter(listAdapter); - mListView.setChoiceMode(1); //single choice + mListView.setChoiceMode(2); //multiple choice mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { - mSelectedTest = (mListView.getItemAtPosition(i)).toString(); - mSelectedClassTest = classNameTestItems[i]; + //mSelectedTest = (mListView.getItemAtPosition(i)).toString(); + //mSelectedClassTest = classNameTestItems[i]; + + //Log.i(TAG, "View: "+mListView.getItemAtPosition(i).toString()); + //Log.i(TAG, "IsChecked: " + mListView.isItemChecked(i)); + + if(mListView.isItemChecked(i)) { + numberOfCheckedTests++; + }else{ + numberOfCheckedTests--; + } } }); @@ -198,11 +215,12 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe public void onClick(View v) { - if(v.getId() == R.id.startButton && mSelectedTest!="") + if(v.getId() == R.id.startButton && numberOfCheckedTests > 0) { isAuto = false; + isSelected = true; - mDisplayDetails.setText(mSelectedTest + " is running please wait..."); + //mDisplayDetails.setText(mSelectedTest + " is running please wait..."); if(mSelectedClassTest.equals("Test4")) { @@ -212,11 +230,10 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe isTempLogFileNeeded = false; } - AsyncTaskRunner runner = new AsyncTaskRunner(mSelectedTest, mSelectedClassTest); - runner.execute(mSelectedTest); + runTests(); } - else if(v.getId() == R.id.startButton && mSelectedTest=="") + else if(v.getId() == R.id.startButton && numberOfCheckedTests == 0) { Toast.makeText(v.getContext(),"Please select test...", Toast.LENGTH_SHORT).show(); @@ -232,10 +249,12 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe }else if(v.getId() == R.id.startAutoButton) { isAuto = true; - runAutoTest(); + isSelected = false; + runTests(); + }else if(v.getId() == R.id.infoButton) { - String info = "[RUN TEST]: Run single test<br><br> [RUN AUTO]: Run all tests in row and save results to file automatically<br><br> [SAVE]: Save results from single test"; + String info = "[RUN TEST]: Run selected tests<br><br> [RUN AUTO]: Run all tests in row and save results to file automatically<br><br> [SAVE]: Save result shown on UI (display)"; createAlertDialog("Help", info); } @@ -405,24 +424,44 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe } - //********************************************************************************************** - //Run all tests one by one automatically + //Run tests //********************************************************************************************** - public void runAutoTest() { - + public void runTests() { nextTestIndex = 0; allTestsCount = 0; mAllTests = new ArrayList<String>(); + selectedClassTests = new ArrayList<String>(); + mAllTestsResult=""; + selectedClassTests.clear(); mAllTests.clear(); - for (int i = 0; i < mListView.getCount(); i++) { - mAllTests.add((mListView.getItemAtPosition(i)).toString()); + + mDisplayDetails.scrollTo(0,0); + + + if(isAuto) + { + for (int i = 0; i < mListView.getCount(); i++) { + mAllTests.add((mListView.getItemAtPosition(i)).toString()); + } + } + + if(isSelected) + { + for (int i = 0; i < mListView.getCount(); i++) { + + if(mListView.isItemChecked(i)) { + mAllTests.add((mListView.getItemAtPosition(i)).toString()); + selectedClassTests.add(classNameTestItems[i]); + } + } } allTestsCount = mAllTests.size(); - Log.i(TAG, "autoTest:" + allTestsCount); + if(isAuto) Log.i(TAG, "autoTest:" + allTestsCount); + if(isSelected) Log.i(TAG, "Selected tests:" + allTestsCount); if (mAllTests.size() > 0){ @@ -435,23 +474,29 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe isTempLogFileNeeded = false;//make it false for now if (nextTestIndex < allTestsCount) { - mSelectedTest = mAllTests.get(nextTestIndex); - mSelectedClassTest = classNameTestItems[nextTestIndex]; + + if (isAuto) { + mSelectedTest = mAllTests.get(nextTestIndex); + mSelectedClassTest = classNameTestItems[nextTestIndex]; + } + + if (isSelected){ + mSelectedTest = mAllTests.get(nextTestIndex).toString(); + mSelectedClassTest = selectedClassTests.get(nextTestIndex).toString(); + } String localSelectedTest = mSelectedTest; String localSelectedClassTest = mSelectedClassTest; - //if(!localSelectedClassTest.equals("Test4")) { //Test4 is too long so stop it for faster debugging + //if(!localSelectedClassTest.equals("Test4")) { //Test4 is too long so stop it for faster debugging - AsyncTaskRunner runner = new AsyncTaskRunner(localSelectedTest, localSelectedClassTest); - //runner.execute(mSelectedTest); - runner.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, localSelectedTest); + AsyncTaskRunner runner = new AsyncTaskRunner(localSelectedTest, localSelectedClassTest); + //runner.execute(mSelectedTest); + runner.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, localSelectedTest); //} nextTestIndex++; } - } - } } @@ -532,9 +577,13 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe Method thisMethod = thisClass.getMethod("startBenchmark", Integer.TYPE); mTestResult = (String) (thisMethod.invoke(iClass, 1)); + mAllTestsResult = mAllTestsResult +"\n\n"+ mTestResult; if(isAuto) { saveAutoTestResultToFile(); + }else + { + saveAutoTestResultToFile(); } testDone = 1; @@ -553,11 +602,20 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe progressDialog.dismiss(); //finalResult.setText(result); - displayResult(mTestResult); //UI display + //displayResult(mTestResult); //UI display Log.i(TAG, mTestResult); //adb logcat display - if(isAuto && result.equals(classNameTestItems[5])) { //if Auto test and if last + String endTest=""; + if(isAuto) { + endTest = classNameTestItems[allTestsCount - 1]; + }else + { + endTest = selectedClassTests.get(allTestsCount - 1).toString(); + } + + if(result.equals(endTest)) { //if last one is finished + displayResult(mAllTestsResult);//UI display String filepath = "<font color=\"blue\">"+autoTestFile.getAbsolutePath()+"</font>"; createAlertDialog("File with results created", filepath); @@ -570,9 +628,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe Log.i(TAG, "selectedTest:" + selectedTest); - if(isAuto) { + //if(isAuto) { mDisplayDetails.setText(selectedTest + " is running please wait..."); - } + //} } @@ -590,9 +648,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe progressDialog = new ProgressDialog(MainActivity.this); progressDialog.setTitle("ProgressDialog"); - progressDialog.setMessage(text[0] + " is running please wait..." +extraText); + progressDialog.setMessage(text[0] + " is running please wait..." + extraText); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); - + progressDialog.setCanceledOnTouchOutside(false); // Put a cancel button in progress dialog /* TODO: Set Cancel button for cancelling the test @@ -614,6 +672,10 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe if(isAuto) { int mActivePosition = 0; + + mListView.clearChoices(); + listAdapter.notifyDataSetChanged(); + for (String className : classNameTestItems) { if(className.equals(text[1])) diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test3.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test3.java index d3f657d..ef1a90a 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test3.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test3.java @@ -14,6 +14,7 @@ public class Test3 extends BaseBenchmark{ { version = " Libc-Bench 1.1"; benchmarkName = "Test3"; + executable_name = "cbench"; clear(); @@ -22,7 +23,9 @@ public class Test3 extends BaseBenchmark{ String param = ""; - xout[2] = copyAssetsExecFileAndRun("cbench", param); + TESTCOMMANDS = getCommands(executable_name); + + xout[2] = copyAssetsExecFileAndRun(executable_name, TESTCOMMANDS); endTest = System.currentTimeMillis(); diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test4.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test4.java index eb256be..5b7f516 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test4.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test4.java @@ -9,6 +9,7 @@ public class Test4 extends BaseBenchmark{ { version = " StringBench 1.1 "; benchmarkName = "Test4"; + executable_name = "stringbench"; clear(); @@ -16,7 +17,9 @@ public class Test4 extends BaseBenchmark{ String param = ""; - xout[2] = copyAssetsExecFileAndRun("stringbench", param); + TESTCOMMANDS = getCommands(executable_name); + + xout[2] = copyAssetsExecFileAndRun(executable_name, TESTCOMMANDS); endTest = System.currentTimeMillis(); diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test5.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test5.java index b42f821..33fc653 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test5.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test5.java @@ -9,30 +9,18 @@ public class Test5 extends BaseBenchmark{ { version = " HarnessBench 1.1 "; benchmarkName = "Test5"; + executable_name = "harness"; clear(); startTest = System.currentTimeMillis(); - String tests[] = { "bounce", - "memchr", - "memcpy", - "memset", - "strchr", - "strcmp", - "strcpy", - "strlen"}; + TESTCOMMANDS = getCommands(executable_name); - String param = ""; - for(String test : tests) { + xout[2] = copyAssetsExecFileAndRun(executable_name, TESTCOMMANDS); - param = "-t " + test; - xout[2] = xout[2] + "\n\n" + copyAssetsExecFileAndRun("harness", param); - - } - - endTest = System.currentTimeMillis(); + endTest = System.currentTimeMillis(); return benchmarkName + ":" + getBenchmarkResult(5); } diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test6.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test6.java index 3965499..ea051d4 100644 --- a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test6.java +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test6.java @@ -9,14 +9,15 @@ public class Test6 extends BaseBenchmark{ { version = " Dhrystone 2.1 "; benchmarkName = "Test6"; + executable_name = "dhry"; clear(); startTest = System.currentTimeMillis(); - String param = "N"; + TESTCOMMANDS = getCommands(executable_name); - xout[2] = copyAssetsExecFileAndRun("dhry", param); + xout[2] = copyAssetsExecFileAndRun(executable_name, TESTCOMMANDS); endTest = System.currentTimeMillis(); diff --git a/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test7.java b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test7.java new file mode 100644 index 0000000..d2ea456 --- /dev/null +++ b/BenchmarkFramework/app/src/main/java/org/linaro/iasenov/benchmarkframework/Test7.java @@ -0,0 +1,30 @@ +package org.linaro.iasenov.benchmarkframework; + +import java.util.Arrays; +import java.util.List; + +/** + * Created by iasenov on 8/31/16. + */ +public class Test7 extends BaseBenchmark { + + public String startBenchmark(int count) { + version = " Iozone3_465 "; + benchmarkName = "Test7"; + executable_name = "iozone"; + + + clear(); + + startTest = System.currentTimeMillis(); + + TESTCOMMANDS = getCommands(executable_name); + + xout[2] = copyAssetsExecFileAndRun(executable_name, TESTCOMMANDS); + + endTest = System.currentTimeMillis(); + + return benchmarkName + ":" + getBenchmarkResult(5); + } + +} diff --git a/BenchmarkFramework/app/src/main/res/drawable/buttonshape.xml b/BenchmarkFramework/app/src/main/res/drawable/buttonshape.xml new file mode 100644 index 0000000..1979717 --- /dev/null +++ b/BenchmarkFramework/app/src/main/res/drawable/buttonshape.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > +<corners +android:radius="14dp" +/> +<gradient +android:angle="45" +android:centerX="35%" +android:centerColor="#20A840" +android:startColor="#17E848" +android:endColor="#000000" +android:type="linear" +/> +<padding +android:left="0dp" +android:top="0dp" +android:right="0dp" +android:bottom="0dp" +/> +<size +android:width="270dp" +android:height="60dp" +/> +<stroke +android:width="3dp" +android:color="#878787" +/> +</shape> diff --git a/BenchmarkFramework/app/src/main/res/drawable/information.png b/BenchmarkFramework/app/src/main/res/drawable/information.png Binary files differindex f0e1142..5507135 100644 --- a/BenchmarkFramework/app/src/main/res/drawable/information.png +++ b/BenchmarkFramework/app/src/main/res/drawable/information.png diff --git a/BenchmarkFramework/app/src/main/res/drawable/information_1.png b/BenchmarkFramework/app/src/main/res/drawable/information_1.png Binary files differnew file mode 100644 index 0000000..f0e1142 --- /dev/null +++ b/BenchmarkFramework/app/src/main/res/drawable/information_1.png diff --git a/BenchmarkFramework/app/src/main/res/layout/activity_main.xml b/BenchmarkFramework/app/src/main/res/layout/activity_main.xml index 95a5db0..fded0e6 100644 --- a/BenchmarkFramework/app/src/main/res/layout/activity_main.xml +++ b/BenchmarkFramework/app/src/main/res/layout/activity_main.xml @@ -4,15 +4,15 @@ android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="#9ad6d0"> + android:background="#000000"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" - android:background="#eb7b68"> - + android:background="#20A840"> + <!-- <Button android:id="@+id/startButton" android:layout_width="wrap_content" @@ -35,11 +35,52 @@ android:layout_width="50dp" android:layout_height="40dp" android:background="@drawable/information"></Button> + --> + <Button + android:id="@+id/startButton" + + android:text="RUN TEST" + android:textColor="#FFFFFF" + android:textSize="15sp" + + android:layout_width="100dp" + android:layout_height="50dp" + android:background="@drawable/buttonshape"> + </Button> + <Button + android:id="@+id/startAutoButton" + + android:text="RUN AUTO" + android:textColor="#FFFFFF" + android:textSize="15sp" + + android:layout_width="100dp" + android:layout_height="50dp" + android:background="@drawable/buttonshape"> + </Button> + <Button + android:id="@+id/saveButton" + + android:text="SAVE" + android:textColor="#FFFFFF" + android:textSize="15sp" + + android:layout_width="100dp" + android:layout_height="50dp" + android:background="@drawable/buttonshape"> + + </Button> + <Button + android:id="@+id/infoButton" + android:layout_width="50dp" + android:layout_height="40dp" + android:background="@drawable/information"></Button> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> + <TextView android:id="@+id/displayDetails" android:layout_width="fill_parent" |