]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix merge conflicts
authorEdita Kizinevic <edita.kizinevic@cern.ch>
Tue, 24 Nov 2020 19:37:53 +0000 (20:37 +0100)
committerEdita Kizinevic <edita.kizinevic@cern.ch>
Tue, 24 Nov 2020 19:37:53 +0000 (20:37 +0100)
1  2 
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl
wwwroot/cgi-bin/lang/awstats-en.txt

index c8c9a65acc32748a5d0c4dc91f0b8f90d4a90bda,51bbb0d355603d7f6e41f1499a06126c9828ae1a..ce8120737001a4bac397b3f651368c71c9ebdae3
@@@ -1050,15 -1049,11 +1050,15 @@@ ShowPagesStats=PBE
  # Default: HB, Possible column codes: HBC
  ShowFileTypesStats=HB
  
- # Show file size chart (Not yet available)
+ # Show file size chart.
  # Context: Web, Streaming, Mail, Ftp
- # Default: 1, Possible column codes: None
+ # Default: 0, Possible column codes: None
  ShowFileSizesStats=0
  
 +# Show request time chart
 +# Default: 0, Possible column codes: None
 +ShowRequestTimesStats=0
 +
  # Show downloads chart.
  # Context: Web, Streaming, Ftp
  # Default: HB, Possible column codes: HB
index d3c9a0375aa7f82960bda4adc2a7ccb14fa81ebb,e709b7f5c0b65674ac6eadc6528824c7320b3d1a..3322bbf985d4b2d18690f4eb2fdced2c2d3aa892
@@@ -375,7 -373,7 +375,8 @@@ use vars qw
  use vars qw/
    @MiscListOrder %MiscListCalc
    %OSFamily %BrowsersFamily @SessionsRange %SessionsAverage
+   @PayloadRange %PayloadAverage
 +  @TimeRange %TimeAverage
    %LangBrowserToLangAwstats %LangAWStatsToFlagAwstats %BrowsersSafariBuildToVersionHash
    @HostAliases @AllowAccessFromWebToFollowingAuthenticatedUsers
    @DefaultFile @SkipDNSLookupFor
        '1h+',      3600
  );
  
+ @PayloadRange = ('0-44', '44-100', '100-500', '500-1K', '1K-2K', '2K-5K', '5K+');
+ %PayloadAverage = (
+         '0-44', 44, '44-100', 100, '100-500', 500, '500-1K', 1024,
+         '1K-2K', 2048, '2K-5K', 5120, '5K+', 5121
+ );
 +@TimeRange = ('0-44', '44-100', '100-500', '500-1K', '1K-2K', '2K-5K', '5K+');
 +%TimeAverage = (
 +        '0-44', 44, '44-100', 100, '100-500', 500, '500-1K', 1024,
 +        '1K-2K', 2048, '2K-5K', 5120, '5K+', 5121
 +);
 +
  # HTTP-Accept or Lang parameter => AWStats code to use for lang
  # ISO-639-1 or 2 or other       => awstats-xx.txt where xx is ISO-639-1
  %LangBrowserToLangAwstats = (
@@@ -535,7 -533,7 +542,8 @@@ use vars qw
    %MonthPages %MonthHits %MonthBytes
    %MonthNotViewedPages %MonthNotViewedHits %MonthNotViewedBytes
    %_session %_browser_h %_browser_p
+   %_filesize
 +  %_requesttime
    %_domener_p %_domener_h %_domener_k %_errors_h %_errors_k
    %_filetypes_h %_filetypes_k %_filetypes_gz_in %_filetypes_gz_out
    %_host_p %_host_h %_host_k %_host_l %_host_s %_host_u
@@@ -756,7 -754,7 +764,8 @@@ use vars qw/ @Message /
          'Period',
          's',
          'Request average frequency [/s]',
 -        'Request size'
++        'Request size',
 +        'Request time'
  );
  
  #------------------------------------------------------------------------------
@@@ -1632,25 -1630,25 +1641,44 @@@ sub Get_Filename
        return $temp;
  }
  
