View | Details | Raw Unified | Return to bug 2249
Collapse All | Expand All

(-)a/src/lte/test/epc-test-run-time.pl (-3 / +3 lines)
 Lines 14-20    Link Here 
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\'";
 Lines 26-35    Link Here 
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);
(-)a/src/lte/test/lte-test-run-time.pl (-2 / +2 lines)
 Lines 32-41    Link Here 
32
            my $timeStats = Statistics::Descriptive::Full->new();
32
            my $timeStats = Statistics::Descriptive::Full->new();
33
            for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ )
33
            for ( my $iteration = 0 ; $iteration < $nIterations ; $iteration++ )
34
            {
34
            {
35
               $launch = "time ./waf --run \'lena-profiling --simTime=$time --nUe=$ue --nEnb=$enb --nFloors=$floor\'";
35
               $launch = "time -f \"real%E\" ./waf --run \'lena-profiling --simTime=$time --nUe=$ue --nEnb=$enb --nFloors=$floor\'";
36
               print "$launch\n";
36
               print "$launch\n";
37
               capture { system($launch ) } \$out, \$err;
37
               capture { system($launch ) } \$out, \$err;
38
               $err =~ /real(.+)m(.+)s/;
38
               $err =~ /real(.+):(.+)/;
39
               my $minutes = $1;
39
               my $minutes = $1;
40
               my $seconds = $minutes * 60 + $2;
40
               my $seconds = $minutes * 60 + $2;
41
               $timeStats->add_data($seconds);
41
               $timeStats->add_data($seconds);

Return to bug 2249