summaryrefslogtreecommitdiff
path: root/legacy/eobj/src/benchmarks/eo_bench_eo_do.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-08-26 13:18:44 +0000
committerTom Hacohen <tom@stosb.com>2012-08-26 13:18:44 +0000
commite8ad8e3a93772027ca83a744650c28dc9ec535e1 (patch)
tree3d18cb0100b84499dc0c935ef46eaeb2fbfb7b2f /legacy/eobj/src/benchmarks/eo_bench_eo_do.c
parent4c7a23d21e27e7e6b6721842b693567b6a876eb9 (diff)
Eo: Added simple benchmark infra (not really testing anything atm).
SVN revision: 75712
Diffstat (limited to 'legacy/eobj/src/benchmarks/eo_bench_eo_do.c')
-rw-r--r--legacy/eobj/src/benchmarks/eo_bench_eo_do.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/legacy/eobj/src/benchmarks/eo_bench_eo_do.c b/legacy/eobj/src/benchmarks/eo_bench_eo_do.c
new file mode 100644
index 0000000000..2b1991fa14
--- /dev/null
+++ b/legacy/eobj/src/benchmarks/eo_bench_eo_do.c
@@ -0,0 +1,27 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "Eo.h"
6#include "eo_bench.h"
7
8#include "class_simple.h"
9
10static void
11bench_eo_do_general(int request)
12{
13 int i;
14 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
15 for (i = 0 ; i < request ; i++)
16 {
17 eo_do(obj, simple_a_set(i));
18 }
19
20 eo_unref(obj);
21}
22
23void eo_bench_eo_do(Eina_Benchmark *bench)
24{
25 eina_benchmark_register(bench, "general",
26 EINA_BENCHMARK(bench_eo_do_general), 100, 10000, 500);
27}