examples: Fix regression run for wifi-aggregation

This commit is contained in:
Sébastien Deronne
2016-12-27 09:31:14 +01:00
parent 065b6177d9
commit 6bce2b13b2
2 changed files with 23 additions and 3 deletions

View File

@@ -16,7 +16,6 @@ cpp_examples = [
("multirate --totalTime=0.3s --rateManager=ns3::MinstrelWifiManager", "True", "True"),
("multirate --totalTime=0.3s --rateManager=ns3::OnoeWifiManager", "True", "True"),
("multirate --totalTime=0.3s --rateManager=ns3::RraaWifiManager", "True", "True"),
("simple-wifi-frame-aggregation", "True", "True"),
("wifi-adhoc", "False", "True"), # Takes too long to run
("wifi-ap --verbose=0", "True", "True"), # Don't let it spew to stdout
("wifi-clear-channel-cmu", "False", "True"), # Requires specific hardware
@@ -34,6 +33,7 @@ cpp_examples = [
("vht-wifi-network --simulationTime=0.1", "True", "True"),
("simple-ht-hidden-stations --simulationTime=1", "True", "True"),
("mixed-bg-network --simulationTime=1", "True", "True"),
("wifi-aggregation --simulationTime=1", "True", "True"),
("wifi-tcp", "True", "True"),
("wifi-spectrum-per-example --distance=52 --index=3 --wifiType=ns3::SpectrumWifiPhy --simulationTime=1", "True", "True"),
("wifi-spectrum-per-example --distance=24 --index=31 --wifiType=ns3::YansWifiPhy --simulationTime=1", "True", "True"),

View File

@@ -280,18 +280,38 @@ int main (int argc, char *argv[])
uint32_t totalPacketsThrough = DynamicCast<UdpServer> (serverAppA.Get (0))->GetReceived ();
double throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
std::cout << "Throughput with default configuration (A-MPDU aggregation enabled, 65kB): " << throughput << " Mbit/s" << '\n';
if (throughput < 59.5 || throughput > 60.5)
{
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
exit (1);
}
totalPacketsThrough = DynamicCast<UdpServer> (serverAppB.Get (0))->GetReceived ();
throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
std::cout << "Throughput with aggregation disabled: " << throughput << " Mbit/s" << '\n';
if (throughput < 30 || throughput > 30.5)
{
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
exit (1);
}
totalPacketsThrough = DynamicCast<UdpServer> (serverAppC.Get (0))->GetReceived ();
throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
std::cout << "Throughput with A-MPDU disabled and A-MSDU enabled (8kB): " << throughput << " Mbit/s" << '\n';
if (throughput < 51 || throughput > 52)
{
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
exit (1);
}
totalPacketsThrough = DynamicCast<UdpServer> (serverAppD.Get (0))->GetReceived ();
throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
std::cout << "Throughput with A-MPDU enabled (32kB) and A-MSDU enabled (4kB): " << throughput << " Mbit/s" << '\n';
if (throughput < 58 || throughput > 59)
{
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
exit (1);
}
return 0;
}