summaryrefslogtreecommitdiff
path: root/validation/test/P2P_throughput
diff options
context:
space:
mode:
authorJean-Philippe NOEL2013-02-15 14:59:28 +0100
committerJean-Philippe NOEL2013-02-21 11:59:30 +0100
commit11b40b23ecbb251559d97e6d8ed4f230a654be9a (patch)
tree75e5fdcfa66c3d1e82c57a34637419b0d725e6dc /validation/test/P2P_throughput
parent1a2b011d08dc0fbcf5f3746e4cc43a1b518d8c8a (diff)
validation: retrieve the traces in P2P, refs #3777
Diffstat (limited to 'validation/test/P2P_throughput')
-rw-r--r--validation/test/P2P_throughput/P2P_throughput.py43
-rw-r--r--validation/test/P2P_throughput/P2P_throughput.rst23
-rw-r--r--validation/test/P2P_throughput/config.py12
-rw-r--r--validation/test/P2P_throughput/configs/SPK300g_eoc.py12
4 files changed, 68 insertions, 22 deletions
diff --git a/validation/test/P2P_throughput/P2P_throughput.py b/validation/test/P2P_throughput/P2P_throughput.py
index 9185420063..bdbb525643 100644
--- a/validation/test/P2P_throughput/P2P_throughput.py
+++ b/validation/test/P2P_throughput/P2P_throughput.py
@@ -100,7 +100,6 @@ def report(config, config_file):
#We dump the file and not the config, since it may be more
#readable and may contain some useful comments
shutil.copy(config_file, reports_directory)
- iperf.clean_traces()
t0 = time.time()
estimated_min = measurements_estimated_time_min()
print "\nEstimated measurements time in minutes:", estimated_min, "\n"
@@ -113,12 +112,19 @@ def report(config, config_file):
print "Actual/estimated measurements times in minutes:", \
actual_min, "/", estimated_min
- # Extract the datarates from the measurements files and generate the
- # images
+ # Extract the datarates from the measurements files, generate the
+ # images and retrieve the traces
+ traces_files = []
for (test_protocol, test_type, test_params) in config["fixtures"]:
+
+ traces_files_aux = get_traces_files(test_protocol, test_type,
+ test_params)
+ traces_files.append(traces_files_aux)
+
datarates = extract_datarates(test_protocol, test_type, test_params)
dump_and_draw(test_protocol, test_type, test_params, datarates,
str_max_throughput())
+
if test_type != "dynamic_jammer":
for ce_stat_name in config["displayed_CE_stats"]:
ce_stats = extract_ce_stats(test_protocol, test_type,
@@ -132,7 +138,7 @@ def report(config, config_file):
shutil.copy(power_fig_path, reports_directory)
# Build the rst file
- build_rst_file(bench_fig_name, power_fig_name)
+ build_rst_file(bench_fig_name, power_fig_name, traces_files)
# Build the pdf file
rst_utils.rst2pdf(file_prefix())
@@ -232,7 +238,8 @@ def check_config_aux(attenuation_offset, attenuation_range_db,
else:
assert test_params == None, test_params
-def build_rst_file(bench_fig_name, power_fig_name):
+def build_rst_file(bench_fig_name, power_fig_name, traces_files):
+
bench_data = read_bench_data()
waveform_data = get_waveform_data()
@@ -247,7 +254,8 @@ def build_rst_file(bench_fig_name, power_fig_name):
rst_file.close()
rst_filled_template = rst_template.format (**rst_template_dict)
- rst_file = rst_filled_template + rst_results()
+ rst_file = rst_filled_template + rst_results() + \
+ rst_utils.traces(traces_files, get_reports_directory())
report = open(file_prefix() + ".rst", 'w')
report.write(rst_file)
@@ -379,10 +387,12 @@ def make_measurements(test_protocol, test_type, test_params,
test_values = get_test_values(test_type)
if test_values == ["time"]:
+ iperf.clean_traces()
change_channel(test_type, test_params, None)
make_measurement(test_protocol, test_type, test_params, None)
else:
for test_value in test_values:
+ iperf.clean_traces()
if change_channel(test_type, test_params, test_value):
iperf.update_tone_maps(time_s)
make_measurement(test_protocol, test_type, test_params, test_value)
@@ -533,6 +543,27 @@ def dump_and_draw(test_protocol, test_type, test_params, values, yname):
iperf.draw(title, xlabel, ylabel, directions, test_type, test_values,
file_name_base + ".png", values)
+def get_traces_files(test_protocol, test_type, test_params):
+
+ test_values = get_test_values(test_type)
+
+ if test_values == ["time"]:
+ traces_directories = [file_prefix(test_protocol, test_type, test_params,
+ None)]
+ else:
+ traces_directories = [ file_prefix(test_protocol, test_type,
+ test_params, test_value)
+ for test_value in test_values ]
+
+ traces_files = []
+ for trace_directory in traces_directories:
+ if os.path.exists(trace_directory):
+ traces_files_paths = \
+ [ os.path.join(trace_directory, trace_file_name)
+ for trace_file_name in os.listdir(trace_directory) ]
+ traces_files.append(traces_files_paths)
+ return traces_files
+
def get_all_directions(test_type):
curves = config[test_type]["curves"]
return iperf.get_all_directions(curves)
diff --git a/validation/test/P2P_throughput/P2P_throughput.rst b/validation/test/P2P_throughput/P2P_throughput.rst
index 626f870b18..bc3b46c989 100644
--- a/validation/test/P2P_throughput/P2P_throughput.rst
+++ b/validation/test/P2P_throughput/P2P_throughput.rst
@@ -50,13 +50,13 @@ The AMN's are necessary only if the plugs are not EoC, i.e have no native output
Network settings
----------------
-The PC of test and the hosts A and B should be configured so that the PC of test is able to connect to the host A and B in SSH without having to enter a password for each SSH session.
+The PC of test and the hosts A and B must be configured so that the PC of test is able to connect to the host A and B in SSH without having to enter a password for each SSH session.
-The PC of test should be configured to be able to ping the power strip. To that aim, on the PC of test, execute the following command (where ethX is the interface between the PC of test and the power strip)::
+The PC of test must be configured to be able to ping the power strip. To that aim, on the PC of test, execute the following command (where ethX is the interface between the PC of test and the power strip)::
sudo route add -net $POWER_STRIP_ADDRESS netmask 255.255.255.255 $ethX
-For SPC300-like plugs, the PC of test and the host A (resp. B) should be configured so that the PC of test is able to ping and telnet the plug A (resp. B) via the host A (resp. B). To that aim:
+For SPC300-like plugs, the PC of test and the host A (resp. B) must be configured so that the PC of test is able to ping and telnet the plug A (resp. B) via the host A (resp. B). To that aim:
* On the PC of test, execute the following commands::
@@ -80,7 +80,9 @@ For SPC300-like plugs, the PC of test and the host A (resp. B) should be configu
Software
--------
-The packages **python**, **dia** and **rst2pdf** must be installed on the PC of test.
+On the PC of test, the packages **python**, **dia** and **rst2pdf** must be installed .
+
+On the hosts A and B, the package **proftpd-basic** must be installed, and an FTP server must be configured and running, so that the SPC300-like plugs can upload their files of traces.
Earthing guidelines
-------------------
@@ -89,6 +91,7 @@ The earthing guidelines are the following:
* Use non-shielded Ethernet cables to connect the plugs to the PC's
* Connect the earth of the power strip to the T
* If there are AMN's:
+
- Separate the ground and the earth on the AMN's so that the signal does not radiate through the earth
- Connect the grounds of the AMN's with a coax without core
@@ -146,13 +149,21 @@ Configuration
Relatively to the figure given in the `Description`_ section, the parameters used for this report are the following::
Start order: The host A is started first
- Iperf version on the host A ({non_plc_ip_address_a}): {version_a}
- Iperf version on the host B ({non_plc_ip_address_a}): {version_b}
+ Host A ({non_plc_ip_address_a}):
+ Plug model: {plug_model_a}
+ Plug version: {plug_version_a}
+ Iperf version: {version_a}
+ Host B ({non_plc_ip_address_b}):
+ Plug model: {plug_model_b}
+ Plug version: {plug_version_b}
+ Iperf version: {version_b}
AMN attenuation (M): {amn_attenuation_db} dB
Signal attenuation (N): {signal_attenuation_db} dB
T attenuation (T): {t_attenuation_db} dB
Wave form attenuation (P): {waveform_attenuation_db} dB
+
+
SNR calculation
---------------
diff --git a/validation/test/P2P_throughput/config.py b/validation/test/P2P_throughput/config.py
index 780a6c0b14..34f105d18c 100644
--- a/validation/test/P2P_throughput/config.py
+++ b/validation/test/P2P_throughput/config.py
@@ -165,8 +165,8 @@
"plc_netmask": None,
"plugs":
{
- (1, 1): ("100", None, None, "spk300g_eoc_master"),
- (1, 5): ("101", None, None, "spk300g_eoc_slave")
+ (1, 1, "master"): ("100", None, None, "spk300g_eoc_master"),
+ (1, 5, "slave"): ("101", None, None, "spk300g_eoc_slave")
}
},
# Configuration passed to the 'non_spc300' module
@@ -180,12 +180,14 @@
"host_a":{"non_plc_ip_address":"tursan",
"user":"spidcom",
"plc_ip_address":"192.168.5.254",
- "power_strip_key":(1, 1)
+ "plug_key":(1, 1, "master"),
+ "ftp_server_root":"/var/all_ftp"
},
"host_b":{"non_plc_ip_address":"spidcom-lab1",
"user":"spidcom",
"plc_ip_address":"192.168.5.52",
- "power_strip_key":(1, 5)
- },
+ "plug_key":(1, 5, "slave"),
+ "ftp_server_root":"/var/all_ftp"
+ }
}
}
diff --git a/validation/test/P2P_throughput/configs/SPK300g_eoc.py b/validation/test/P2P_throughput/configs/SPK300g_eoc.py
index a0fa99ef62..95b492d810 100644
--- a/validation/test/P2P_throughput/configs/SPK300g_eoc.py
+++ b/validation/test/P2P_throughput/configs/SPK300g_eoc.py
@@ -62,8 +62,8 @@
"plc_netmask":None,
"plugs":
{
- (1, 1):("100", None, None, "SPK300g-revE"),
- (1, 5):("101", None, None, "SPK300g-revE")
+ (1, 1, "master"):("100", None, None, "SPK300g-revE"),
+ (1, 5, "slave"):("101", None, None, "SPK300g-revE")
}
},
"non_spc300":{
@@ -75,12 +75,14 @@
"host_a":{"non_plc_ip_address":"tursan",
"user":"spidcom",
"plc_ip_address":"192.168.5.254",
- "power_strip_key":(1, 1)
+ "plug_key":(1, 1, "master"),
+ "ftp_server_root":"/var/all_ftp"
},
"host_b":{"non_plc_ip_address":"spidcom-lab1",
"user":"spidcom",
"plc_ip_address":"192.168.5.52",
- "power_strip_key":(1, 5)
- },
+ "plug_key":(1, 5, "slave"),
+ "ftp_server_root":"/var/all_ftp"
+ }
}
}