зеркало из https://github.com/mozilla/pjs.git
Updating old .bat files to key off nav window visibility; adding tools to run with alternative .jars and calculate stats
This commit is contained in:
Родитель
6e5c432bff
Коммит
93ff6e5c2e
|
@ -1,8 +1,8 @@
|
|||
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
|
||||
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@mozilla.exe -P "Default User" -url chrome://navigator/content/quit.html
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@copy "%NS_TIMELINE_LOG_FILE%" bigNav.log
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
@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)
|
||||
@%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)
|
||||
: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)
|
||||
@%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)
|
||||
:skip2
|
||||
@copy chrome\comm.jar.save chrome\comm.jar > nul
|
||||
@copy chrome\modern.jar.save chrome\modern.jar > nul
|
||||
@copy chrome\classic.jar.save chrome\classic.jar > nul
|
||||
@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
|
||||
:errorMissing1
|
||||
@echo missing chrome\comm.jar.%1
|
||||
@goto done
|
||||
:errorMissing2
|
||||
@echo missing chrome\comm.jar.%2
|
||||
:done
|
|
@ -0,0 +1,38 @@
|
|||
@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 ');
|
|
@ -26,6 +26,8 @@ INSTALL_DIR = $(DIST)\bin
|
|||
INSTALL_FILE_LIST = \
|
||||
miniNav.bat \
|
||||
bigNav.bat \
|
||||
compareNav.bat \
|
||||
compareNavStats.bat \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
|
||||
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@mozilla.exe -P "Default User" -chrome chrome://navigator/content/miniNav.xul
|
||||
@grep main1 "%NS_TIMELINE_LOG_FILE%"
|
||||
@grep "Navigator Window visible now" "%NS_TIMELINE_LOG_FILE%"
|
||||
@copy "%NS_TIMELINE_LOG_FILE%" miniNav.log
|
||||
|
|
Загрузка…
Ссылка в новой задаче