summaryrefslogtreecommitdiff
path: root/src/benchmarks
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-15 14:44:41 +0100
committerTom Hacohen <tom@stosb.com>2016-08-15 15:07:42 +0100
commite65aae994e72c1d3f8ac6b5360d3772f177b77ef (patch)
tree7ecaf136e45470635889191aded2b47057720a98 /src/benchmarks
parent35abb3c34d10a4826c98055fb85ecf93915e5ea8 (diff)
Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
Diffstat (limited to 'src/benchmarks')
-rw-r--r--src/benchmarks/eo/class_simple.c14
-rw-r--r--src/benchmarks/eo/eo_bench.c6
-rw-r--r--src/benchmarks/eo/eo_bench.h2
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c8
-rw-r--r--src/benchmarks/eo/eo_bench_eo_add.c26
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c34
6 files changed, 45 insertions, 45 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c
index e825291..b8fd274 100644
--- a/src/benchmarks/eo/class_simple.c
+++ b/src/benchmarks/eo/class_simple.c
@@ -19,7 +19,7 @@ _other_call(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, Eo *other, int ti
19 } 19 }
20} 20}
21 21
22EAPI EO_VOID_FUNC_BODYV(simple_other_call, EO_FUNC_CALL(other, times), Eo *other, int times); 22EAPI EFL_VOID_FUNC_BODYV(simple_other_call, EFL_FUNC_CALL(other, times), Eo *other, int times);
23 23
24static void 24static void
25_a_set(Eo *obj EINA_UNUSED, void *class_data, int a) 25_a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
@@ -28,23 +28,23 @@ _a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
28 pd->a = a; 28 pd->a = a;
29} 29}
30 30
31EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a); 31EAPI EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
32 32
33static Efl_Op_Description op_desc[] = { 33static Efl_Op_Description op_desc[] = {
34 EO_OP_FUNC(simple_a_set, _a_set), 34 EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
35 EO_OP_FUNC(simple_other_call, _other_call), 35 EFL_OBJECT_OP_FUNC(simple_other_call, _other_call),
36}; 36};
37 37
38static const Efl_Class_Description class_desc = { 38static const Efl_Class_Description class_desc = {
39 EO_VERSION, 39 EO_VERSION,
40 "Simple", 40 "Simple",
41 EO_CLASS_TYPE_REGULAR, 41 EFL_CLASS_TYPE_REGULAR,
42 EO_CLASS_DESCRIPTION_OPS(op_desc), 42 EFL_CLASS_DESCRIPTION_OPS(op_desc),
43 NULL, 43 NULL,
44 sizeof(Simple_Public_Data), 44 sizeof(Simple_Public_Data),
45 NULL, 45 NULL,
46 NULL 46 NULL
47}; 47};
48 48
49EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL) 49EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL)
50 50
diff --git a/src/benchmarks/eo/eo_bench.c b/src/benchmarks/eo/eo_bench.c
index 3b6584e..455fd9a 100644
--- a/src/benchmarks/eo/eo_bench.c
+++ b/src/benchmarks/eo/eo_bench.c
@@ -20,7 +20,7 @@ struct _Eina_Benchmark_Case
20 20
21static const Eina_Benchmark_Case etc[] = { 21static const Eina_Benchmark_Case etc[] = {
22 { "eo_do", eo_bench_eo_do }, 22 { "eo_do", eo_bench_eo_do },
23 { "eo_add", eo_bench_eo_add }, 23 { "efl_add", eo_bench_efl_add },
24 { "eo_callbacks", eo_bench_callbacks }, 24 { "eo_callbacks", eo_bench_callbacks },
25 { NULL, NULL } 25 { NULL, NULL }
26}; 26};
@@ -35,7 +35,7 @@ main(int argc, char **argv)
35 return -1; 35 return -1;
36 36
37 eina_init(); 37 eina_init();
38 eo_init(); 38 efl_object_init();
39 39
40 for (i = 0; etc[i].bench_case; ++i) 40 for (i = 0; etc[i].bench_case; ++i)
41 { 41 {
@@ -50,7 +50,7 @@ main(int argc, char **argv)
50 eina_benchmark_free(test); 50 eina_benchmark_free(test);
51 } 51 }
52 52
53 eo_shutdown(); 53 efl_object_shutdown();
54 eina_shutdown(); 54 eina_shutdown();
55 55
56 return 0; 56 return 0;
diff --git a/src/benchmarks/eo/eo_bench.h b/src/benchmarks/eo/eo_bench.h
index 88ee999..5fc14be 100644
--- a/src/benchmarks/eo/eo_bench.h
+++ b/src/benchmarks/eo/eo_bench.h
@@ -2,7 +2,7 @@
2#define EINA_BENCH_H_ 2#define EINA_BENCH_H_
3 3
4void eo_bench_eo_do(Eina_Benchmark *bench); 4void eo_bench_eo_do(Eina_Benchmark *bench);
5void eo_bench_eo_add(Eina_Benchmark *bench); 5void eo_bench_efl_add(Eina_Benchmark *bench);
6void eo_bench_callbacks(Eina_Benchmark *bench); 6void eo_bench_callbacks(Eina_Benchmark *bench);
7 7
8#define _EO_BENCH_TIMES(Start, Repeat, Jump) (Start), ((Start) + ((Jump) * (Repeat))), (Jump) 8#define _EO_BENCH_TIMES(Start, Repeat, Jump) (Start), ((Start) + ((Jump) * (Repeat))), (Jump)
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index ed76228..4c8a9f3 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -16,14 +16,14 @@ static void
16bench_eo_callbacks_add(int request) 16bench_eo_callbacks_add(int request)
17{ 17{
18 int i; 18 int i;
19 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 19 Eo *obj = efl_add(SIMPLE_CLASS, NULL);
20 20
21 for (i = 0 ; i < request ; i++) 21 for (i = 0 ; i < request ; i++)
22 { 22 {
23 efl_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL); 23 efl_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL);
24 } 24 }
25 25
26 eo_unref(obj); 26 efl_unref(obj);
27} 27}
28 28
29static void 29static void
@@ -52,7 +52,7 @@ bench_eo_callbacks_call(int request)
52 Eo *obj[len]; 52 Eo *obj[len];
53 for (i = 0 ; i < len ; i++) 53 for (i = 0 ; i < len ; i++)
54 { 54 {
55 obj[i] = eo_add(SIMPLE_CLASS, NULL); 55 obj[i] = efl_add(SIMPLE_CLASS, NULL);
56 56
57 for (j = 0 ; j < i ; j++) 57 for (j = 0 ; j < i ; j++)
58 { 58 {
@@ -71,7 +71,7 @@ bench_eo_callbacks_call(int request)
71 71
72 for (i = 0 ; i < len ; i++) 72 for (i = 0 ; i < len ; i++)
73 { 73 {
74 eo_unref(obj[i]); 74 efl_unref(obj[i]);
75 } 75 }
76} 76}
77 77
diff --git a/src/benchmarks/eo/eo_bench_eo_add.c b/src/benchmarks/eo/eo_bench_eo_add.c
index 462f3b9..7bd10d8 100644
--- a/src/benchmarks/eo/eo_bench_eo_add.c
+++ b/src/benchmarks/eo/eo_bench_eo_add.c
@@ -7,41 +7,41 @@
7#include "class_simple.h" 7#include "class_simple.h"
8 8
9static void 9static void
10bench_eo_add_linear(int request) 10bench_efl_add_linear(int request)
11{ 11{
12 int i; 12 int i;
13 Eo **objs = calloc(request, sizeof(Eo *)); 13 Eo **objs = calloc(request, sizeof(Eo *));
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 objs[i] = eo_add(SIMPLE_CLASS, NULL); 15 objs[i] = efl_add(SIMPLE_CLASS, NULL);
16 16
17 for (i = 0 ; i < request ; i++) 17 for (i = 0 ; i < request ; i++)
18 eo_unref(objs[i]); 18 efl_unref(objs[i]);
19 free(objs); 19 free(objs);
20} 20}
21 21
22static void 22static void
23bench_eo_add_jump_by_2(int request) 23bench_efl_add_jump_by_2(int request)
24{ 24{
25 int i; 25 int i;
26 Eo **objs = calloc(request, sizeof(Eo *)); 26 Eo **objs = calloc(request, sizeof(Eo *));
27 for (i = 0 ; i < request ; i++) 27 for (i = 0 ; i < request ; i++)
28 objs[i] = eo_add(SIMPLE_CLASS, NULL); 28 objs[i] = efl_add(SIMPLE_CLASS, NULL);
29 29
30 for (i = 0 ; i < request ; i += 2) 30 for (i = 0 ; i < request ; i += 2)
31 eo_unref(objs[i]); 31 efl_unref(objs[i]);
32 32
33 for (i = 0 ; i < request ; i += 2) 33 for (i = 0 ; i < request ; i += 2)
34 objs[i] = eo_add(SIMPLE_CLASS, NULL); 34 objs[i] = efl_add(SIMPLE_CLASS, NULL);
35 35
36 for (i = 0 ; i < request ; i++) 36 for (i = 0 ; i < request ; i++)
37 eo_unref(objs[i]); 37 efl_unref(objs[i]);
38 free(objs); 38 free(objs);
39} 39}
40 40
41void eo_bench_eo_add(Eina_Benchmark *bench) 41void eo_bench_efl_add(Eina_Benchmark *bench)
42{ 42{
43 eina_benchmark_register(bench, "eo_add_linear", 43 eina_benchmark_register(bench, "efl_add_linear",
44 EINA_BENCHMARK(bench_eo_add_linear), _EO_BENCH_TIMES(1000, 10, 50000)); 44 EINA_BENCHMARK(bench_efl_add_linear), _EO_BENCH_TIMES(1000, 10, 50000));
45 eina_benchmark_register(bench, "eo_add_jump_by_2", 45 eina_benchmark_register(bench, "efl_add_jump_by_2",
46 EINA_BENCHMARK(bench_eo_add_jump_by_2), _EO_BENCH_TIMES(1000, 10, 50000)); 46 EINA_BENCHMARK(bench_efl_add_jump_by_2), _EO_BENCH_TIMES(1000, 10, 50000));
47} 47}
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 485f297..d927990 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,44 +10,44 @@ static void
10bench_eo_do_simple(int request) 10bench_eo_do_simple(int request)
11{ 11{
12 int i; 12 int i;
13 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 13 Eo *obj = efl_add(SIMPLE_CLASS, NULL);
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 { 15 {
16 simple_a_set(obj, i); 16 simple_a_set(obj, i);
17 } 17 }
18 18
19 eo_unref(obj); 19 efl_unref(obj);
20} 20}
21 21
22static void 22static void
23bench_eo_do_two_objs(int request) 23bench_eo_do_two_objs(int request)
24{ 24{
25 int i; 25 int i;
26 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 26 Eo *obj = efl_add(SIMPLE_CLASS, NULL);
27 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL); 27 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
28 for (i = 0 ; i < request ; i++) 28 for (i = 0 ; i < request ; i++)
29 { 29 {
30 simple_a_set(obj, i); 30 simple_a_set(obj, i);
31 simple_a_set(obj2, i); 31 simple_a_set(obj2, i);
32 } 32 }
33 33
34 eo_unref(obj); 34 efl_unref(obj);
35 eo_unref(obj2); 35 efl_unref(obj2);
36} 36}
37 37
38static void 38static void
39bench_eo_do_two_objs_growing_stack(int request) 39bench_eo_do_two_objs_growing_stack(int request)
40{ 40{
41 int i; 41 int i;
42 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 42 Eo *obj = efl_add(SIMPLE_CLASS, NULL);
43 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL); 43 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL);
44 for (i = 0 ; i < request ; i++) 44 for (i = 0 ; i < request ; i++)
45 { 45 {
46 simple_other_call(obj, obj2, 20); 46 simple_other_call(obj, obj2, 20);
47 } 47 }
48 48
49 eo_unref(obj); 49 efl_unref(obj);
50 eo_unref(obj2); 50 efl_unref(obj2);
51} 51}
52 52
53static const Efl_Class *cur_klass; 53static const Efl_Class *cur_klass;
@@ -55,11 +55,11 @@ static const Efl_Class *cur_klass;
55static void 55static void
56_a_set(Eo *obj, void *class_data EINA_UNUSED, int a) 56_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
57{ 57{
58 simple_a_set(eo_super(obj, cur_klass), a); 58 simple_a_set(efl_super(obj, cur_klass), a);
59} 59}
60 60
61static Efl_Op_Description op_desc[] = { 61static Efl_Op_Description op_desc[] = {
62 EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set), 62 EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
63}; 63};
64 64
65static void 65static void
@@ -68,23 +68,23 @@ bench_eo_do_super(int request)
68 static Efl_Class_Description class_desc = { 68 static Efl_Class_Description class_desc = {
69 EO_VERSION, 69 EO_VERSION,
70 "Simple2", 70 "Simple2",
71 EO_CLASS_TYPE_REGULAR, 71 EFL_CLASS_TYPE_REGULAR,
72 EO_CLASS_DESCRIPTION_OPS(op_desc), 72 EFL_CLASS_DESCRIPTION_OPS(op_desc),
73 NULL, 73 NULL,
74 0, 74 0,
75 NULL, 75 NULL,
76 NULL 76 NULL
77 }; 77 };
78 cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL); 78 cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
79 79
80 int i; 80 int i;
81 Eo *obj = eo_add(cur_klass, NULL); 81 Eo *obj = efl_add(cur_klass, NULL);
82 for (i = 0 ; i < request ; i++) 82 for (i = 0 ; i < request ; i++)
83 { 83 {
84 simple_a_set(obj, i); 84 simple_a_set(obj, i);
85 } 85 }
86 86
87 eo_unref(obj); 87 efl_unref(obj);
88} 88}
89 89
90void eo_bench_eo_do(Eina_Benchmark *bench) 90void eo_bench_eo_do(Eina_Benchmark *bench)