VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/BenchmarkDialog.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-09 19:18:18 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-08-10 01:31:32 +0200
commitc84bcd4b474b994cd7aec29ee3a8412d564ce4b2 (patch)
tree65cf187060ca99d6c06f02f8c4d97cc2cec2c712 /src/Main/Forms/BenchmarkDialog.h
parent1b59879411700450c5d14225ba9c6a509cfe0f8f (diff)
downloadVeraCrypt-c84bcd4b474b994cd7aec29ee3a8412d564ce4b2.tar.gz
VeraCrypt-c84bcd4b474b994cd7aec29ee3a8412d564ce4b2.zip
Linux/MacOSX/FreeBSD: Implement benchmarking for Hash and PKCS-5 PRF algorithms.
Diffstat (limited to 'src/Main/Forms/BenchmarkDialog.h')
-rw-r--r--src/Main/Forms/BenchmarkDialog.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Main/Forms/BenchmarkDialog.h b/src/Main/Forms/BenchmarkDialog.h
index 7fd3d011..16a5446b 100644
--- a/src/Main/Forms/BenchmarkDialog.h
+++ b/src/Main/Forms/BenchmarkDialog.h
@@ -29,7 +29,10 @@ namespace VeraCrypt
ColumnAlgorithm = 0,
ColumnEncryption,
ColumnDecryption,
- ColumnMean
+ ColumnMean,
+ ColumnTime = 1,
+ ColumnIterations = 2,
+ ColumnHashMean = 1
};
struct BenchmarkResult
@@ -38,9 +41,13 @@ namespace VeraCrypt
uint64 EncryptionSpeed;
uint64 DecryptionSpeed;
uint64 MeanSpeed;
+ uint64 Time;
+ uint64 Iterations;
};
- void DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer);
+ void UpdateBenchmarkList ();
+ void DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer, int opIndex);
+ void OnBenchmarkChoiceSelected (wxCommandEvent& event);
void OnBenchmarkButtonClick (wxCommandEvent& event);
class BenchmarkThreadRoutine : public WaitThreadRoutine
@@ -49,10 +56,11 @@ namespace VeraCrypt
BenchmarkDialog* m_pDlg;
list<BenchmarkResult>& m_results;
Buffer& m_buffer;
- BenchmarkThreadRoutine(BenchmarkDialog* pDlg, list<BenchmarkResult>& results, Buffer& buffer)
- : m_pDlg(pDlg), m_results(results), m_buffer(buffer) { }
+ int m_opIndex;
+ BenchmarkThreadRoutine(BenchmarkDialog* pDlg, list<BenchmarkResult>& results, Buffer& buffer, int opIndex)
+ : m_pDlg(pDlg), m_results(results), m_buffer(buffer), m_opIndex (opIndex) { }
virtual ~BenchmarkThreadRoutine() { }
- virtual void ExecutionCode(void) { m_pDlg->DoBenchmark (m_results, m_buffer); }
+ virtual void ExecutionCode(void) { m_pDlg->DoBenchmark (m_results, m_buffer, m_opIndex); }
};
};
}