+ #------------------------------------------------------------------------------
+ # Function:     Return string of Bandwidth Range
+ # Parameters:   $starttime $endtime
+ # Input:        None
+ # Output:       None
+ # Return:       A string that identify the bandwidth range
+ #------------------------------------------------------------------------------
+ sub GetBandwidthRange {
+         my $payload = shift;
+         if ($Debug) { debug("GetPayloadRange $payload",4); }
+         if ($payload <= 44)   { return $PayloadRange[0]; }
+         if ($payload <= 100)  { return $PayloadRange[1]; }
+         if ($payload <= 500)  { return $PayloadRange[2]; }
+         if ($payload <= 1024) { return $PayloadRange[3]; }
+         if ($payload <= 2048) { return $PayloadRange[4]; }
+         if ($payload <= 5120) { return $PayloadRange[5]; }
+         return $PayloadRange[6];
+ }
 +#------------------------------------------------------------------------------
 +# Function:     Return string of Request Time Range
 +# Parameters:   $starttime $endtime
 +# Input:        None
 +# Output:       None
 +# Return:       A string that identify the time range
 +#------------------------------------------------------------------------------
 +sub GetRequestTimeRange {
 +        my $rqtime = shift;
 +        if ($Debug) { debug("GetRequestTimeRange $rqtime",4); }
 +        if ($rqtime <= 44)   { return $TimeRange[0]; }
 +        if ($rqtime <= 100)  { return $TimeRange[1]; }
 +        if ($rqtime <= 500)  { return $TimeRange[2]; }
 +        if ($rqtime <= 1024) { return $TimeRange[3]; }
 +        if ($rqtime <= 2048) { return $TimeRange[4]; }
 +        if ($rqtime <= 5120) { return $TimeRange[5]; }
 +        return $TimeRange[6];
 +}
 +
  #------------------------------------------------------------------------------
  # Function:     Compare two browsers version
  # Parameters: $a
@@@ -3430,7 -3428,7 +3458,8 @@@ sub Read_History_With_TmpUpdate 
                'searchwords'           => 25,
                'keywords'              => 26,
                'errors'                => 27,
-                 'requesttime'           => 28,
+                 'filesize'              => 28,
++                'requesttime'           => 29, 
        );
  
        my $order = ( scalar keys %allsections ) + 1;
                {
                        $SectionsToLoad{'session'} = $order++;
                }
+                 if (   $UpdateStats
+                         || $MigrateStats
+                         || ($HTMLOutput{'main'} && $ShowFileSizesStats)
+                         || $HTMLOutput{'filesizes'} )
+                 {
+                         $SectionsToLoad{'filesize'} = $order++;
+                 }
 +                if (   $UpdateStats
 +                        || $MigrateStats
 +                        || ( $HTMLOutput{'main'} && $ShowRequestTimesStats )
 +                        || $HTMLOutput{'requesttime'} )
 +                {
 +                        $SectionsToLoad{'requesttime'} = $order++;
 +                }
                if (   $UpdateStats
                        || $MigrateStats
                        || ( $HTMLOutput{'main'} && $ShowPagesStats )
                                next;
                        }
  
