author | mickeyl <mickeyl> | 2004-02-27 16:26:54 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-27 16:26:54 (UTC) |
commit | 557424c8b345677038e6e35aae2ada22748af904 (patch) (unidiff) | |
tree | 047afc03d6b269e56d30fd1069813d64c8413dca /noncore/settings/sysinfo/benchmarkinfo.h | |
parent | 4075bd88da2eb3f3eec78fe283023231764834b4 (diff) | |
download | opie-557424c8b345677038e6e35aae2ada22748af904.zip opie-557424c8b345677038e6e35aae2ada22748af904.tar.gz opie-557424c8b345677038e6e35aae2ada22748af904.tar.bz2 |
This patch adds a benchmark tab to SysInfo!
Available tests & Implementation Status:
-------------------------------------------
Integer Arithmetic: done
Floating Point: done
Text Rendering: done
Gfx Rendering: done
RAM Performance: in progress
SD Performance: not yet done
CF Performance: not yet done
-------------------------------------------
I will complete this on weekend by adding the last
tests and adding a comparison table for known systems :)
Have Fun!
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h new file mode 100644 index 0000000..2c7fa40 --- a/dev/null +++ b/noncore/settings/sysinfo/benchmarkinfo.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /********************************************************************** | ||
2 | ** BenchmarkInfo | ||
3 | ** | ||
4 | ** A benchmark for Qt/Embedded | ||
5 | ** | ||
6 | ** Copyright (C) 2004 Michael Lauer <mickey@vanille.de> | ||
7 | ** Inspired by ZBench (C) 2002 Satoshi <af230533@im07.alpha-net.ne.jp> | ||
8 | ** | ||
9 | ** This file may be distributed and/or modified under the terms of the | ||
10 | ** GNU General Public License version 2 as published by the Free Software | ||
11 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
12 | ** packaging of this file. | ||
13 | ** | ||
14 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
15 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
16 | ** | ||
17 | **********************************************************************/ | ||
18 | |||
19 | #include <qwidget.h> | ||
20 | #include <qdialog.h> | ||
21 | |||
22 | class QClipboard; | ||
23 | class QCheckListItem; | ||
24 | class QPushButton; | ||
25 | class QListView; | ||
26 | |||
27 | //#define INT_TEST_ITERATIONS 50 | ||
28 | //#define CHAR_TEST_ITERATIONS 15000 | ||
29 | //#define DRAW_TEST_ITERATIONS 5000 | ||
30 | |||
31 | #define INT_TEST_ITERATIONS 50 | ||
32 | #define CHAR_TEST_ITERATIONS 15000 | ||
33 | #define DRAW_TEST_ITERATIONS 5000 | ||
34 | |||
35 | class BenchmarkInfo : public QWidget | ||
36 | { | ||
37 | Q_OBJECT | ||
38 | |||
39 | public: | ||
40 | BenchmarkInfo( QWidget *parent = 0, const char *name = 0, int wFlags = 0 ); | ||
41 | ~BenchmarkInfo(); | ||
42 | |||
43 | QCheckListItem* test_alu; | ||
44 | QCheckListItem* test_fpu; | ||
45 | QCheckListItem* test_txt; | ||
46 | QCheckListItem* test_gfx; | ||
47 | QCheckListItem* test_ram; | ||
48 | QCheckListItem* test_sd; | ||
49 | QCheckListItem* test_cf; | ||
50 | |||
51 | bool main_rd; | ||
52 | bool main_wt; | ||
53 | bool sd_rd; | ||
54 | bool sd_wt; | ||
55 | bool cf_rd; | ||
56 | bool cf_wt; | ||
57 | |||
58 | QClipboard* clb; | ||
59 | |||
60 | QListView* tests; | ||
61 | QPushButton* startButton; | ||
62 | |||
63 | void benchInteger() const; | ||
64 | void paintChar(); | ||
65 | void paintLineRect(); | ||
66 | bool writeFile( const QString& ); | ||
67 | bool readFile( const QString& ); | ||
68 | |||
69 | private slots: | ||
70 | void run(); | ||
71 | |||
72 | }; | ||