Integrating first set of OTA test class Blackbox metrics
This CL adds test class level Blackbox metrics to a subset of Wifi OTA
tests using the BlackboxMappedMetricLogger implemented in wifi
performance utilities.
Test: Done
Bug: None
Change-Id: If798af1e8da74a2787be4d669edf588f691f5af1
Signed-off-by: Omar El Ayach <oelayach@google.com>
diff --git a/acts/tests/google/wifi/WifiSensitivityTest.py b/acts/tests/google/wifi/WifiSensitivityTest.py
index a31dc66..a92cf21 100644
--- a/acts/tests/google/wifi/WifiSensitivityTest.py
+++ b/acts/tests/google/wifi/WifiSensitivityTest.py
@@ -588,6 +588,11 @@
performance in varying channel conditions
"""
+ def __init__(self, controllers):
+ WifiSensitivityTest.__init__(self, controllers)
+ self.bb_metric_logger = (
+ wputils.BlackboxMappedMetricLogger.for_test_class())
+
def setup_class(self):
WifiSensitivityTest.setup_class(self)
self.ota_chamber = ota_chamber.create(
@@ -635,10 +640,12 @@
test_id_str = '{} {}Mbps, Chain Mask = {}'.format(
test_id_dict['mode'], test_id_dict['rate'],
test_id_dict['chain_mask'])
+ metric_test_config = '{}_{}_ch{}'.format(test_id_dict['mode'], test_id_dict['rate'], test_id_dict['chain_mask'])
else:
test_id_str = '{} MCS{} Nss{}, Chain Mask = {}'.format(
test_id_dict['mode'], test_id_dict['rate'],
test_id_dict['num_streams'], test_id_dict['chain_mask'])
+ metric_test_config = '{}_mcs{}_nss{}_ch{}'.format(test_id_dict['mode'], test_id_dict['rate'], test_id_dict['num_streams'], test_id_dict['chain_mask'])
curr_plot = wputils.BokehFigure(
title=str(test_id_str),
x_label='Orientation (deg)',
@@ -648,6 +655,11 @@
channel_results['orientation'],
channel_results['sensitivity'],
legend='Channel {}'.format(channel))
+ metric_tag = 'ota_summary_ch{}_{}'.format(channel, metric_test_config)
+ metric_name = metric_tag + '.avg_sensitivity'
+ metric_value = sum(channel_results['sensitivity']) / len(
+ channel_results['sensitivity'])
+ self.bb_metric_logger.add_metric(metric_name, metric_value)
current_context = (
context.get_current_context().get_full_output_path())
output_file_path = os.path.join(current_context,
@@ -740,7 +752,7 @@
class WifiOtaSensitivity_10Degree_Test(WifiOtaSensitivityTest):
def __init__(self, controllers):
- WifiSensitivityTest.__init__(self, controllers)
+ WifiOtaSensitivityTest.__init__(self, controllers)
requested_channels = [6, 36, 149]
requested_rates = [
self.RateTuple(8, 1, 86.7),
@@ -755,7 +767,7 @@
class WifiOtaSensitivity_SingleChain_10Degree_Test(WifiOtaSensitivityTest):
def __init__(self, controllers):
- WifiSensitivityTest.__init__(self, controllers)
+ WifiOtaSensitivityTest.__init__(self, controllers)
requested_channels = [6, 36, 149]
requested_rates = [
self.RateTuple(8, 1, 86.7),
@@ -768,7 +780,7 @@
class WifiOtaSensitivity_45Degree_Test(WifiOtaSensitivityTest):
def __init__(self, controllers):
- WifiSensitivityTest.__init__(self, controllers)
+ WifiOtaSensitivityTest.__init__(self, controllers)
requested_rates = [
self.RateTuple(8, 1, 86.7),
self.RateTuple(0, 1, 7.2),