tools/performance/layout/genfromlogs.pl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 ##########################################################################################
michael@0 2 #
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 @ARGV;
michael@0 8 $milestone = $ARGV[0];
michael@0 9 print ($milestone);
michael@0 10
michael@0 11 $bldRoot = $ARGV[1];
michael@0 12 print(" BuildRoot: $bldRoot\n");
michael@0 13 $cnt = 0;
michael@0 14
michael@0 15 # Backup the history file
michael@0 16 system( ("copy", "history.txt", "history.bak" ) );
michael@0 17
michael@0 18 # Delete the average.txt file so we don;t get old values in the averages
michael@0 19 if (-e "average.txt")
michael@0 20 {
michael@0 21 system( ("del", "average.txt") );
michael@0 22 }
michael@0 23
michael@0 24 # Run the Header script
michael@0 25 system( ("perl", "header.pl", "$bldRoot", "$milestone", "$ARGV[2]" ) );
michael@0 26
michael@0 27 #
michael@0 28 # now run the average2 script for each file in the logs directory
michael@0 29 #
michael@0 30 while( <Logs\\*.txt> ){
michael@0 31 $line = $_;
michael@0 32 $cnt++;
michael@0 33 if ($line =~ /-log.txt/ ){
michael@0 34 print( "File $cnt: $line\t" );
michael@0 35 @nameParts = split( /-/, $line );
michael@0 36 @nameNoDir = split( /\\/, $nameParts[0] );
michael@0 37 print( "Name: $nameNoDir[1]\n" );
michael@0 38 if ($nameNoDir[1] eq "") {
michael@0 39 print ("Skipping $line\n");
michael@0 40 } else {
michael@0 41 system( ("perl", "Averagetable2.pl", "$nameNoDir[1]", "$line", "$cnt", "$bldRoot", "$nameNoDir[1]", "$ARGV[2]" ) );
michael@0 42 }
michael@0 43 } else {
michael@0 44 print ("Skipping file $line\n");
michael@0 45 }
michael@0 46 }
michael@0 47
michael@0 48 # Run the Footer script
michael@0 49 system( ("perl", "footer.pl", "$bldRoot", "$milestone" ) );
michael@0 50
michael@0 51 print("Processed $cnt logs\n");

mercurial