Bug 591717 - Remove most of tools/performance/startup, r=dbaron, a=NPOTB

--HG--
extra : rebase_source : cd49a675fb1bac30d6ce809bb1688eaf00a08bee
This commit is contained in:
Phil Ringnalda 2010-08-29 18:21:12 -07:00
Родитель 0856549d08
Коммит b363655d87
12 изменённых файлов: 0 добавлений и 286 удалений

Просмотреть файл

@ -1,8 +0,0 @@
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@copy "%NS_TIMELINE_LOG_FILE%" bigNav.log

Просмотреть файл

@ -1,69 +0,0 @@
@setlocal
@if "%2"=="" @goto :error
@if "%1"=="" @goto :error
@rem Choose executable (commercial build if there is one).
@if exist netscp6.exe @goto :nav
@set prog=mozilla.exe
@goto :profile1
:nav
@set prog=netscp6.exe
@rem Set profiles, defaulting to "Default User"
:profile1
@if "%3"=="" @goto :defaultUser
@set profile1=%3
@goto :profile2
:defaultUser
@set profile1=Default User
:profile2
@if "%4"=="" @goto :defaultUser2
@set profile2=%4
@goto :start
:defaultUser2
@set profile2=%profile1%
:start
@echo ----- %1/%profile1% -----
@rem For each *.jar.<a>, save *.jar and replace it.
@for %%x in ( chrome\*.jar ) do @if exist %%x.%1 (copy %%x %%x.save >nul & copy %%x.%1 %%x >nul)
@rem Do likewise for these special files: installed-chrome.txt chrome.rdf
@for %%x in ( chrome\installed-chrome.txt chrome\chrome.rdf ) do @if exist %%x.%1 (copy %%x %%x.save >nul & copy %%x.%1 %%x >nul)
@%prog% -P "%profile1%" -url chrome://navigator/content/quit.html > nul
@%prog% -P "%profile1%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@%prog% -P "%profile1%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@%prog% -P "%profile1%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@copy "%NS_TIMELINE_LOG_FILE%" "%1.%profile1%.log" > nul
@rem Restore *.jar files.
@for %%x in ( chrome\*.jar ) do @if exist %%x.%1 @(copy %%x.save %%x >nul & del %%x.save)
@rem Restore special files.
@for %%x in ( chrome\installed-chrome.txt chrome\chrome.rdf ) do @if exist %%x.%1 @(copy %%x.save %%x >nul & del %%x.save)
:skip1
@echo ----- %2/%profile2% -----
@rem For each *.jar.<b>, save *.jar and replace it.
@for %%x in ( chrome\*.jar ) do @if exist %%x.%2 @(copy %%x %%x.save >nul & copy %%x.%2 %%x >nul)
@rem Do likewise for these special files: installed-chrome.txt chrome.rdf
@for %%x in ( chrome\installed-chrome.txt chrome\chrome.rdf ) do @if exist %%x.%2 (copy %%x %%x.save >nul & copy %%x.%2 %%x >nul)
@%prog% -P "%profile2%" -url chrome://navigator/content/quit.html > nul
@%prog% -P "%profile2%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@%prog% -P "%profile2%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@%prog% -P "%profile2%" -url chrome://navigator/content/quit.html > nul
@grep \"Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@copy "%NS_TIMELINE_LOG_FILE%" "%2.%profile2%.log" > nul
@rem Restore *.jar files.
@for %%x in ( chrome\*.jar ) do @if exist %%x.%2 @(copy %%x.save %%x >nul & del %%x.save)
@rem Restore special files.
@for %%x in ( chrome\installed-chrome.txt chrome\chrome.rdf ) do @if exist %%x.%2 @(copy %%x.save %%x >nul & del %%x.save)
:skip2
@goto :done
:error
@echo Syntax: compareNav ^<a^> ^<b^> ^<profile1^> ^<profile2^>
@echo where ^<a^> and ^<b^> are flavors of comm.jar
@echo e.g., comm.jar.^<a^> and comm.jar.^<b^>
@echo and ^<profile1^> and ^<profile2^> are optional profile names
@echo to use; e.g., "classic" or "modern"; profile1 defaults to
@echo "Default User", profile2 defaults to profile1
@goto :done
:done

Просмотреть файл

