summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-03-23 09:58:38 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-03-23 09:58:38 +0000
commitf1c371788c2e8dc61a2230f1f326c54b711eac49 (patch)
tree6bd161e40623065cd52c3d719c24c90ca09455ef
parentcdcef2c16840085406512a7c57f8343fe9128410 (diff)
weight expedite benchmarks based on closer to real-life usage. evas_speed at
the end is now a weighted average so it should be more realistic when comparing enignes... and even machines. SVN revision: 47387
-rw-r--r--src/bin/ui.c107
1 files changed, 105 insertions, 2 deletions
diff --git a/src/bin/ui.c b/src/bin/ui.c
index b4213e1..a4879f9 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -48,6 +48,87 @@ static int run_test = 0;
48static int list_test = 0; 48static int list_test = 0;
49static int exit_after_test = 0; 49static int exit_after_test = 0;
50 50
51static double weights[] =
52{
53 0.0, // no test 0
54
55 50.4851, // test 1
56 37.3703, // test 2
57 10.6493, // ...
58 38.4818,
59 40.7314,
60 32.0866,
61 21.3337,
62 21.2167,
63 71.6141,
64 64.8893,
65 95.0880,
66 121.0438,
67 41.2646,
68 162.7149,
69 89.1650,
70 105.3571,
71 40.9657,
72 98.4671,
73 28.4322,
74 60.000,
75 75.5507,
76 51.6601,
77 135.4753,
78 38.2705,
79 35.9915,
80 31.9500,
81 22.6752,
82 38.2702,
83 37.4459,
84 37.2009,
85 34.5459,
86 38.5043,
87 50.0000,
88 37.0282,
89 55.8886,
90 17.2535,
91 23.1457,
92 36.9874,
93 37.9336,
94 17.1830,
95 20.7521,
96 29.0141,
97 131.6784,
98 13.6851,
99 23.4462,
100 14.7573,
101 36.5261,
102 24.3482,
103 10.4611,
104 86.0290,
105 82.0735,
106 18.6459,
107 37.4608,
108 32.4417,
109 11.5449,
110 11.4172,
111 13.3682,
112 10.0324,
113 10.0584,
114 10.0170,
115 5.4029,
116 10.6349,
117 21.7728,
118 12.7933,
119 19.4177,
120 34.4192,
121 23.9110,
122 22.8287,
123 41.2399,
124 30.1383,
125 22.0342,
126 38.2952,
127 5.5560,
128
129 0.0 // no final test - add a 0 at the end anyway to pad
130};
131
51static void 132static void
52_ui_exit(void) 133_ui_exit(void)
53{ 134{
@@ -67,7 +148,10 @@ _ui_all(void)
67{ 148{
68 Eina_List *l; 149 Eina_List *l;
69 double fps = 0.0; 150 double fps = 0.0;
151 double wfps = 0.0;
70 int t_count = 0; 152 int t_count = 0;
153 int i;
154 double avgw = 0.0;
71 155
72 evas_object_hide(o_menu_logo); 156 evas_object_hide(o_menu_logo);
73 evas_object_hide(o_menu_title); 157 evas_object_hide(o_menu_title);
@@ -99,9 +183,17 @@ _ui_all(void)
99 evas_render(evas); 183 evas_render(evas);
100 t_count++; 184 t_count++;
101 fps += p_fps; 185 fps += p_fps;
186 wfps += (p_fps * weights[t_count]);
102 key_func("Escape"); 187 key_func("Escape");
103 } 188 }
104 if (t_count > 0) printf("%4.2f , EVAS SPEED\n", fps / t_count); 189 for (i = 1; i < ((sizeof(weights) / sizeof(double)) - 1); i++)
190 avgw += weights[i];
191 avgw /= (i - 1);
192 if (t_count > 0)
193 {
194// printf("%4.2f , EVAS SPEED\n", fps / t_count);
195 printf("%4.2f , EVAS SPEED (WEIGHTED)\n", wfps / (t_count * avgw));
196 }
105} 197}
106 198
107 199
@@ -110,8 +202,11 @@ _ui_num(int n)
110{ 202{
111 Eina_List *l; 203 Eina_List *l;
112 double fps = 0.0; 204 double fps = 0.0;
205 double wfps = 0.0;
113 int t_count = 0; 206 int t_count = 0;
114 Menu_Item *mi; 207 Menu_Item *mi;
208 int i;
209 double avgw = 0.0;
115 210
116 evas_object_hide(o_menu_logo); 211 evas_object_hide(o_menu_logo);
117 evas_object_hide(o_menu_title); 212 evas_object_hide(o_menu_title);
@@ -139,10 +234,18 @@ _ui_num(int n)
139 evas_render(evas); 234 evas_render(evas);
140 t_count++; 235 t_count++;
141 fps += p_fps; 236 fps += p_fps;
237 wfps += (p_fps * weights[n]);
142 key_func("Escape"); 238 key_func("Escape");
143 } 239 }
144 done: 240 done:
145 if (t_count > 0) printf("%4.2f , EVAS SPEED\n", fps / t_count); 241 for (i = 1; i < ((sizeof(weights) / sizeof(double)) - 1); i++)
242 avgw += weights[i];
243 avgw /= (i - 1);
244 if (t_count > 0)
245 {
246// printf("%4.2f , EVAS SPEED\n", fps / t_count);
247 printf("%4.2f , EVAS SPEED (WEIGHTED)\n", wfps / (t_count * avgw));
248 }
146} 249}
147 250
148static void 251static void