summaryrefslogtreecommitdiff
path: root/src/bin/exactness
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-06-04 12:52:07 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-06-08 09:46:02 +0200
commitb0cb3e08f2d87dd560c69311f1aeaad1238c9c21 (patch)
tree1fd8034f43d35a3c7ad9c68ffb4a09306303062b /src/bin/exactness
parentead6193504d4f742ff2adc9e5445a2d16fcddf7d (diff)
exactness: record and print test time on success
Having the runtime of a test is interesting for debugging and optimization. Printing them only on success for now. Differential Revision: https://phab.enlightenment.org/D11935
Diffstat (limited to 'src/bin/exactness')
-rw-r--r--src/bin/exactness/exactness.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/exactness/exactness.c b/src/bin/exactness/exactness.c
index 715ad275be..ee62cbd33f 100644
--- a/src/bin/exactness/exactness.c
+++ b/src/bin/exactness/exactness.c
@@ -32,6 +32,7 @@ typedef struct
32 EINA_INLIST; 32 EINA_INLIST;
33 char *name; 33 char *name;
34 const char *command; 34 const char *command;
35 double start_time;
35} List_Entry; 36} List_Entry;
36 37
37typedef enum 38typedef enum
@@ -205,14 +206,17 @@ found:
205 n++; 206 n++;
206 } while (EINA_TRUE); 207 } while (EINA_TRUE);
207 if (!nb_fails) 208 if (!nb_fails)
208 printf("STATUS %s: END - SUCCESS\n", ent->name); 209 {
210 double runtime = ecore_time_get() - ent->start_time;
211 printf("STATUS %s: END - SUCCESS (time: %.2fs)\n", ent->name, runtime);
212 }
209 else 213 else
210 printf("STATUS %s: END - FAIL (%d/%d)\n", ent->name, nb_fails, n - 1); 214 printf("STATUS %s: END - FAIL (%d/%d)\n", ent->name, nb_fails, n - 1);
211} 215}
212 216
213#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10 " 217#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10 "
214static Eina_Bool 218static Eina_Bool
215_run_command_prepare(const List_Entry *ent, char *buf) 219_run_command_prepare(List_Entry *ent, char *buf)
216{ 220{
217 char scn_path[PATH_MAX]; 221 char scn_path[PATH_MAX];
218 Eina_Strbuf *sbuf; 222 Eina_Strbuf *sbuf;
@@ -228,6 +232,7 @@ _run_command_prepare(const List_Entry *ent, char *buf)
228ok: 232ok:
229 sbuf = eina_strbuf_new(); 233 sbuf = eina_strbuf_new();
230 printf("STATUS %s: START\n", ent->name); 234 printf("STATUS %s: START\n", ent->name);
235 ent->start_time = ecore_time_get();
231 eina_strbuf_append_printf(sbuf, 236 eina_strbuf_append_printf(sbuf,
232 "%s exactness_play %s %s%s %s%.*s %s%s%s-t '%s' ", 237 "%s exactness_play %s %s%s %s%.*s %s%s%s-t '%s' ",
233 _wrap_command ? _wrap_command : "", 238 _wrap_command ? _wrap_command : "",