-                                 delete $SectionsToLoad{'filesize'};
+                         # BEGIN_FILESIZE
+                         if ( $field[0] eq 'BEGIN_FILESIZE' ) {
+                                 if ($Debug) { debug(" Begin of FILESIZE section"); }
+                                 $field[0] = '';
+                                 my $count = 0;
+                                 my $countloaded = 0;
+                                 do {
+                                         if ( $field[0] ) {
+                                                 $count++;
+                                                 if ( $SectionsToLoad{'filesize'} ) {
+                                                         $countloaded++;
+                                                         if ($field[1]) {
+                                                                $_filesize{ $field[0] } += $field[1];
+                                                         }
+                                                 }
+                                         }
+                                         $_ = <HISTORY>;
+                                         chomp $_;
+                                         s/\r//;
+                                         @field =
+                                           split( /\s+/,
+                                                 ( $readxml ? CleanFromTags($_) : $_) );
+                                         $countlines++;
+                                 } until ( $field[0] eq 'END_FILESIZE'
+                                            || $field[0] eq "${xmleb}END_FILESIZE"
+                                            || ! $_ );
+                                 if (   $field[0] ne 'END_FILESIZE'
+                                         && $field[0] ne "${xmleb}END_FILESIZE")
+                                 {
+                                         error(
+ "History file \"$filetoread\" is corrupted (End of section FILESIZE not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1
+                                         );
+                                 }
+                                 if ($Debug) {
+                                         debug(
+ " End of FILESIZE section ($count entries, $countloaded loaded)"
+                                         );
+                                 }
+                                 delete $SectionsToLoad{'filesize'};
+                                 if ( !scalar %SectionsToLoad ) {
+                                         debug(" Stop reading history file. Got all we need.");
+                                         last;
+                                 }
+                                 next;
+                         }
 +                        # BEGIN_REQUESTTIME
 +                        if ( $field[0] eq 'BEGIN_REQUESTTIME' ) {
 +                                if ($Debug) { debug(" Begin of REQUESTTIME section"); }
 +                                $field[0] = '';
 +                                my $count = 0;
 +                                my $countloaded = 0;
 +                                do {
 +                                        if ( $field[0] ) {
 +                                                $count++;
 +                                                if ( $SectionsToLoad{'requesttime'} ) {
 +                                                        $countloaded++;
 +                                                        if ( $field[1] ) {
 +                                                                $_requesttime{ $field[0] } += $field[1];
 +                                                        }                                                }
 +                                        }
 +                                        $_ = <HISTORY>;
 +                                        chomp $_;
 +                                        s/\r//;
 +                                        @field =
 +                                          split( /\s+/,
 +                                                ( $readxml ? CleanFromTags($_) : $_) );
 +                                        $countlines++;
 +                                } until ( $field[0] eq 'END_REQUESTTIME'
 +                                           || $field[0] eq "${xmleb}END_REQUESTTIME"
 +                                           || !$_ );
 +                                if ( $field[0] ne 'END_REQUESTTIME'
 +                                      && $field[0] ne "${xmleb}END_REQUESTTIME")
 +                                {
 +                                        error(
 +"History file \"$filetoread\" is corrupted (End of section REQUESTTIME not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).",
 +                                                "", "", 1
 +                                        );
 +                                }
 +                                if ($Debug) {
 +                                        debug(
 +" End of _REQUESTTIME section ($count entries, $countloaded loaded)"
 +                                        );
 +                                }
++                                delete $SectionsToLoad{'requesttime'};
 +                                if ( !scalar %SectionsToLoad ) {
 +                                        debug(" Stop reading history file. Got all we need.");
 +                                        last;
 +                                }
 +                                next;
 +                        }
 +
                        # BEGIN_MISC
                        if ( $field[0] eq 'BEGIN_MISC' ) {
                                if ($Debug) { debug(" Begin of MISC section"); }
@@@ -6431,9 -6429,9 +6513,12 @@@ sub Save_History 
                print HISTORYTMP "${xmlrb}POS_SESSION${xmlrs}";
                $PosInFile{"session"} = tell HISTORYTMP;
                print HISTORYTMP "$spacebar${xmlre}\n";
+                 print HISTORYTMP "${xmlrb}POS_FILESIZE${xmlrs}";
+                 $PosInFile{"filesize"} = tell HISTORYTMP;
+                 print HISTORYTMP "$spacebar${xmlre}\n";
 +                print HISTORYTMP "${xmlrb}POS_REQUESTTIME${xmlrs}";
 +                $PosInFile{"requesttime"} = tell HISTORYTMP;
 +                print HISTORYTMP "$spacebar${xmlre}\n";
                print HISTORYTMP "${xmlrb}POS_SIDER${xmlrs}";
                $PosInFile{"sider"} = tell HISTORYTMP;
                print HISTORYTMP "$spacebar${xmlre}\n";
                }
                print HISTORYTMP "${xmleb}END_SESSION${xmlee}\n";
        }
