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
This commit is contained in:
parent
36cb88c6cc
commit
5a012eed43
|
@ -66,6 +66,7 @@ import from BTS_Tests_LAPDm all;
|
||||||
friend module BTS_Tests_SMSCB;
|
friend module BTS_Tests_SMSCB;
|
||||||
friend module BTS_Tests_virtphy;
|
friend module BTS_Tests_virtphy;
|
||||||
friend module BTS_Tests_LAPDm;
|
friend module BTS_Tests_LAPDm;
|
||||||
|
friend module BTS_Tests_perf;
|
||||||
|
|
||||||
/* The tests assume a BTS with the following timeslot configuration:
|
/* The tests assume a BTS with the following timeslot configuration:
|
||||||
* TS0 : Combined CCCH + SDCCH/4
|
* TS0 : Combined CCCH + SDCCH/4
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
module BTS_Tests_perf {
|
||||||
|
|
||||||
|
/* Performance Tests for OsmoBTS
|
||||||
|
* (C) 2020 by sysmocom s.f.m.c. GmbH <info@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_highchanload_tchh), pars);
|
||||||
|
vc_conn.done;
|
||||||
|
}
|
||||||
|
|
||||||
|
control {
|
||||||
|
execute( TC_highchanload_tchh() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue