How to Measure Network Startup Performance

Connection startup times are measured by analysing the logs of the Network Performance Testing tools.

TestExecute creates a log file in HTML format for each test. There should be one HTML file for each test case executed. The HTML files contain messages of the test progress and measured values.

  1. Run the NetPerf Test Suite

  2. Locate the HTML test logs. For an automated test driven with TestDriver, the HTML files are stored in the results subdirectories, named by environment version, release, variant and other parameters. For example: ...\armv5\urel\151\xmlroot\root\TestSet\AllTests

  3. Open the HTML for each test. A connection is started for the bearer being tested. The time taken for the connection to be started is recorded in each of these files. These timings can be found on the lines that contain the string "Connection Startup took ". For example:
    12:00:58:594 INFO -  97 netperfserver.cpp 612 Summary statistics begin
    12:00:58:595 INFO -  97 netperfserver.cpp 614 Connection Startup took 0.04589s
    12:00:58:595 INFO -  97 netperfserver.cpp 617 Total client packets transferred: 67
    12:00:58:596 INFO -  97 netperfserver.cpp 620 Summary statistics end
    

Sample Perl script for extracting startup timings

A Perl script can be used to collect the connection startup times. The following codeblock illustrates one example Perl script.

#!/usr/bin/perl

sub processPath($);
sub processResultsFile($);

# Get a path to read the results from
my $resultsPath = shift;
if ($resultsPath eq "")
    {
    $resultsPath = ".";
    }

processPath($resultsPath);

sub processResultsFile($)
    {
    my $resultsFile = @_[0];

    open (RESULTS, $resultsFile) || die "Failed to open file $resultsFile: $!";
    my @results = <RESULTS>;
    close RESULTS;

    $resultsFile =~ m/\.?(.*)[\\\/]([^\\\/]+)$/;
    my $path = $1;
    my $filename = $2;

    foreach $line (@results)
        {
        if ($line =~ m/Connection Startup took ([\d\.]+)s/i)
            {
            print "$path,$filename,$1\n";
            }
        }
    }

sub processPath($)
    {
    my @entries;
    my $path = @_[0];
    
    opendir (DIR, $path) || die "Failed to open path: $!";
    @entries = readdir DIR;
    @entries = sort (@entries);
    closedir DIR;
    
    foreach $entry (@entries)
        {
        if (-f "$path\\$entry")
            {
            if ($entry =~ m/\.htm$|\.html$/i)
                {
                processResultsFile("$path\\$entry");
                }
            }
        }
    }