summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index f3a6561..8497c8b 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -384,6 +384,20 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item
384 } 384 }
385 385
386 QFile::remove( filename ); 386 QFile::remove( filename );
387 item->setText( 1, QString().sprintf( "%.2f kb/s, %.2f kb/s", FILE_TEST_COUNT / ( read / 1000.0 ), FILE_TEST_COUNT / ( write / 1000.0 ) ) ); 387 double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 );
388 QString readUnit = "kb/s";
389 if ( readSpeed > 1024 )
390 {
391 readSpeed = readSpeed / 1024.0;
392 readUnit = "mb/s";
393 }
394 double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 );
395 QString writeUnit = "kb/s";
396 if ( writeSpeed > 1024 )
397 {
398 writeSpeed = writeSpeed / 1024.0;
399 writeUnit = "mb/s";
400 }
401 item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) );
388 item->setOn( false ); 402 item->setOn( false );
389} 403}