+         if ($sectiontosave eq 'filesize')
+         {   # This section must be saved after VISITOR section is read
+                 print HISTORYTMP "\n";
+                 if ($xml) {
+                         print HISTORYTMP "<section id='$sectiontosave'><comment>\n";
+                 }
+                 print HISTORYTMP "# Payload Range - Payload Frequency\n";
+                 $ValueInFile{$sectiontosave} = tell HISTORYTMP;
+                 print HISTORYTMP "${xmlbb}BEGIN_FILESIZE${xmlbs}"
+                   . ( scalar keys %_filesize )
+                   . "${xmlbe}\n";
+                 foreach ( keys %_filesize) {
+                         print HISTORYTMP "${xmlrb}$_${xmlrs}"
+                           . int( $_filesize{$_} )
+                           . "${xmlre}\n";
+                 }
+                 print HISTORYTMP "${xmleb}END_FILESIZE${xmlee}\n";
++        }
 +        if ( $sectiontosave eq 'requesttime' ) {
 +                print HISTORYTMP "\n";
 +                if ($xml) {
 +                        print HISTORYTMP "<section id='$sectiontosave'><comment>\n";
 +                }
 +                print HISTORYTMP "# Request Time Range - Request Time Frequency\n";
 +                $ValueInFile{$sectiontosave} = tell HISTORYTMP;
 +                print HISTORYTMP "${xmlbb}BEGIN_REQUESTTIME${xmlbs}"
 +                  . ( scalar keys %_requesttime )
 +                  . "${xmlbe}\n";
 +                foreach ( keys %_requesttime ) {
 +                        print HISTORYTMP "${xmlrb}$_${xmlrs}"
 +                          . int( $_requesttime{$_} )
 +                          . "${xmlre}\n";
 +                }
 +                print HISTORYTMP "${xmleb}END_REQUESTTIME${xmlee}\n";
 +
          }
        if ( $sectiontosave eq 'sider' )
        {    # This section must be saved after VISITOR section is read
@@@ -7858,7 -7857,7 +7962,8 @@@ sub Init_HashArray 
  
        # Reset all hash arrays with name beginning by _
        %_session     = %_browser_h   = %_browser_p   = ();
+         %_filesize = ();
 +        %_requesttime = ();
        %_domener_p   = %_domener_h   = %_domener_k = %_errors_h = %_errors_k = ();
        %_filetypes_h = %_filetypes_k = %_filetypes_gz_in = %_filetypes_gz_out = ();
        %_host_p = %_host_h = %_host_k = %_host_l = %_host_s = %_host_u = ();
@@@ -10429,12 -10422,12 +10534,18 @@@ sub HTMLMenu
  "<a href=\"$linkanchor#sessions\"$targetpage>$Message[117]</a>";
                                print( $frame? "</td></tr>\n" : " &nbsp; " );
                        }
- "<a href=\"$linkanchor#requesttimes\"$targetpage>$Message[186]</a>";
+                         if ($ShowFileSizesStats) {
+                                 print ( $frame? "<tr><td class=\"awsm\">" : "" );
+                                 print
+ "<a href=\"$linkanchor#filesizes\"$targetpage>$Message[186]</a>";
+                                 print ( $frame? "</td></tr>\n" : " &nbsp; ");
+                         }
 +                        if ($ShowRequestTimesStats) {
 +                                print( $frame? "<tr><td class=\"awsm\">" : "" );
 +                                print
++"<a href=\"$linkanchor#requesttimes\"$targetpage>$Message[187]</a>";
 +                                print ($frame? "</td></tr>\n" : " &nbsp; " );
 +                        }
                        if ($ShowFileTypesStats && $LevelForFileTypesDetection > 0) {
                                print( $frame? "<tr><td class=\"awsm\">" : "" );
                                print
@@@ -10906,85 -10899,85 +11017,164 @@@ sub HTMLMainFileType
        &tab_end();
  }
  
