|
|
| 14 |
|
14 |
|
| 15 |
|
15 |
|
| 16 |
# Configure and complite first the program to avoid counting compilation time as running time |
16 |
# Configure and complite first the program to avoid counting compilation time as running time |
| 17 |
my $launch = "CXXFLAGS=\"-O3 -w\" ./waf -d optimized configure --enable-static --enable-examples --enable-modules=lte" |
17 |
my $launch = "CXXFLAGS=\"-O3 -w\" ./waf -d optimized configure --enable-static --enable-examples --enable-modules=lte"; |
| 18 |
my $out, my $err; |
18 |
my $out, my $err; |
| 19 |
capture { system($launch ) } \$out, \$err; |
19 |
capture { system($launch ) } \$out, \$err; |
| 20 |
$launch = "./waf --run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; |
20 |
$launch = "./waf --run \'lena-profiling --simTime=0.1 --nUe=1 --nEnb=1 --nFloors=0\'"; |
|
|
| 26 |
my $timeStats = Statistics::Descriptive::Full->new(); |
26 |
my $timeStats = Statistics::Descriptive::Full->new(); |
| 27 |
for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ ) |
27 |
for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ ) |
| 28 |
{ |
28 |
{ |
| 29 |
$launch = "time ./waf --run \'lena-simple-epc --simTime=$time --numberOfNodes=$node'"; |
29 |
$launch = "time -f \"real%E\" ./waf --run 'lena-simple-epc --simTime=$time --numberOfNodes=$node'"; |
| 30 |
print "$launch\n"; |
30 |
print "$launch\n"; |
| 31 |
capture { system($launch ) } \$out, \$err; |
31 |
capture { system($launch ) } \$out, \$err; |
| 32 |
$err =~ /real(.+)m(.+)s/; |
32 |
$err =~ /real(.+):(.+)/; |
| 33 |
my $minutes = $1; |
33 |
my $minutes = $1; |
| 34 |
my $seconds = $minutes * 60 + $2; |
34 |
my $seconds = $minutes * 60 + $2; |
| 35 |
$timeStats->add_data($seconds); |
35 |
$timeStats->add_data($seconds); |