@ -1,38 +0,0 @@
@rem = ('
@perl compareNavStats.bat %1 %2 %3 %4 %5 %6
@goto done
@rem ');
#<perl>
if ( @ARGV + 0 ) {
# Get numbers from args.
@desc = ( "first", "second" );
$sum1 = $ARGV[0] + $ARGV[1] + $ARGV[2];
$sum2 = $ARGV[3] + $ARGV[4] + $ARGV[5];
} else {
# Get numbers from stdin.
@args = ();
@desc = ();
while (<>) {
print;
if ( /^----- (.*) -----/ ) {
$#desc += 1;
@desc[ $#desc ] = $1;
}
if ( /^(\d+\.?\d*)\:\s*Navigator Window visible now/ ) {
$#args += 1;
@args[ $#args ] = $1;
}
}
$sum1 = $args[0] + $args[1] + $args[2];
$sum2 = $args[3] + $args[4] + $args[5];
}
$avg1 = $sum1/3;
$avg2 = $sum2/3;
$diff = $avg1 - $avg2;
printf "%s=%f %s=%f diff=%f (%f%% %s)\n", $desc[0], $avg1, $desc[1], $avg2, $diff, abs(($diff/$avg1)*100), ($diff>=0 ? "faster" : "slower");
#</perl>
@rem = ('
:done
@rem ');

Просмотреть файл

@ -1,7 +0,0 @@
comm.jar:
content/navigator/miniNav.xul (miniNav.xul)
content/navigator/miniXul.xul (miniXul.xul)
content/navigator/quit.html (quit.html)
content/navigator/openNav.html (openNav.html)
content/navigator/open10Windows.html (open10Windows.html)
content/navigator/open10Windows.xul (open10Windows.xul)

Просмотреть файл

@ -1,58 +0,0 @@
#!nmake
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
INSTALL_DIR = $(DIST)\bin
INSTALL_FILE_LIST = \
miniNav.bat \
bigNav.bat \
compareNav.bat \
compareNavStats.bat \
newWindowStats.bat \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: INSTALL_FILES
clobber::
!@for %x in ($(INSTALL_FILE_LIST)) do @$(RM) $(INSTALL_DIR)\%x

Просмотреть файл

@ -1,8 +0,0 @@
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
@copy "%NS_TIMELINE_LOG_FILE%" miniNav.log

Просмотреть файл

@ -1,15 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="
dump( 'miniXul window.arguments[0]=' + window.arguments[0] + '\n' );
if ( window.arguments[0] ) browser.loadURI( window.arguments[0] );
"
title="Minimal Navigator">
<browser id="content"
type="content-primary"
style="-moz-binding:none;"
src="about:blank"/>
</window>

Просмотреть файл

@ -1,7 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="miniXul">
</window>

Просмотреть файл

@ -1,37 +0,0 @@
@rem = ('
@perl newWindowStats.bat %1 %2 %3 %4 %5 %6
@goto done
@rem ');
#<perl>
# Get numbers from stdin.
@start = ();
@end = ();
while (<>) {
if ( /^(\d+\.?\d*)\:\s*nsXULWindow created/ ) {
$#start += 1;
@start[ $#start ] = $1;
}
if ( /^(\d+\.?\d*)\:\s*nsXULWindow loaded and visible/ ) {
$#end += 1;
@end[ $#end ] = $1;
# Ignore the first two windows (hidden window and first window).
if ( $#end > 2 ) {
# Display simple ascii graph.
$len = int ( ( $end[$#end] - $start[$#end] + 0.005 ) * 100 );
print '*' x ($len%80), " ", $end[$#end]-$start[$#end],"\n";
}
}
}
$sum = 0.0;
# Ignore the first two windows (hidden window and first window).
foreach $i (3..$#start) {
$sum += $end[$i] - $start[$i];
}
$avg = $sum/($#start-2);
printf "avg window open time for %d windows: %f\n", $#start-2, $avg;
#</perl>
@rem = ('
:done
@rem ');

Просмотреть файл

@ -1,4 +0,0 @@
<html>
<body onload='for(var i=0;i<10;i++){window.open("chrome://navigator/content/quit.html");};window.close()')>
</body>
</html>

Просмотреть файл

@ -1,31 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="open10Windows"
onload="onload();">
<script type="application/javascript">
<![CDATA[
const n = 11;
var sub = [];
function onload() {
var i = n;
while( i-- ) {
window.setTimeout( 'sub[n] = openMiniXul();', i*1000 );
}
window.setTimeout( 'shutDown();', n*1000 );
}
function openMiniXul(n) {
return window.openDialog("chrome://navigator/content/miniXul.xul","_blank","","chrome,all");
}
function shutDown() {
var i = n;
while( i-- ) {
sub[i].close();
}
window.close();
}
]]>
</script>
</window>

Просмотреть файл

@ -1,4 +0,0 @@
<html>
<body onload='window.open( "http://www.netscape.com/")'>
</body>
</html>