author | schurig <schurig> | 2004-09-10 06:10:18 (UTC) |
---|---|---|
committer | schurig <schurig> | 2004-09-10 06:10:18 (UTC) |
commit | 931d699302619ac6472aca4b893d8a8bd188f040 (patch) (side-by-side diff) | |
tree | 01c9d454e79d88124714f1ec1ce07b9f08117d0a | |
parent | 317734f41201bf25fa3a1b38c2867bb9557053b9 (diff) | |
download | opie-931d699302619ac6472aca4b893d8a8bd188f040.zip opie-931d699302619ac6472aca4b893d8a8bd188f040.tar.gz opie-931d699302619ac6472aca4b893d8a8bd188f040.tar.bz2 |
disable SD and CF speed test on MNCI
change millibit to MegaByte (mb -> MB)
change kilobit to Kilobyte (kb -> kB)
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 20 | ||||
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.h | 4 |
2 files changed, 18 insertions, 6 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 8497c8b..47be13c 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -113,26 +113,30 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) test_fpu = new OCheckListItem( tests, tr( "2. Floating Point Unit " ), OCheckListItem::CheckBox ); test_txt = new OCheckListItem( tests, tr( "3. Text Rendering " ), OCheckListItem::CheckBox ); test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox ); test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox ); +#ifndef QT_QWS_RAMSES test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); - +#endif test_alu->setText( 1, "n/a" ); test_fpu->setText( 1, "n/a" ); test_txt->setText( 1, "n/a" ); test_gfx->setText( 1, "n/a" ); test_ram->setText( 1, "n/a" ); +#ifndef QT_QWS_RAMSES test_sd->setText( 1, "n/a" ); test_cf->setText( 1, "n/a" ); - +#endif test_alu->setText( 2, "n/a" ); test_fpu->setText( 2, "n/a" ); test_txt->setText( 2, "n/a" ); test_gfx->setText( 2, "n/a" ); test_ram->setText( 2, "n/a" ); +#ifndef QT_QWS_RAMSES test_sd->setText( 2, "n/a" ); test_cf->setText( 2, "n/a" ); +#endif startButton = new QPushButton( tr( "&Start Tests!" ), this ); QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) ); connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) ); @@ -181,10 +185,12 @@ void BenchmarkInfo::machineActivated( int index ) test_fpu->setText( 2, *(it++) ); test_txt->setText( 2, *(it++) ); test_gfx->setText( 2, *(it++) ); test_ram->setText( 2, *(it++) ); +#ifndef QT_QWS_RAMSES test_sd->setText( 2, *(it++) ); test_cf->setText( 2, *(it++) ); +#endif } void BenchmarkInfo::run() @@ -217,17 +223,18 @@ void BenchmarkInfo::run() if ( test_gfx->isOn() ) { int value = gfxRendering( TEST_DURATION ); - test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4 / TEST_DURATION ) ); // 4 tests + test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4.0 / TEST_DURATION ) ); // 4 tests test_gfx->setOn( false ); } if ( test_ram->isOn() ) // /tmp is supposed to be in RAM on a PDA { performFileTest( "/tmp/benchmarkFile.dat", test_ram ); } +#ifndef QT_QWS_RAMSES if ( test_cf->isOn() ) { OStorageInfo storage; performFileTest( storage.cfPath() + "/benchmarkFile.dat", test_cf ); @@ -237,8 +244,9 @@ void BenchmarkInfo::run() { OStorageInfo storage; performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd ); } +#endif startButton->setText( tr( "&Start Tests!" ) ); } @@ -384,20 +392,20 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item } QFile::remove( filename ); double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 ); - QString readUnit = "kb/s"; + QString readUnit = "kB/s"; if ( readSpeed > 1024 ) { readSpeed = readSpeed / 1024.0; - readUnit = "mb/s"; + readUnit = "MB/s"; } double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 ); QString writeUnit = "kb/s"; if ( writeSpeed > 1024 ) { writeSpeed = writeSpeed / 1024.0; - writeUnit = "mb/s"; + writeUnit = "MBb/s"; } item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) ); item->setOn( false ); } diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h index 3b0a33c..4d61717 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.h +++ b/noncore/settings/sysinfo/benchmarkinfo.h @@ -39,17 +39,21 @@ public: Opie::Ui::OCheckListItem* test_fpu; Opie::Ui::OCheckListItem* test_txt; Opie::Ui::OCheckListItem* test_gfx; Opie::Ui::OCheckListItem* test_ram; +#ifndef QT_QWS_RAMSES Opie::Ui::OCheckListItem* test_sd; Opie::Ui::OCheckListItem* test_cf; +#endif bool main_rd; bool main_wt; +#ifndef QT_QWS_RAMSES bool sd_rd; bool sd_wt; bool cf_rd; bool cf_wt; +#endif QClipboard* clb; QComboBox* machineCombo; Opie::Ui::OListView* tests; |