-         my $title = "$Message[186]";
+ #------------------------------------------------------------------------------
+ # Function:     Prints the File Size Table
+ # Parameters:   _
+ # Input:        _
+ # Output:       HTML
+ # Return:       -
+ #------------------------------------------------------------------------------
+ sub HTMLMainFileSize{
+         if ($Debug) { debug("ShowFileSizesStats",2); }
+         my $FirstTime = 0;
+         my $LastTime  = 0;
+         foreach my $key ( keys %FirstTime ) {
+                 my $keyqualified = 0;
+                 if ( $MonthRequired eq 'all' ) { $keyqualified = 1; }
+                 if ( $key =~ /^$YearRequired$MonthRequired/ ) { $keyqualified = 1; }
+                 if ($keyqualified) {
+                         if ( $FirstTime{$key}
+                                 && ( $FirstTime == 0 || $FirstTime > $FirstTime{$key} ) )
+                         {
+                                 $FirstTime = $FirstTime{$key};
+                         }
+                         if ( $LastTime < ( $LastTime{$key} || 0 ) ) {
+                                 $LastTime = $LastTime{$key};
+                         }
+                 }
+         }
+         my $inicio = 0;
+         my $fim = 0;
+         if ($FirstTime =~ /$regdate/o) { $inicio = Time::Local::timelocal($6, $5, $4, $3, $2-1, $1); }
+         if ($LastTime =~ /$regdate/o) { $fim = Time::Local::timelocal($6, $5, $4, $3, $2-1, $1); }
+         my $periodo = $fim - $inicio;
+         my $number_of_requests = 0;
+         my $request_frequency_average = 0;
+         foreach my $key (@PayloadRange) {
+                 $number_of_requests += $_filesize{$key};
+         }
+         if ($periodo) { $request_frequency_average = $number_of_requests/$periodo;}
+         else { $request_frequency_average = 0 };
+         print "$Center<a name=\"filesizes\">&nbsp;</a><br />\n";
+         my $title = "$Message[186]";
+         &tab_head($title, 19, 0, 'filesizes');
+         my $Totals = 0;
+         my $average_s = 0;
+         foreach (@PayloadRange) {
+                 $average_s += ( $_filesize{$_} || 0 ) * $PayloadAverage{$_};
+                 $Totals += $_filesize{$_} || 0;
+         }
+         if ($Totals) { $average_s = int($average_s / $Totals); }
+         else { $average_s = '?'; }
+         print "<tr bgcolor=\"#$color_TableBGRowTitle\"".Tooltip(1)."><th>$Message[182]: $number_of_requests - $Message[183]: $periodo $Message[184] - $Message[185]: ".sprintf ("%.6f",$request_frequency_average)."</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[181]</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[57]</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[15]</th></tr>\n";
+         my $total_s = 0;
+         my $count = 0;
+         foreach my $key (@PayloadRange) {
+                 my $p = 0;
+                 my $f = 0;
+                 if ($Totals) { $p = int($_filesize{$key} / $Totals * 1000) / 10; }
+                 if ($periodo) { $f = $_filesize{$key} / $periodo; }
+                 $total_s += $_filesize{$key} || 0;
+                 print "<tr><td class=\"aws\">$key</td>";
+                 print "<td>".($_filesize{$key}? sprintf("%.5f",$f):"&nbsp;")."</td>";
+                 print "<td>".($_filesize{$key}? $_filesize{$key}:"&nbsp;")."</td>";
+                 print "<td>".($_filesize{$key}? "$p %":"&nbsp;")."</td>";
+                 print "</tr>\n";
+                 $count++;
+         }
+         my $rest_s = $TotalVisits-$total_s;
+         if ($rest_s > 0) {
+                 my $p = 0;
+                 if ($TotalVisits) { $p = int($rest_s / $TotalVisits * 1000) / 10; }
+                 print "<tr".Tooltip(20)."><td class=\"aws\"><span style=\"color: #$color_other\">$Message[0]</span></td>";
+                 print "<td>$rest_s</td>";
+                 print "<td>".($rest_s?"$p %":"&nbsp;")."</td>";
+                 print "</tr>\n";
+         }
+         &tab_end();
+ }
 +#------------------------------------------------------------------------------
 +# Function:     Prints Request Time table
 +# Parameters:   _
 +# Input:        _
 +# Output:       HTML
 +# Return:       -
 +#------------------------------------------------------------------------------
 +sub HTMLMainRequestTime{
 +        if ($Debug) { debug("ShowRequestTimesStats", 2); }
 +        my $FirstTime = 0;
 +        my $LastTime  = 0;
 +        foreach my $key ( keys %FirstTime ) {
 +                my $keyqualified = 0;
 +                if ( $MonthRequired eq 'all' ) { $keyqualified = 1; }
 +                if ( $key =~ /^$YearRequired$MonthRequired/ ) { $keyqualified = 1; }
 +                if ($keyqualified) {
 +                        if ( $FirstTime{$key}
 +                                && ( $FirstTime == 0 || $FirstTime > $FirstTime{$key} ) )
 +                        {
 +                                $FirstTime = $FirstTime{$key};
 +                        }
 +                        if ( $LastTime < ( $LastTime{$key} || 0 ) ) {
 +                                $LastTime = $LastTime{$key};
 +                        }
 +                }
 +        }
 +
 +        my $inicio = 0;
 +        my $fim = 0;
 +        if ($FirstTime =~ /$regdate/o) { $inicio = Time::Local::timelocal($6,$5,$4,$3,$2-1,$1); }
 +        if ($LastTime =~ /$regdate/o) { $fim = Time::Local::timelocal($6,$5,$4,$3,$2-1,$1); }
 +        my $periodo = $fim - $inicio;
 +        my $number_of_requests = 0;
 +        my $request_frequency_average = 0;
 +        foreach my $key (@TimeRange) {
 +                $number_of_requests += $_requesttime{$key};
 +        }
 +        if ($periodo) { $request_frequency_average = $number_of_requests / $periodo;}
 +        else { $request_frequency_average = 0};
 +        print "$Center<a name=\"requesttimes\">&nbsp;</a><br />\n";
++        my $title = "$Message[187]";
 +        &tab_head($title, 19, 0, 'requesttimes');
 +        my $Totals = 0;
 +        my $average_s = 0;
 +        foreach (@TimeRange) {
 +                $average_s += ($_requesttime{$_} || 0) * $TimeAverage{$_};
 +                $Totals += $_requesttime{$_} || 0;
 +        }
 +        if ($Totals) { $average_s = int($average_s / $Totals); }
 +        else { $average_s = '?'; }
 +        print "<tr bgcolor=\"#$color_TableBGRowTitle\"".Tooltip(1)."><th>$Message[182]: $number_of_requests - $Message[183]: $periodo $Message[184] - $Message[185]: ".sprintf ("%.6f",$request_frequency_average)."</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[181]</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[57]</th><th bgcolor=\"#$color_s\" width=\"80\">$Message[15]</th></tr>\n";
 +        my $total_s = 0;
 +        my $count = 0;
 +        foreach my $key (@TimeRange) {
 +                my $p = 0;
 +                my $f = 0;
 +                if ($Totals) { $p = int($_requesttime{$key} / $Totals * 1000) / 10; }
 +                if ($periodo) { $f = $_requesttime{$key} / $periodo; }
 +                $total_s += $_requesttime{$key} || 0;
 +                print "<tr><td class=\"aws\">$key</td>";
 +                print "<td>".($_requesttime{$key} ? sprintf("%.5f",$f) : "&nbsp;")."</td>";
 +                print "<td>".($_requesttime{$key} ? $_requesttime{$key} : "&nbsp;")."</td>";
 +                print "<td>".($_requesttime{$key} ? "$p %" : "&nbsp;")."</td>";
 +                print "</tr>\n";
 +                $count++;
 +        }
 +        my $rest_s = $TotalVisits - $total_s;
 +        if ($rest_s > 0) {
 +                my $p = 0;
 +                if ($TotalVisits) { $p = int($rest_s / $TotalVisits * 1000) / 10; }
 +                print "<tr".Tooltip(20)."><td class=\"aws\"><span style=\"color: #$color_other\">$Message[0]</span></td>";
 +                print "<td>$rest_s</td>";
 +                print "<td>".($rest_s?"$p %":"&nbsp;")."</td>";
 +                print "</tr>\n";
 +        }
 +
 +        &tab_end();
 +}
 +
  #------------------------------------------------------------------------------
  # Function:     Prints the Browser Detail frame or static page
  # Parameters:   _
