From f659f5e5b0295dff617c89818bb442b9565ab6ba Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 5 Dec 2019 14:58:20 +0100 Subject: doc: osmux: use generated svg instead of pychart Replace python 2 code using pychart to draw a graph in osmux-reference.adoc with the generated svg file. The upstream of pychart is dead, there is no python 3 version, and python 2 is EOL at the end of 2019. This is the only time we ever made use of pychart in osmo-gsm-manuals, so with this change, we can just drop the dependency. I've generated the chart by saving the python code in chart.py, then: $ ./chart.py --format=svg --font-size=3 > chart.svg Related: OS#2819, OS#4193 Depends: osmo-ci I754b133d77743582bd84c33c74ecc9eb9ca4c0ef Change-Id: I36b721f895caee9766528e14d854b6aa2a2fac85 --- .../images/osmux-expected-traffic-savings.svg | 822 +++++++++++++++++++++ doc/manuals/osmux-reference.adoc | 47 +- 2 files changed, 824 insertions(+), 45 deletions(-) create mode 100644 doc/manuals/images/osmux-expected-traffic-savings.svg diff --git a/doc/manuals/images/osmux-expected-traffic-savings.svg b/doc/manuals/images/osmux-expected-traffic-savings.svg new file mode 100644 index 000000000..2031c6660 --- /dev/null +++ b/doc/manuals/images/osmux-expected-traffic-savings.svg @@ -0,0 +1,822 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + 2 + + 3 + + 4 + + 5 + + 6 + + 7 + + 8 + Concurrent calls + + + + + + + + + 10% + + 20% + + 30% + + 40% + + 50% + + 60% + + 70% + Traffic Saving + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bfactor 1 + + + + + + + bfactor 2 + + + + + + + bfactor 3 + + + + + + + bfactor 4 + + + + + + + bfactor 5 + + + + + + + bfactor 6 + + + + + + + bfactor 7 + + + + + + + bfactor 8 + + + + + + + + + + + diff --git a/doc/manuals/osmux-reference.adoc b/doc/manuals/osmux-reference.adoc index e28347a3f..a6c4085ad 100644 --- a/doc/manuals/osmux-reference.adoc +++ b/doc/manuals/osmux-reference.adoc @@ -503,51 +503,8 @@ The following figure shows the growth in traffic saving (in %) depending on the number of concurrent numbers of callings for a given set of batching factor values: -["python2"] ----- -from pychart import * -theme.get_options() -theme.scale_factor = 5 -theme.use_color = 1 -theme.reinitialize() - -IP_HEADER=20 -UDP_HEADER=8 -RTP_HEADER=12 -OSMUX_HEADER=4 -AMR59_PAYLOAD=17 - -def osmux_get_size(calls, payloads): - return IP_HEADER + UDP_HEADER + (OSMUX_HEADER + AMR59_PAYLOAD * payloads) * calls - -def rtp_get_size(calls, payloads): - return calls * payloads * (IP_HEADER + UDP_HEADER + RTP_HEADER + AMR59_PAYLOAD) - -def calc_traffic_saving(calls, payloads): - return 100 - 100.0 * osmux_get_size(calls, payloads) / rtp_get_size(calls, payloads) - -# The first value in each tuple is the X value, and subsequent values are Y values for different lines. -def gen_table(): - data = [] - for calls in range(1, 9): - col = (calls,) - for factor in range(1, 9): - col += (calc_traffic_saving(calls, factor),) - data.append(col) - return data - -def do_plot(data): - xaxis = axis.X(format="/hL%d", tic_interval = 1, label="Concurrent calls") - yaxis = axis.Y(format="%d%%", tic_interval = 10, label="Traffic Saving") - ar = area.T(x_axis=xaxis, y_axis=yaxis, y_range=(None,None), x_grid_interval=1, x_grid_style=line_style.gray70_dash3) - for y in range(1, len(data[0])): - plot = line_plot.T(label="bfactor "+str(y), data=data, ycol=y, tick_mark=tick_mark.circle1) - ar.add_plot(plot) - ar.draw() - -data = gen_table() -do_plot(data) ----- +// Original python2 pychart code replaced with generated svg in I36b721f895caee9766528e14d854b6aa2a2fac85 +image::images/osmux-expected-traffic-savings.svg[] The results show a saving of 15.79% with only one concurrent call and with batching disabled (bfactor 1), that quickly improves with more concurrent calls -- cgit v1.2.3