[gegl] perf: add initialization test



commit ddee06c9c38d981df5e7359cdf504c32f1c1e467
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Jan 22 19:00:01 2016 +0100

    perf: add initialization test

 perf/Makefile.am |    2 ++
 perf/test-init.c |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/perf/Makefile.am b/perf/Makefile.am
index 0c79d96..a45ef8f 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -5,6 +5,7 @@ noinst_PROGRAMS = \
        test-bcontrast-minichunk \
        test-unsharpmask \
        test-bcontrast-4x \
+       test-init \
        test-gegl-buffer-access \
        test-samplers \
        test-rotate \
@@ -44,6 +45,7 @@ test_blur_SOURCES = test-blur.c
 test_bcontrast_SOURCES = test-bcontrast.c
 test_bcontrast_minichunk_SOURCES = test-bcontrast-minichunk.c
 test_bcontrast_4x_SOURCES = test-bcontrast-4x.c
+test_init_SOURCES = test-init.c
 test_unsharpmask_SOURCES = test-unsharpmask.c
 test_gegl_buffer_access_SOURCES = test-gegl-buffer-access.c
 test_samplers_SOURCES = test-samplers.c
diff --git a/perf/test-init.c b/perf/test-init.c
new file mode 100644
index 0000000..3e8dca8
--- /dev/null
+++ b/perf/test-init.c
@@ -0,0 +1,15 @@
+#include "test-common.h"
+
+gint
+main (gint    argc,
+      gchar **argv)
+{
+  long ticks;
+
+  test_start ();
+  gegl_init (&argc, &argv);
+  gegl_exit ();
+  ticks = babl_ticks ()-ticks_start;
+  g_print ("@ %s: %.2f seconds\n", "init", (ticks / 1000000.0));
+  return 0;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]