@@@ -20456,13 -20449,12 +20646,18 @@@ s/^(cache|related):[^\+]+/
                          int( $field[$pos_size] );}    #Count accesses for page (kb)
                }
  
-                 if ( $pos_time >= 0 )
-                 {
+                 # Check size frequency
+                 #---------------------
+                 if ( $pos_size >= 0 ) {
+                         $_filesize{ GetBandwidthRange(int($field[$pos_size])) }++;
+                 }
 +                # Check request time frequency
 +                #-----------------------------
++                if ( $pos_time >= 0 ) {
 +                        $_requesttime{GetRequestTimeRange(int($field[$pos_time]))}++;
 +                }
 +
                # Analyze: Extra
                #---------------
                foreach my $extranum ( 1 .. @ExtraName - 1 ) {
@@@ -21565,14 -21557,8 +21760,14 @@@ if ( scalar keys %HTMLOutput ) 
                # BY FILE SIZE
                #-------------------------
                if ($ShowFileSizesStats) {
-                       # TODO
+                       &HTMLMainFileSize();
                }
 +
 +                # BY REQUEST TIME
 +                #-------------------------
 +                if ($ShowRequestTimesStats) {
 +                        &HTMLMainRequestTime();
 +                }
                
                # BY DOWNLOADS
                #-------------------------
index e985ed5375eae7da344212aff3ed4939b764138c,b9e6556ff28250d8297b9467f86ce57189231663..7155aae350ec622d3346c77a07b27fdc5d23b9ef
@@@ -187,4 -187,4 +187,5 @@@ message182=Number of request
  message183=Period
  message184=s
  message185=Request average frequency [/s]
- message186=Request time
+ message186=Request size
++message187=Request time