summaryrefslogtreecommitdiff
path: root/src/benchmarks/eo_bench_eo_do.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/eo_bench_eo_do.c')
-rw-r--r--src/benchmarks/eo_bench_eo_do.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/benchmarks/eo_bench_eo_do.c b/src/benchmarks/eo_bench_eo_do.c
new file mode 100644
index 0000000..2b1991f
--- /dev/null
+++ b/src/benchmarks/eo_bench_eo_do.c
@@ -0,0 +1,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);
+}