summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-08-07 00:19:12 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-08-07 00:19:12 +0000
commitffbbc1f8b75f13bef498d6f3f827a8c1d797d65e (patch)
tree2b13d05414374dbf09dc60d836c5ae53463aa6bc /src
parentb76ead26160271383a5440afd5a392ba285a5375 (diff)
stick in some output giving:
1. date + time you ran (or finished) the test 2. version of evas used 3. profile requested 4. actual window resolution you got 5. loop count used 6. engine used 7. fullscreen flag requested now the results at least can be tracked over time knowing what you ran the results on 3 months ago etc. :) SVN revision: 50876
Diffstat (limited to 'src')
-rw-r--r--src/bin/main.c3
-rw-r--r--src/bin/ui.c35
2 files changed, 36 insertions, 2 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index c3c4923..c19101d 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1,7 +1,9 @@
1#include "main.h" 1#include "main.h"
2 2
3Evas *evas = NULL; 3Evas *evas = NULL;
4const char *profile = "n800";
4int win_w = 720, win_h = 420; 5int win_w = 720, win_h = 420;
6const char *engine = NULL;
5int loops = LOOPS; 7int loops = LOOPS;
6int fullscreen = 0; 8int fullscreen = 0;
7 9
@@ -1318,6 +1320,7 @@ _engine_args(int argc, char **argv)
1318 for (j = 0; engines[j].name != NULL; ++j) 1320 for (j = 0; engines[j].name != NULL; ++j)
1319 if (!strcmp(argv[i], engines[j].name)) 1321 if (!strcmp(argv[i], engines[j].name))
1320 { 1322 {
1323 engine = engines[j].name;
1321 if (engines[j].init(engines[j].name, win_w, win_h)) 1324 if (engines[j].init(engines[j].name, win_w, win_h))
1322 { 1325 {
1323 loop_func = engines[j].loop; 1326 loop_func = engines[j].loop;
diff --git a/src/bin/ui.c b/src/bin/ui.c
index d89a961..b151a30 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -143,6 +143,12 @@ _ui_exit(void)
143 engine_abort(); 143 engine_abort();
144} 144}
145 145
146extern const char *profile;
147extern int win_w, win_h;
148extern const char *engine;
149extern int loops;
150extern int fullscreen;
151
146static void 152static void
147_ui_all(void) 153_ui_all(void)
148{ 154{
@@ -190,11 +196,36 @@ _ui_all(void)
190 } 196 }
191 for (i = 1; i < ((sizeof(weights) / sizeof(double)) - 1); i++) 197 for (i = 1; i < ((sizeof(weights) / sizeof(double)) - 1); i++)
192 avgw += weights[i]; 198 avgw += weights[i];
193 avgw /= (i - 1); 199 avgw /= (i - 1);
194 if (t_count > 0) 200 if (t_count > 0)
195 { 201 {
202 char datestr[1024];
203 struct tm *tim;
204 time_t now;
205
206 now = time(NULL);
207 tim = localtime(&now);
208 if (tim) strftime(datestr, sizeof(datestr), "%F %T", tim);
209 else snprintf(datestr, sizeof(datestr), "unknown");
196// printf("%5.2f , EVAS SPEED\n", fps / t_count); 210// printf("%5.2f , EVAS SPEED\n", fps / t_count);
197 printf("%5.2f , EVAS SPEED (WEIGHTED)\n", wfps / (t_count * avgw)); 211 printf("%5.2f , EVAS SPEED (WEIGHTED), "
212 "t, %s , "
213 "ev , %i.%i.%i.%i , "
214 "p , %s , "
215 "sz , %i , %i , "
216 "c , %i , "
217 "e , %s , "
218 "fs , %i\n"
219 ,
220 wfps / (t_count * avgw),
221 datestr,
222 evas_version->major, evas_version->minor, evas_version->micro, evas_version->revision,
223 profile,
224 win_w, win_h,
225 loops,
226 engine,
227 fullscreen
228 );
198 } 229 }
199} 230}
200 231