[gegl] perf: make build process more resilient
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] perf: make build process more resilient
- Date: Fri, 20 Jun 2014 07:30:40 +0000 (UTC)
commit 9ec8ce098c6e22d792529dac2a3e63e22660103b
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jun 20 08:11:11 2014 +0200
perf: make build process more resilient
perf/Makefile-retrospect | 21 +--------
perf/joblist | 5 ++-
perf/test-blur.c | 4 +-
perf/test-samplers.c | 111 +++++++++++++++++++---------------------------
4 files changed, 54 insertions(+), 87 deletions(-)
---
diff --git a/perf/Makefile-retrospect b/perf/Makefile-retrospect
index 4da26af..b3bbda0 100644
--- a/perf/Makefile-retrospect
+++ b/perf/Makefile-retrospect
@@ -45,30 +45,13 @@ random:
reports/%:
- (cd checkout; git checkout `echo $@|sed s:reports/::`)
+ (cd checkout; git checkout `echo $@|sed s:reports/::` || ( cd .. ; rm -rf checkout ; git clone -s
$(PROJECT_PATH) checkout ; git checkout `echo $@|sed s:reports/::` ))
# write header for report
git log -1 `echo $@|sed s:reports/::` > $@ || true
# make sure revision is built, and current prefix symlink
./perf-build.sh `echo $@|sed s:reports/::`
# run the Makefile for the tests
- make -f Makefile-tests clean;\
- make -f Makefile-tests; sync;\
- make -f Makefile-tests check >> $@ || true
- # update report.pdf / report.png
- ./create-report.rb
- echo
-
-rreports/%:
- # check out revision
- (cd checkout; git checkout `echo $@|sed s:reports/::`)
- # write header for report
- git log -1 `echo $@|sed s:reports/::` > $@ || true
- # clean previous build
- rm -rf prefix; mkdir prefixes; mkdir prefixes/`echo $@|sed s:reports/::`; ln -s prefixes/`echo $@|sed
s:reports/::` prefix
- # build revision
- (cd checkout; if [ ! -f Makefile ]; then CC=$(CC) ./autogen.sh --disable-introspection
--prefix=`pwd`/../prefix; fi ; \
- make $(MAKE_FLAGS) ; make -k install ) > $ log 2>&1 || true
- # testing
+ tail -f $@ & \
make -f Makefile-tests clean;\
make -f Makefile-tests; sync;\
make -f Makefile-tests check >> $@ || true
diff --git a/perf/joblist b/perf/joblist
index dacca70..7bbf8e5 100644
--- a/perf/joblist
+++ b/perf/joblist
@@ -1,7 +1,10 @@
# 24ee45ef27f19971da390aa232e505bf6c72956d should be blacklisted
-master~36..master
+master~8..master
+master~16..master % 2
+master~32..master % 4
+master~64..master % 8
#ae81fbf..master
#
diff --git a/perf/test-blur.c b/perf/test-blur.c
index 0f233af..d5db4b7 100644
--- a/perf/test-blur.c
+++ b/perf/test-blur.c
@@ -10,9 +10,9 @@ main (gint argc,
gegl_init (&argc, &argv);
- buffer = test_buffer (2048, 1024, babl_format ("RGBA float"));
+ buffer = test_buffer (1024, 1024, babl_format ("RGBA float"));
-#define ITERATIONS 8
+#define ITERATIONS 16
test_start ();
for (i=0;i< ITERATIONS;i++)
{
diff --git a/perf/test-samplers.c b/perf/test-samplers.c
index 7ac0705..e8b45ad 100644
--- a/perf/test-samplers.c
+++ b/perf/test-samplers.c
@@ -1,7 +1,7 @@
#include "test-common.h"
#define BPP 16
-#define ITERATIONS 4
+#define ITERATIONS 12
gint
main (gint argc,
@@ -9,12 +9,13 @@ main (gint argc,
{
GeglBuffer *buffer;
GeglRectangle bound = {0, 0, 4024, 4024};
- const Babl *format;
+ const Babl *format, *format2;
gchar *buf;
gint i;
gegl_init (NULL, NULL);
format = babl_format ("RGBA float");
+ format2 = babl_format ("R'G'B'A float");
buffer = gegl_buffer_new (&bound, format);
buf = g_malloc0 (bound.width * bound.height * BPP);
@@ -70,6 +71,7 @@ main (gint argc,
}
test_end ("gegl_buffer_get 1x1", SAMPLES * ITERATIONS * BPP);
+
test_start ();
for (i = 0; i < ITERATIONS; i++)
{
@@ -79,68 +81,61 @@ main (gint argc,
{
int x = rands[j*2];
int y = rands[j*2+1];
- gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
- GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
+ GeglRectangle rect = {x, y, 1, 1};
+ gegl_buffer_get (buffer, &rect, 1.0, format2, (void*)&px[0],
+ GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
}
}
- test_end ("gegl_buffer_sample nearest", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_buffer_get 1x1 + babl", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
{
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
- GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_NEAREST);
-
for (j = 0; j < SAMPLES; j ++)
{
int x = rands[j*2];
int y = rands[j*2+1];
- gegl_sampler_get (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
+ gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
+ GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
}
-
- g_object_unref (sampler);
}
- test_end ("gegl_sampler_get nearest", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_buffer_sample nearest", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
{
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
- GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_NEAREST);
- GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
-
for (j = 0; j < SAMPLES; j ++)
{
int x = rands[j*2];
int y = rands[j*2+1];
- sampler_get_fun (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
+ gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
+ GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
}
-
- g_object_unref (sampler);
}
- test_end ("sampler_get_fun nearest", SAMPLES * ITERATIONS * BPP);
-
-
-
+ test_end ("gegl_buffer_sample near+ba", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
{
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
+ GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
+ GEGL_SAMPLER_NEAREST);
+
for (j = 0; j < SAMPLES; j ++)
{
int x = rands[j*2];
int y = rands[j*2+1];
- gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
- GEGL_SAMPLER_LINEAR, GEGL_ABYSS_NONE);
+ gegl_sampler_get (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
}
+
+ g_object_unref (sampler);
}
- test_end ("gegl_buffer_sample linear", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_sampler_get nearest", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -148,26 +143,28 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_LINEAR);
+ GEGL_SAMPLER_NEAREST);
+ GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
for (j = 0; j < SAMPLES; j ++)
{
int x = rands[j*2];
int y = rands[j*2+1];
- gegl_sampler_get (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
+ sampler_get_fun (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
}
g_object_unref (sampler);
}
- test_end ("gegl_sampler_get linear", SAMPLES * ITERATIONS * BPP);
+ test_end ("sampler_get_fun nearest", SAMPLES * ITERATIONS * BPP);
+
test_start ();
for (i = 0; i < ITERATIONS; i++)
{
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
- GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_LINEAR);
+ GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format2,
+ GEGL_SAMPLER_NEAREST);
GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
for (j = 0; j < SAMPLES; j ++)
@@ -179,7 +176,8 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("sampler_get_fun linear", SAMPLES * ITERATIONS * BPP);
+ test_end ("sampler_get_fun nearest+babl", SAMPLES * ITERATIONS * BPP);
+
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -191,10 +189,10 @@ main (gint argc,
int x = rands[j*2];
int y = rands[j*2+1];
gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
- GEGL_SAMPLER_CUBIC, GEGL_ABYSS_NONE);
+ GEGL_SAMPLER_LINEAR, GEGL_ABYSS_NONE);
}
}
- test_end ("gegl_buffer_sample cubic", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_buffer_sample linear", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -202,7 +200,7 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_CUBIC);
+ GEGL_SAMPLER_LINEAR);
for (j = 0; j < SAMPLES; j ++)
{
@@ -213,7 +211,7 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("gegl_sampler_get cubic", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_sampler_get linear", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -221,7 +219,7 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_CUBIC);
+ GEGL_SAMPLER_LINEAR);
GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
for (j = 0; j < SAMPLES; j ++)
@@ -233,8 +231,7 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("sampler_get_fun cubic", SAMPLES * ITERATIONS * BPP);
-
+ test_end ("sampler_get_fun linear", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -246,10 +243,10 @@ main (gint argc,
int x = rands[j*2];
int y = rands[j*2+1];
gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
- GEGL_SAMPLER_NOHALO, GEGL_ABYSS_NONE);
+ GEGL_SAMPLER_CUBIC, GEGL_ABYSS_NONE);
}
}
- test_end ("gegl_buffer_sample nohalo", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_buffer_sample cubic", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -257,7 +254,7 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_NOHALO);
+ GEGL_SAMPLER_CUBIC);
for (j = 0; j < SAMPLES; j ++)
{
@@ -268,7 +265,7 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("gegl_sampler_get nohalo", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_sampler_get cubic", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -276,7 +273,7 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_NOHALO);
+ GEGL_SAMPLER_CUBIC);
GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
for (j = 0; j < SAMPLES; j ++)
@@ -288,22 +285,7 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("sampler_get_fun nohalo", SAMPLES * ITERATIONS * BPP);
-
- test_start ();
- for (i = 0; i < ITERATIONS; i++)
- {
- int j;
- float px[4] = {0.2, 0.4, 0.1, 0.5};
- for (j = 0; j < SAMPLES; j ++)
- {
- int x = rands[j*2];
- int y = rands[j*2+1];
- gegl_buffer_sample (buffer, x, y, NULL, (void*)&px[0], format,
- GEGL_SAMPLER_LOHALO, GEGL_ABYSS_NONE);
- }
- }
- test_end ("gegl_buffer_sample lohalo", SAMPLES * ITERATIONS * BPP);
+ test_end ("sampler_get_fun cubic", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -311,7 +293,7 @@ main (gint argc,
int j;
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
- GEGL_SAMPLER_LOHALO);
+ GEGL_SAMPLER_NOHALO);
for (j = 0; j < SAMPLES; j ++)
{
@@ -322,7 +304,7 @@ main (gint argc,
g_object_unref (sampler);
}
- test_end ("gegl_sampler_get lohalo", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_sampler_get nohalo", SAMPLES * ITERATIONS * BPP);
test_start ();
for (i = 0; i < ITERATIONS; i++)
@@ -331,18 +313,17 @@ main (gint argc,
float px[4] = {0.2, 0.4, 0.1, 0.5};
GeglSampler *sampler = gegl_buffer_sampler_new (buffer, format,
GEGL_SAMPLER_LOHALO);
- GeglSamplerGetFun sampler_get_fun = gegl_sampler_get_fun (sampler);
for (j = 0; j < SAMPLES; j ++)
{
int x = rands[j*2];
int y = rands[j*2+1];
- sampler_get_fun (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
+ gegl_sampler_get (sampler, x, y, NULL, (void*)&px[0], GEGL_ABYSS_NONE);
}
g_object_unref (sampler);
}
- test_end ("sampler_get_fun lohalo", SAMPLES * ITERATIONS * BPP);
+ test_end ("gegl_sampler_get lohalo", SAMPLES * ITERATIONS * BPP);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]