summaryrefslogtreecommitdiff
authorschurig <schurig>2004-09-20 08:17:49 (UTC)
committer schurig <schurig>2004-09-20 08:17:49 (UTC)
commit399dbbe957d219ad88b0c5624654496302969cf4 (patch) (side-by-side diff)
tree3c3a77e337ba0da03610e09ce2fcbe9cdf670cf3
parentb6b8bfb2401257d7e9fdf3919df11415fea0c977 (diff)
downloadopie-399dbbe957d219ad88b0c5624654496302969cf4.zip
opie-399dbbe957d219ad88b0c5624654496302969cf4.tar.gz
opie-399dbbe957d219ad88b0c5624654496302969cf4.tar.bz2
use ";", not "," as delimiter of the speed field's write and read speeds,
because in the result file the fields are delimited with "," as well
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index fde032a..793fcb1 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -358,51 +358,51 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item
.arg( FILE_TEST_BLOCKSIZE );
QString readCommand = QString( "dd if=%1 of=/dev/null count=%2 bs=%3").arg( filename )
.arg( FILE_TEST_COUNT )
.arg( FILE_TEST_BLOCKSIZE );
::system( "sync" );
odebug << "performing file test on " << filename << oendl;
int write = 0;
int read = 0;
QTime time;
time.start();
if ( ::system( writeCommand ) == 0 )
{
write = time.elapsed();
}
else
{
item->setText( 1, tr( "error" ) );
return;
}
time.restart();
if ( ::system( readCommand ) == 0 )
{
read = time.elapsed();
}
else
{
item->setText( 1, tr( "error" ) );
return;
}
QFile::remove( filename );
double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 );
QString readUnit = "kB/s";
if ( readSpeed > 1024 )
{
readSpeed /= 1024.0;
readUnit = "MB/s";
}
double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 );
QString writeUnit = "kb/s";
if ( writeSpeed > 1024 )
{
writeSpeed /= 1024.0;
writeUnit = "MB/s";
}
- item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) );
+ item->setText( 1, QString().sprintf( "%.2f %s; %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) );
item->setOn( false );
}