contrib: add some benchmarking data about am7xxx_send_image_async
authorAntonio Ospite <ospite@studenti.unina.it>
Sat, 27 Jul 2013 23:11:42 +0000 (01:11 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Sat, 27 Jul 2013 23:11:42 +0000 (01:11 +0200)
contrib/performance/0001-Instrument-code-with-fps-meter.patch [new file with mode: 0644]
contrib/performance/1024x768_am7xxx_send_image.log [new file with mode: 0644]
contrib/performance/1024x768_am7xxx_send_image_async.log [new file with mode: 0644]
contrib/performance/README [new file with mode: 0644]
contrib/performance/ministat_report_1024x768.log [new file with mode: 0644]

diff --git a/contrib/performance/0001-Instrument-code-with-fps-meter.patch b/contrib/performance/0001-Instrument-code-with-fps-meter.patch
new file mode 100644 (file)
index 0000000..5c133ee
--- /dev/null
@@ -0,0 +1,65 @@
+From dc6b216ffea1e80fd3f43d6144eb679a193f5666 Mon Sep 17 00:00:00 2001
+From: Antonio Ospite <ospite@studenti.unina.it>
+Date: Sun, 28 Jul 2013 01:06:41 +0200
+Subject: [PATCH] Instrument code with fps-meter
+X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM<pyWR#k60!#=#>/Vb;]yA5<GWI5`6u&+
+ ;6b'@y|8w"wB;4/e!7wYYrcqdJFY,~%Gk_4]cq$Ei/7<j&N3ah(m`ku?pX.&+~:_/wC~dwn^)MizBG
+ !pE^+iDQQ1yC6^,)YDKkxDd!T>\I~93>J<_`<4)A{':UrE
+
+Instrument code with fps-meter:
+http://git.ao2.it/experiments/fps-meter.git/
+---
+ examples/CMakeLists.txt | 2 +-
+ examples/am7xxx-play.c  | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index c77a812..23af8a9 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ include(CheckSymbolExists)
+-add_definitions("-D_POSIX_C_SOURCE=2") # for getopt()
++add_definitions("-D_POSIX_C_SOURCE=200112L") # for getopt()
+ add_definitions("-D_POSIX_SOURCE") # for sigaction
+ add_definitions("-D_BSD_SOURCE") # for strdup
+diff --git a/examples/am7xxx-play.c b/examples/am7xxx-play.c
+index 3230e67..17228bf 100644
+--- a/examples/am7xxx-play.c
++++ b/examples/am7xxx-play.c
+@@ -34,6 +34,7 @@
+ #include <libswscale/swscale.h>
+ #include <am7xxx.h>
++#include "fps-meter.h"
+ /* On some systems ENOTSUP is not defined, fallback to its value on
+  * linux which is equal to EOPNOTSUPP which is 95
+@@ -292,6 +293,7 @@ static int am7xxx_play(const char *input_format_string,
+       int got_picture;
+       int got_packet;
+       int ret;
++      struct fps_meter_stats stats;
+       ret = video_input_init(&input_ctx, input_format_string, input_path, input_options);
+       if (ret < 0) {
+@@ -354,6 +356,7 @@ static int am7xxx_play(const char *input_format_string,
+               goto cleanup_out_buf;
+       }
++      fps_meter_init(&stats);
+       while (run) {
+               /* read packet */
+               ret = av_read_frame(input_ctx.format_ctx, &in_packet);
+@@ -438,6 +441,7 @@ static int am7xxx_play(const char *input_format_string,
+                               run = 0;
+                               goto end_while;
+                       }
++                      fps_meter_update(&stats);
+               }
+ end_while:
+               if (!output_ctx.raw_output && got_packet)
+-- 
+1.8.3.2
+
diff --git a/contrib/performance/1024x768_am7xxx_send_image.log b/contrib/performance/1024x768_am7xxx_send_image.log
new file mode 100644 (file)
index 0000000..e47ce9e
--- /dev/null
@@ -0,0 +1,51 @@
+14.95
+27.28
+26.73
+23.77
+25.37
+25.30
+25.36
+27.28
+27.73
+27.28
+27.28
+27.28
+27.28
+26.74
+28.26
+26.66
+27.83
+28.26
+27.73
+28.72
+27.71
+28.27
+28.22
+28.31
+28.72
+28.26
+27.81
+26.75
+28.74
+27.73
+27.73
+28.72
+28.72
+28.72
+29.71
+28.26
+29.23
+29.23
+28.27
+27.73
+26.30
+25.91
+23.39
+21.78
+22.77
+27.37
+29.24
+24.38
+27.73
+28.72
+29.23
diff --git a/contrib/performance/1024x768_am7xxx_send_image_async.log b/contrib/performance/1024x768_am7xxx_send_image_async.log
new file mode 100644 (file)
index 0000000..a2286cd
--- /dev/null
@@ -0,0 +1,51 @@
+46.89
+48.35
+48.85
+48.95
+48.78
+49.18
+49.48
+49.61
+49.85
+50.15
+50.24
+49.53
+51.15
+48.98
+47.42
+48.27
+49.07
+49.97
+49.38
+47.96
+49.70
+49.00
+42.21
+45.65
+49.18
+50.22
+49.65
+49.12
+50.50
+53.49
+53.22
+52.99
+53.95
+53.62
+53.98
+53.60
+54.64
+53.96
+54.92
+54.42
+53.65
+54.68
+52.16
+52.81
+53.74
+55.24
+55.50
+56.83
+56.43
+56.39
+57.70
diff --git a/contrib/performance/README b/contrib/performance/README
new file mode 100644 (file)
index 0000000..c00b8db
--- /dev/null
@@ -0,0 +1,7 @@
+Menchmark methodology
+
+  - Code instrumented with fps-meter
+  - Data acquired with this commdn line:
+    am7xxx-play -f x11grab -i :0 -o video_size=1024x768
+  - Sampling repeated with either am7xxx_send_image or am7xx_send_mage_async
+  - Results compared with ministat
diff --git a/contrib/performance/ministat_report_1024x768.log b/contrib/performance/ministat_report_1024x768.log
new file mode 100644 (file)
index 0000000..f3ab0a0
--- /dev/null
@@ -0,0 +1,21 @@
+x 1024x768_am7xxx_send_image.log
++ 1024x768_am7xxx_send_image_async.log
++--------------------------------------------------------------------------+
+|                      x x                                 +               |
+|                      xxx                                 +               |
+|                     xxxx                                 +               |
+|                     xxxx                                 ++              |
+|                     xxxx                                 +++     +       |
+|                    xxxxx                                 +++     ++      |
+|                  x xxxxx                                 +++    ++++     |
+|                  xxxxxxx                              + ++++    +++++ +  |
+|x           xxxxx xxxxxxxx                     +    +  ++++++++ ++++++ +++|
+|                 |___AM__|                               |__M_A____|      |
++--------------------------------------------------------------------------+
+    N           Min           Max        Median           Avg        Stddev
+x  51         14.95         29.71         27.73     27.073529     2.4377185
++  51         42.21          57.7         50.22     51.278627     3.1996344
+Difference at 95.0% confidence
+       24.2051 +/- 1.1175
+       89.405% +/- 4.12765%
+       (Student's t, pooled s = 2.8443)