summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp20
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.h4
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
@@ -114,24 +114,28 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
114 test_txt = new OCheckListItem( tests, tr( "3. Text Rendering " ), OCheckListItem::CheckBox ); 114 test_txt = new OCheckListItem( tests, tr( "3. Text Rendering " ), OCheckListItem::CheckBox );
115 test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox ); 115 test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox );
116 test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox ); 116 test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox );
117#ifndef QT_QWS_RAMSES
117 test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); 118 test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox );
118 test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); 119 test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox );
119 120#endif
120 test_alu->setText( 1, "n/a" ); 121 test_alu->setText( 1, "n/a" );
121 test_fpu->setText( 1, "n/a" ); 122 test_fpu->setText( 1, "n/a" );
122 test_txt->setText( 1, "n/a" ); 123 test_txt->setText( 1, "n/a" );
123 test_gfx->setText( 1, "n/a" ); 124 test_gfx->setText( 1, "n/a" );
124 test_ram->setText( 1, "n/a" ); 125 test_ram->setText( 1, "n/a" );
126#ifndef QT_QWS_RAMSES
125 test_sd->setText( 1, "n/a" ); 127 test_sd->setText( 1, "n/a" );
126 test_cf->setText( 1, "n/a" ); 128 test_cf->setText( 1, "n/a" );
127 129#endif
128 test_alu->setText( 2, "n/a" ); 130 test_alu->setText( 2, "n/a" );
129 test_fpu->setText( 2, "n/a" ); 131 test_fpu->setText( 2, "n/a" );
130 test_txt->setText( 2, "n/a" ); 132 test_txt->setText( 2, "n/a" );
131 test_gfx->setText( 2, "n/a" ); 133 test_gfx->setText( 2, "n/a" );
132 test_ram->setText( 2, "n/a" ); 134 test_ram->setText( 2, "n/a" );
135#ifndef QT_QWS_RAMSES
133 test_sd->setText( 2, "n/a" ); 136 test_sd->setText( 2, "n/a" );
134 test_cf->setText( 2, "n/a" ); 137 test_cf->setText( 2, "n/a" );
138#endif
135 139
136 startButton = new QPushButton( tr( "&Start Tests!" ), this ); 140 startButton = new QPushButton( tr( "&Start Tests!" ), this );
137 QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) ); 141 QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) );
@@ -182,8 +186,10 @@ void BenchmarkInfo::machineActivated( int index )
182 test_txt->setText( 2, *(it++) ); 186 test_txt->setText( 2, *(it++) );
183 test_gfx->setText( 2, *(it++) ); 187 test_gfx->setText( 2, *(it++) );
184 test_ram->setText( 2, *(it++) ); 188 test_ram->setText( 2, *(it++) );
189#ifndef QT_QWS_RAMSES
185 test_sd->setText( 2, *(it++) ); 190 test_sd->setText( 2, *(it++) );
186 test_cf->setText( 2, *(it++) ); 191 test_cf->setText( 2, *(it++) );
192#endif
187} 193}
188 194
189 195
@@ -218,7 +224,7 @@ void BenchmarkInfo::run()
218 if ( test_gfx->isOn() ) 224 if ( test_gfx->isOn() )
219 { 225 {
220 int value = gfxRendering( TEST_DURATION ); 226 int value = gfxRendering( TEST_DURATION );
221 test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4 / TEST_DURATION ) ); // 4 tests 227 test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4.0 / TEST_DURATION ) ); // 4 tests
222 test_gfx->setOn( false ); 228 test_gfx->setOn( false );
223 } 229 }
224 230
@@ -227,6 +233,7 @@ void BenchmarkInfo::run()
227 performFileTest( "/tmp/benchmarkFile.dat", test_ram ); 233 performFileTest( "/tmp/benchmarkFile.dat", test_ram );
228 } 234 }
229 235
236#ifndef QT_QWS_RAMSES
230 if ( test_cf->isOn() ) 237 if ( test_cf->isOn() )
231 { 238 {
232 OStorageInfo storage; 239 OStorageInfo storage;
@@ -238,6 +245,7 @@ void BenchmarkInfo::run()
238 OStorageInfo storage; 245 OStorageInfo storage;
239 performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd ); 246 performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd );
240 } 247 }
248#endif
241 249
242 startButton->setText( tr( "&Start Tests!" ) ); 250 startButton->setText( tr( "&Start Tests!" ) );
243} 251}
@@ -385,18 +393,18 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item
385 393
386 QFile::remove( filename ); 394 QFile::remove( filename );
387 double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 ); 395 double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 );
388 QString readUnit = "kb/s"; 396 QString readUnit = "kB/s";
389 if ( readSpeed > 1024 ) 397 if ( readSpeed > 1024 )
390 { 398 {
391 readSpeed = readSpeed / 1024.0; 399 readSpeed = readSpeed / 1024.0;
392 readUnit = "mb/s"; 400 readUnit = "MB/s";
393 } 401 }
394 double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 ); 402 double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 );
395 QString writeUnit = "kb/s"; 403 QString writeUnit = "kb/s";
396 if ( writeSpeed > 1024 ) 404 if ( writeSpeed > 1024 )
397 { 405 {
398 writeSpeed = writeSpeed / 1024.0; 406 writeSpeed = writeSpeed / 1024.0;
399 writeUnit = "mb/s"; 407 writeUnit = "MBb/s";
400 } 408 }
401 item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) ); 409 item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) );
402 item->setOn( false ); 410 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
@@ -40,15 +40,19 @@ public:
40 Opie::Ui::OCheckListItem* test_txt; 40 Opie::Ui::OCheckListItem* test_txt;
41 Opie::Ui::OCheckListItem* test_gfx; 41 Opie::Ui::OCheckListItem* test_gfx;
42 Opie::Ui::OCheckListItem* test_ram; 42 Opie::Ui::OCheckListItem* test_ram;
43#ifndef QT_QWS_RAMSES
43 Opie::Ui::OCheckListItem* test_sd; 44 Opie::Ui::OCheckListItem* test_sd;
44 Opie::Ui::OCheckListItem* test_cf; 45 Opie::Ui::OCheckListItem* test_cf;
46#endif
45 47
46 bool main_rd; 48 bool main_rd;
47 bool main_wt; 49 bool main_wt;
50#ifndef QT_QWS_RAMSES
48 bool sd_rd; 51 bool sd_rd;
49 bool sd_wt; 52 bool sd_wt;
50 bool cf_rd; 53 bool cf_rd;
51 bool cf_wt; 54 bool cf_wt;
55#endif
52 56
53 QClipboard* clb; 57 QClipboard* clb;
54 QComboBox* machineCombo; 58 QComboBox* machineCombo;