[Laszlo-checkins] r11108 - in openlaszlo/trunk: . WEB-INF/lps/server/src/org/openlaszlo/test WEB-INF/lps/server/src/org/openlaszlo/test/netsize test test/appsize

dda@openlaszlo.org dda at openlaszlo.org
Fri Sep 19 11:43:47 PDT 2008


Author: dda
Date: 2008-09-19 11:43:42 -0700 (Fri, 19 Sep 2008)
New Revision: 11108

Added:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/AppSizer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Netsize.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Sizer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/TotalSizer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/UrlSizer.java
   openlaszlo/trunk/test/appsize/
   openlaszlo/trunk/test/appsize/appsize-4.0.txt
   openlaszlo/trunk/test/appsize/appsize-input.txt
   openlaszlo/trunk/test/appsize/readme.txt
Modified:
   openlaszlo/trunk/build.xml
Log:
Change 20080919-dda-I by dda at lester.local on 2008-09-19 12:09:32 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-a
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Create tools to track file size improvements

New Features: ability to compare file sizes against previous versions

Bugs Fixed: LPP-6892 (partial: completes collecting baseline measurements)

Technical Reviewer: promanik (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    The idea was to make an easy-to-use and cross-platform way
    to compare the application sizes with 4.0, and also with any
    other points we need.

    Each 'application' checked is composed of a number of URLs.
    The URLs need to be determined separatedly (firebug is one good
    way to do this).  A property file contains a list of all
    URLs used for each application, along with previous sizes
    for comparison.  The previous sizes do not have to be present.

    The tool that does the checking is called 'netsize', since it
    looks at the actually bytes transmitted over the net, rather
    than file sizes.  It's a very simple HTTP client that just
    fetches URLs and looks at the size.  The only checking of
    content is to try to detect 404 errors that may show up as an
    error page.

    One suggestion was to fail the build if the apps grow by too
    much.  Perhaps we'll consider that in the future, but it's
    certainly easy enough now to check larger changes to track
    the effect on file sizes.

    The completes the requirement to collect baseline measurements
    against 4.0 and gives us tools to improves the sizes.
    LPP-6892 will be left open to track various improvement ideas.

Tests:
    After assuring that tomcat is running and that the app is deployed,
    in $LPS_HOME, ran:
       ant appsize
    to see that the file sizes have not changed since earlier today :-)
    Also ran:
       ant -Dappsize.input=appsize-4.0.txt appsize
    to see that the file sizes have changed somewhat since 4.0

    Other uses are detailed in test/appsize/readme.txt, including
    the -Dappsize.flags, -Dappsize.dir, -Dappsize.output and -Dappsize.branch
    options.



Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/AppSizer.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/AppSizer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Netsize.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Netsize.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Sizer.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/Sizer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/TotalSizer.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/TotalSizer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/UrlSizer.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/test/netsize/UrlSizer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: openlaszlo/trunk/build.xml
===================================================================
--- openlaszlo/trunk/build.xml	2008-09-19 16:40:14 UTC (rev 11107)
+++ openlaszlo/trunk/build.xml	2008-09-19 18:43:42 UTC (rev 11108)
@@ -71,7 +71,6 @@
     <property name="catalina.engine" value="Catalina" />
     <property name="catalina.host"   value="localhost" />
 
-
     <path id="3rd.party.classpath" >
         <dirset dir="${webapp-lps-home}/server/build" />
         <fileset dir="WEB-INF/lib">
@@ -81,6 +80,10 @@
         <fileset
                 dir="${LZ_VENDOR_ROOT}" includes="*.jar" />
     </path>
+    <path id="lps.test.classpath">
+        <fileset dir="3rd-party" includes="**/*.jar" />
+        <fileset dir="WEB-INF/lib" includes="**/*.jar" />
+    </path>
 
     <!-- Properties describing which OS as binary flags -->
     <condition property="os.isunix">
@@ -972,6 +975,40 @@
        </exec>
   </target>
 
+  <!--================  Target [compiled-app-size] ==============-->
+
+  <!--
+   To get the application size versus a recent benchmark, do 'ant appsize'.
+   To do the same versus 4.0, do 'ant -Dappsize.input-appsize-4.0.txt appsize'
+   See test/appsize/readme.txt for more info.
+    -->
+
+  <target name="appsize" depends="init,build,build-classes"
+          unless="skip.appsize"
+          description="Check application file sizes" >
+
+    <!-- override to get input/output files in a different directory -->
+    <property name="appsize.dir"     value="test/appsize" />
+
+    <!-- override to change the input file, for example:  -->
+    <property name="appsize.input"   value="appsize-input.txt" />
+
+    <!-- override to change the output file -->
+    <property name="appsize.output"  value="appsize-output.txt" />
+
+    <!-- override to change the URL to a different branch for comparison -->
+    <property name="appsize.branch"  value="${lps.branch}" />
+
+    <!-- Set to -v for verbose, and/or -i to ignore errors -->
+    <property name="appsize.flags"  value="" />
+
+    <java classname="org.openlaszlo.test.netsize.Netsize"
+          fork="yes" failonerror="yes" classpathref="lps.test.classpath">
+      <arg line="${appsize.flags} -p ${appsize.branch} -f ${appsize.dir}/${appsize.input} -n ${appsize.dir}/${appsize.output}"/>
+    </java>
+    
+  </target>
+
   <!--================  Target [runlzunit] ==============-->
   <target name="runlzunit" depends="init" description="Run lzunit test apps" unless="skip.runlzunit">
     <ant target="lztest" />

Added: openlaszlo/trunk/test/appsize/appsize-4.0.txt


Property changes on: openlaszlo/trunk/test/appsize/appsize-4.0.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/test/appsize/appsize-input.txt


Property changes on: openlaszlo/trunk/test/appsize/appsize-input.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: openlaszlo/trunk/test/appsize/readme.txt


Property changes on: openlaszlo/trunk/test/appsize/readme.txt
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native



More information about the Laszlo-checkins mailing list