mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Linux/MacOSX: Add wait dialog to the benchmark computation. Correct handling of wait dialog call when changing password and creating volumes.
This commit is contained in:
@@ -59,14 +59,36 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
void BenchmarkDialog::OnBenchmarkButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
list <BenchmarkResult> results;
|
||||
|
||||
wxBusyCursor busy;
|
||||
Buffer buffer ((size_t) Gui->GetSelectedData <size_t> (BufferSizeChoice));
|
||||
|
||||
BenchmarkThreadRoutine routine(this, results, buffer);
|
||||
Gui->ExecuteWaitThreadRoutine (this, &routine);
|
||||
|
||||
BenchmarkListCtrl->DeleteAllItems();
|
||||
|
||||
foreach (const BenchmarkResult &result, results)
|
||||
{
|
||||
vector <wstring> fields (BenchmarkListCtrl->GetColumnCount());
|
||||
|
||||
fields[ColumnAlgorithm] = result.AlgorithmName;
|
||||
fields[ColumnEncryption] = Gui->SpeedToString (result.EncryptionSpeed);
|
||||
fields[ColumnDecryption] = Gui->SpeedToString (result.DecryptionSpeed);
|
||||
fields[ColumnMean] = Gui->SpeedToString (result.MeanSpeed);
|
||||
|
||||
Gui->AppendToListCtrl (BenchmarkListCtrl, fields);
|
||||
}
|
||||
|
||||
BenchmarkListCtrl->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
||||
void BenchmarkDialog::DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer)
|
||||
{
|
||||
try
|
||||
{
|
||||
list <BenchmarkResult> results;
|
||||
|
||||
wxBusyCursor busy;
|
||||
Buffer buffer ((size_t) Gui->GetSelectedData <size_t> (BufferSizeChoice));
|
||||
|
||||
EncryptionAlgorithmList encryptionAlgorithms = EncryptionAlgorithm::GetAvailableAlgorithms();
|
||||
foreach (shared_ptr <EncryptionAlgorithm> ea, encryptionAlgorithms)
|
||||
{
|
||||
@@ -135,19 +157,6 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
BenchmarkListCtrl->DeleteAllItems();
|
||||
|
||||
foreach (const BenchmarkResult &result, results)
|
||||
{
|
||||
vector <wstring> fields (BenchmarkListCtrl->GetColumnCount());
|
||||
|
||||
fields[ColumnAlgorithm] = result.AlgorithmName;
|
||||
fields[ColumnEncryption] = Gui->SpeedToString (result.EncryptionSpeed);
|
||||
fields[ColumnDecryption] = Gui->SpeedToString (result.DecryptionSpeed);
|
||||
fields[ColumnMean] = Gui->SpeedToString (result.MeanSpeed);
|
||||
|
||||
Gui->AppendToListCtrl (BenchmarkListCtrl, fields);
|
||||
}
|
||||
}
|
||||
catch (exception &e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user