Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Feb 6 18:39:33 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 )


Change subject: bts: Introduce new module for performance tests
......................................................................

bts: Introduce new module for performance tests

A new module is created since its tests are aimed at running against
real HW set ups to check performance of the system under high loads.
As a result, tests in here will usually require a specific config file.

One first test is introduced to activate all TCH/H channels and see if
the BTS (+BTS-TRX) can keep on going fine for a while.

Related: OS#4365
Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d
---
M bts/BTS_Tests.ttcn
A bts/BTS_Tests_perf.ttcn
2 files changed, 103 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/17098/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7fa1af6..46c9647 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -66,6 +66,7 @@
 friend module BTS_Tests_SMSCB;
 friend module BTS_Tests_virtphy;
 friend module BTS_Tests_LAPDm;
+friend module BTS_Tests_perf;
 
 /* The tests assume a BTS with the following timeslot configuration:
  * TS0 : Combined CCCH + SDCCH/4
diff --git a/bts/BTS_Tests_perf.ttcn b/bts/BTS_Tests_perf.ttcn
new file mode 100644
index 0000000..db75cba
--- /dev/null
+++ b/bts/BTS_Tests_perf.ttcn
@@ -0,0 +1,102 @@
+module BTS_Tests_perf {
+
+/* Performance Tests for OsmoBTS
+ * (C) 2020 by sysmocom s.f.m.c. GmbH <info at sysmocom.de>
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This test suite tests performance of OsmoBTS under different heavy load scenarios.
+ */
+
+import from Misc_Helpers all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from GSM_Types all;
+import from L1CTL_PortType all;
+import from L1CTL_Types all;
+import from LAPDm_Types all;
+import from IPA_Emulation all;
+import from GSM_RR_Types all;
+
+import from RSL_Types all;
+import from RSL_Emulation all;
+
+import from PCUIF_Types all;
+import from PCUIF_CodecPort all;
+
+import from Osmocom_VTY_Functions all;
+
+import from BTS_Tests all;
+
+/***********************************************************************
+ * Performance tests. Expect osmo-bts to be configured with all TRX as TCH/H.
+ ***********************************************************************/
+
+modulepar {
+	float mp_wait_time := 10.0;
+}
+
+
+/* This test requires BTS with 1 TRX to be configured with following timeslots: TS[0]=CCCH+SDCCH4, TS[1..7]: TCH/H
+ * One can simply take the osmo-bsc.cfg in the same dir and change TS1..7, that's all needed.
+ * It will activate TS1..7 TCH/Hchannels (2 TCH/H per TS, that's 14 channels)
+ * and wait for requested time. This test is useful to bring the BTS (+BTS-TRX)
+ * into a high channel load state to check that the system it runs on can keep
+ * on with full load.
+ */
+function f_TC_highchanload_tchh(charstring id) runs on ConnHdlr {
+	var ChannelNrs chan_nr := { /* TS 1..7: TCH/H */
+		valueof(ts_RslChanNr_Lm(1,0)), valueof(ts_RslChanNr_Lm(1,1)),
+		valueof(ts_RslChanNr_Lm(2,0)), valueof(ts_RslChanNr_Lm(2,1)),
+		valueof(ts_RslChanNr_Lm(3,0)), valueof(ts_RslChanNr_Lm(3,1)),
+		valueof(ts_RslChanNr_Lm(4,0)), valueof(ts_RslChanNr_Lm(4,1)),
+		valueof(ts_RslChanNr_Lm(5,0)), valueof(ts_RslChanNr_Lm(5,1)),
+		valueof(ts_RslChanNr_Lm(6,0)), valueof(ts_RslChanNr_Lm(6,1)),
+		valueof(ts_RslChanNr_Lm(7,0)), valueof(ts_RslChanNr_Lm(7,1))
+		};
+
+	log("Started");
+	for (var integer i := 0; i < sizeof(chan_nr); i := i+1) {
+		log("Registering ", chan_nr[i]);
+		f_rslem_register(0, chan_nr[i]);
+	}
+	log("Registered");
+	for (var integer i := 0; i < sizeof(chan_nr); i := i+1) {
+		f_rsl_transceive(ts_RSL_CHAN_ACT(chan_nr[i],
+				 ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3 /* AMR*/)),
+				 tr_RSL_CHAN_ACT_ACK(chan_nr[i]),
+				 log2str("RSL CHAN ACT [", i, "]"));
+	}
+	log("Activated, now waiting ", mp_wait_time, " seconds");
+
+	f_sleep(mp_wait_time);
+	log("sleep done, deactivating");
+
+	for (var integer i := 0; i < sizeof(chan_nr); i := i+1) {
+		f_rsl_transceive(ts_RSL_RF_CHAN_REL(chan_nr[i]),
+				 tr_RSL_RF_CHAN_REL_ACK(chan_nr[i]),
+				 log2str("RF CHAN REL [", i, "]"),
+				 true);
+	}
+	setverdict(pass);
+}
+testcase TC_highchanload_tchh() runs on test_CT {
+	var ConnHdlr vc_conn; /* 1..7 * 2 */
+	var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN, 60.0 + mp_wait_time));
+
+	f_init();
+
+	vc_conn := f_start_handler(refers(f_TC_pespin), pars);
+	vc_conn.done;
+}
+
+control {
+	execute( TC_highchanload_tchh() );
+}
+
+
+}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d
Gerrit-Change-Number: 17098
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200206/e82ce3c8/attachment.htm>


More information about the gerrit-log mailing list