osmo-bsc/tests/handover
Neels Hofmeyr c1bfc88b6b fix performance for chan_counts and all_allocated stats
The all_allocated_update_bsc() does inefficient iterating to count
active/inactive lchans, which scales badly for high numbers of TRX
managed by osmo-bsc.

We need to update the all_allocated flags immediately (periodic counting
alone would suffer from undersampling), so, until now, we are calling
this inefficient function every time a channel state changes.

Instead of iterating all channels for any chan state changes anywhere,
keep global state of the current channel counts, and on channel state
change only update those ts, trx, bts counts that actually change.

A desirable side effect: for connection stats and handover decision 2,
we can now also use the globally updated channel counts and save a bunch
of inefficient iterations.

To get accurate channel counts at all times, spread around some
chan_counts_ts_update() calls in pivotal places. It re-counts the given
timeslot and cascades counter changes, iff required.

Just in case I missed some channel accounting, still run an inefficient
iterating count regularly that detects errors, logs them and fixes them.
No real harm done if such error appears. None show in ttcn3 BSC_Tests.
It is fine to do the inefficient iteration once per second; channel
state changes can realistically happen hundreds of times per second.

Related: SYS#5976
Change-Id: I580bfae329aac8d4552723164741536af6512011
2022-06-02 14:24:30 +02:00
..
Makefile.am tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS' 2022-04-14 17:21:50 +00:00
handover_test.c fix performance for chan_counts and all_allocated stats 2022-06-02 14:24:30 +02:00
handover_tests.ok add test_dyn_ts_favor_static_ts_as_target.ho_vty 2021-07-16 16:04:18 +00:00
handover_tests.sh handover_tests.sh: update stdout/stderr only on capital -U arg 2021-01-19 10:50:41 +00:00
test_amr_tch_f_to_h.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_amr_tch_f_to_h_balance_congestion.ho_vty handover_test: cosmetic cfg simplifications in 5 tests 2021-01-05 23:27:26 +01:00
test_amr_tch_f_to_h_congestion.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_amr_tch_f_to_h_congestion_assignment.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_amr_tch_f_to_h_congestion_assignment_2.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_amr_tch_f_to_h_congestion_assignment_3.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_amr_tch_h_and_afs_bias.ho_vty hodec2: don't apply AFS bias to same-cell lchans 2021-06-18 09:40:27 +00:00
test_amr_tch_h_to_f_congestion.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_amr_tch_h_to_f_congestion_two_cells.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_amr_tch_h_to_f_rxlev.ho_vty hodec2: implement upgrade TCH/H -> TCH/F (without AFS bias) 2021-06-13 15:55:03 +00:00
test_amr_tch_h_to_f_rxlev_congested.ho_vty hodec2: implement upgrade TCH/H -> TCH/F (without AFS bias) 2021-06-13 15:55:03 +00:00
test_amr_tch_h_to_f_rxlev_oscillation.ho_vty hodec2: fix low rxlev tch/h<->tch/f oscillation 2021-06-29 22:24:24 +02:00
test_amr_tch_h_to_f_rxqual.ho_vty hodec2: add low-rxqual-assignment penalty timer (2/2) 2021-07-15 09:28:18 +00:00
test_amr_tch_h_to_f_rxqual_congested.ho_vty hodec2: implement upgrade TCH/H -> TCH/F (without AFS bias) 2021-06-13 15:55:03 +00:00
test_amr_tch_h_to_f_rxqual_oscillation.ho_vty hodec2: fix low rxqual tch/h<->tch/f oscillation 2021-06-29 22:24:24 +02:00
test_balance_congestion.ho_vty handover_test: cosmetic cfg simplifications in 5 tests 2021-01-05 23:27:26 +01:00
test_balance_congestion_2.ho_vty handover_test: add lchan wildcards to meas-rep cmd 2021-01-12 09:36:12 +01:00
test_balance_congestion_by_percentage.ho_vty handover_test: enhance test_balance_congestion_by_percentage.ho_vty 2021-01-14 06:24:57 +00:00
test_balance_congestion_tchf_tchh.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_bs_power.ho_vty handover: apply meas report BS Power to RXLEV, fix ho oscillation 2021-06-05 14:35:16 +00:00
test_congestion.ho_vty handover_test: add lchan wildcards to meas-rep cmd 2021-01-12 09:36:12 +01:00
test_congestion_favor_best_target_rxlev.ho_vty handover_test: add test_congestion_favor_best_target_rxlev.ho_vty 2021-01-05 23:27:26 +01:00
test_congestion_intra_vs_inter_cell.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_congestion_no_oscillation.ho_vty hodec2: fix congestion oscillation bug 2021-01-12 09:36:12 +01:00
test_congestion_no_oscillation2.ho_vty hodec2: fix congestion oscillation bug 2021-01-12 09:36:12 +01:00
test_disabled_ho_and_as.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_dyn_ts_balance_congestion.ho_vty hodec2: fix congestion balancing on dyn TS 2021-01-19 11:49:07 +01:00
test_dyn_ts_congestion_tch_f_vs_tch_h.ho_vty hodec2: fix congestion resolution on dyn TS 2021-01-19 11:49:07 +01:00
test_dyn_ts_congestion_tch_f_vs_tch_h_2.ho_vty add test_dyn_ts_congestion_tch_f_vs_tch_h_2.ho_vty 2021-01-19 11:49:07 +01:00
test_dyn_ts_favor_half_used_tch_h_as_target.ho_vty extend test_dyn_ts_favor_half_used_tch_h_as_target.ho_vty 2021-07-16 16:04:18 +00:00
test_dyn_ts_favor_moving_half_used_tch_h.ho_vty hodec 2: do intra-cell congestion resolution by Assignment 2021-05-28 17:22:59 +00:00
test_dyn_ts_favor_static_ts_as_target.ho_vty add test_dyn_ts_favor_static_ts_as_target.ho_vty 2021-07-16 16:04:18 +00:00
test_ho_to_better_cell.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_ho_to_better_cell_2.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_hysteresis.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_insufficient_measurements.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_keep_efr_codec.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_keep_fr_codec.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_keep_hr_codec.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_max_handovers.ho_vty handover_test: fix naming/wording: 'handover-req' should be 'handover-cmd' 2021-05-27 17:06:21 +02:00
test_max_ta.ho_vty handover tests: test passing of penalty timeout 2021-07-15 09:28:18 +00:00
test_min_rxlev_vs_congestion.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_min_rxlev_vs_hysteresis.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_neighbor_congested.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_neighbor_full.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_no_congestion.ho_vty handover_test: add lchan wildcards to meas-rep cmd 2021-01-12 09:36:12 +01:00
test_penalty_timer.ho_vty handover tests: test passing of penalty timeout 2021-07-15 09:28:18 +00:00
test_resource_indication.ho_vty RES IND: pick lchan with least interference 2021-07-11 21:14:51 +02:00
test_rxqual.ho_vty hodec2: add penalty-time low-rxqual-ho 2022-03-31 14:43:48 +00:00
test_rxqual_vs_congestion.ho_vty handover_test: add 'meas-rep repeat N' 2021-01-05 23:27:26 +01:00
test_stay_in_better_cell.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_stay_in_better_cell_2.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00
test_story.ho_vty handover_test: rename test scripts from numbers to names 2020-12-23 01:59:08 +00:00