diff --git a/AlgTest_JClient/dist/AlgTestJClient.jar b/AlgTest_JClient/dist/AlgTestJClient.jar index b459a822..1b33532b 100644 Binary files a/AlgTest_JClient/dist/AlgTestJClient.jar and b/AlgTest_JClient/dist/AlgTestJClient.jar differ diff --git a/AlgTest_JClient/src/algtestjclient/PerformanceTesting.java b/AlgTest_JClient/src/algtestjclient/PerformanceTesting.java index c38c90bf..fddc99e6 100644 --- a/AlgTest_JClient/src/algtestjclient/PerformanceTesting.java +++ b/AlgTest_JClient/src/algtestjclient/PerformanceTesting.java @@ -95,7 +95,7 @@ public PerformanceTesting(DirtyLogger logger) { m_testDataLengths.add(512); } - String getCurrentTestInfoString() { + String getCurrentTestInfoString(boolean bAppendTime) { String testInfo = m_cardName + "___"; testInfo += "_PERFORMANCE_"; @@ -111,7 +111,9 @@ String getCurrentTestInfoString() { testInfo += "DATAFIXED_"; } - testInfo += System.currentTimeMillis() + "_"; // add unique time counter + if (bAppendTime) { + testInfo += System.currentTimeMillis() + "_"; // add unique time counter + } return testInfo; } @@ -176,9 +178,10 @@ public void testPerformance(String[] args, boolean bTestVariableDataLengths, Car m_cardName = requestCardName(sc); // Try to open and load list of already measured algorithms (if provided) - LoadAlreadyMeasuredAlgs(m_cardName); + String testType = getCurrentTestInfoString(false); + LoadAlreadyMeasuredAlgs(m_cardName, testType); - String testInfo = getCurrentTestInfoString(); + String testInfo = getCurrentTestInfoString(true); // Connect to card this.m_perfResultsFile = m_cardManager.establishConnection(testClassPerformance, m_cardName, testInfo, selectedTerminal); @@ -386,8 +389,8 @@ void finalizeMeasurement() throws IOException { m_perfResultsFile.write(message.getBytes()); } - void LoadAlreadyMeasuredAlgs(String cardName) { - String filePath = cardName + "_already_measured.list"; + void LoadAlreadyMeasuredAlgs(String cardName, String testType) { + String filePath = cardName + testType + "_already_measured.list"; String filePathOld = filePath + ".old"; File f = new File(filePath); File fOld = new File(filePathOld); @@ -765,7 +768,10 @@ public double perftest_measure(byte appletCLA, byte appletPrepareINS, byte apple if (m_algsMeasuredList.contains(info)) { // we already measured this algorithm before, just log it into new measurementsDone file String message = info + "\n"; - if (m_algsMeasuredFile != null) { m_algsMeasuredFile.write(message.getBytes()); } + if (m_algsMeasuredFile != null) { + m_algsMeasuredFile.write(message.getBytes()); + m_algsMeasuredFile.flush(); + } message = "\nmethod name:; " + info + "\n"; message += "ALREADY_MEASURED\n"; @@ -811,7 +817,10 @@ public double perftest_measure(byte appletCLA, byte appletPrepareINS, byte apple // log succesfull measurement of current algorithm - although exception ocurred, it is expected value like NO_SUCH_ALGORITHM m_bAlgsMeasuredSomeNew = true; message = info + "\n"; - if (m_algsMeasuredFile != null) {m_algsMeasuredFile.write(message.getBytes()); } + if (m_algsMeasuredFile != null) { + m_algsMeasuredFile.write(message.getBytes()); + m_algsMeasuredFile.flush(); + } return -1; } diff --git a/AlgTest_JavaCard/AlgTest_v1.7.5_jc222.cap b/AlgTest_JavaCard/AlgTest_v1.7.5_jc222.cap new file mode 100644 index 00000000..acf81370 Binary files /dev/null and b/AlgTest_JavaCard/AlgTest_v1.7.5_jc222.cap differ diff --git a/AlgTest_JavaCard/src/AlgTest/JCAlgTestApplet.java b/AlgTest_JavaCard/src/AlgTest/JCAlgTestApplet.java index 7de3af6e..fd1b1d3f 100644 --- a/AlgTest_JavaCard/src/AlgTest/JCAlgTestApplet.java +++ b/AlgTest_JavaCard/src/AlgTest/JCAlgTestApplet.java @@ -167,7 +167,7 @@ public class JCAlgTestApplet extends javacard.framework.Applet AlgStorageTest m_storageTest = null; public final static short RAM1_ARRAY_LENGTH = (short) 600; - public final static short RAM2_ARRAY_LENGTH = (short) 512; + public final static short RAM2_ARRAY_LENGTH = (short) 528; byte[] m_ramArray = null; // auxalarity array used for various purposes. Length of this array is added to value returned as amount of available RAM memory byte[] m_ramArray2 = null; // auxalarity array used for various purposes. Length of this array is added to value returned as amount of available RAM memory diff --git a/AlgTest_dist_1.7.5.zip b/AlgTest_dist_1.7.5.zip new file mode 100644 index 00000000..55d014c8 Binary files /dev/null and b/AlgTest_dist_1.7.5.zip differ