summaryrefslogtreecommitdiff
path: root/legacy/eobj/src/benchmarks/eo_bench_eo_do.c
blob: 2b1991fa140fbf0817ef582903562c0972da7c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "Eo.h"
#include "eo_bench.h"

#include "class_simple.h"

static void
bench_eo_do_general(int request)
{
   int i;
   Eo *obj = eo_add(SIMPLE_CLASS, NULL);
   for (i = 0 ; i < request ; i++)
     {
        eo_do(obj, simple_a_set(i));
     }

   eo_unref(obj);
}

void eo_bench_eo_do(Eina_Benchmark *bench)
{
   eina_benchmark_register(bench, "general",
         EINA_BENCHMARK(bench_eo_do_general), 100, 10000, 500);
}