[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-dev
Subject:    Re: [groovy-dev] Re: dangerous commit
From:       Paul King <paulk () asert ! com ! au>
Date:       2007-08-28 7:24:30
Message-ID: 46D3CDAE.9090300 () asert ! com ! au
[Download RAW message or body]

Here is a script which extracts test times from the cruise server:

def base = 'http://build.canoo.com'
def prefix = '/groovy/buildresults?log='
def page = new XmlSlurper(new \
org.cyberneko.html.parsers.SAXParser()).parse("$base/groovy/buildresults") def links \
= page.depthFirst().grep{ it.name() == 'A' && it.@href.text() =~ \
/buildresults\?log=log.*build/ }.'@href' links.each { process "$base$it" }
def options = page.depthFirst().grep{ it.name() == 'OPTION' && it.@value.text() =~ \
/log200.*build\.\d{3,4}/ }.'@value' options.each { process "$base$prefix$it" }

def process(url) {
    def innerpage = new XmlSlurper(new \
org.cyberneko.html.parsers.SAXParser()).parse(url)  def data = \
innerpage.depthFirst().grep{ it.name() == 'TD' && it.@class.toString() == \
'unittests-data' }.collect{ it.text() }  def totalTests = 0
    def totalTime = 0.0
    data.each {
        def tokens = it.split(': ')
        if (tokens[0] == 'Tests') totalTests += tokens[1].toInteger()
        if (tokens[0] == 'Time') totalTime += tokens[1].toFloat()
    }
    println "$url: ${totalTests/totalTime} tests/second"
}

It has these dependencies:

<project xmlns="http://maven.apache.org/POM/4.0.0" \
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  \
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 \
http://maven.apache.org/maven-v4_0_0.xsd">  <modelVersion>4.0.0</modelVersion>
  <groupId>asert.groovyexamples</groupId>
  <artifactId>nekohtml</artifactId>
  <version>development</version>
  <dependencies>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>nekohtml</groupId>
      <artifactId>nekohtml</artifactId>
      <version>0.9.5</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

I don't think it gives us much useful data though as it probably just reflects
how busy the build server was at the time. Here is some sample output:

http://build.canoo.com/groovy/buildresults?log=log20070828032732Lbuild.581: \
5.703099288696724 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070828025311Lbuild.580: \
5.042372382125471 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070828022059Lbuild.579: \
6.0122034520264025 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070828014823Lbuild.578: \
5.614065405515367 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070828011423Lbuild.577: \
5.305223834166131 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827214936Lbuild.576: \
5.189327289316237 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827165427Lbuild.575: \
5.445502136016189 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827161942Lbuild.574: \
5.058848779249127 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827061410Lbuild.573: \
7.085353460142047 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827054620Lbuild.572: \
6.958787194233989 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827041806Lbuild.571: \
6.804224404348572 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070827035048Lbuild.570: \
6.935711004188932 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070826135221Lbuild.569: \
7.0222227240627975 tests/second \
http://build.canoo.com/groovy/buildresults?log=log20070826073322Lbuild.568: \
7.1130418983251165 tests/second

I ran it for over 350 builds with no definitive trend.
It was obvious when we added back in the missing root tests and when
we moved from Java 4 to Java 5 but apart from that it seems to overall
be getting slightly faster but not by much and with a fair bit of
variation along the way.

I guess we could try to make it more selective.

Paul.

Alex Tkachman wrote:
> It helps because as I think it is results before my commit :)
> 
> On 8/28/07, tog <guillaume.alleon@gmail.com> wrote:
> > 
> > 
> > > Could you please try the same with r7746
> > 
> > Alex
> > Here are the results for that particular revision.
> > 
> > alleon@oggy:~/benchmarks$ export JAVA_OPTS="-server"; groovy
> > Mandelbrot.groovy
> > 
> > Groovy Elapsed 29.021
> > 
> > Groovy Elapsed 27.148
> > 
> > Groovy Elapsed 27.395
> > 
> > Hope this helps
> > 
> > Tog
> > 
> > > On 8/28/07, tog < guillaume.alleon@gmail.com> wrote:
> > > > Hi Alex,
> > > > 
> > > > I noticed the same behavior as Charlie on a Mandelbrot benchmark I am
> > > > currently using to compare various programming language performances. On
> > > > that benchmark, I noticed a ~40% increase in terms of time using trunk
> > > > instead og 1.1-beta-2
> > > > 
> > > > Here are the figures I got (each benchmark is performed three times):
> > > > 
> > > > Groovy Version: 1.1-beta-2 JVM: 1.5.0_11-b03
> > > > groovy Mandelbrot.groovy
> > > > Groovy Elapsed 22.146
> > > > Groovy Elapsed 21.182
> > > > Groovy Elapsed 21.317
> > > > 
> > > > export JAVA_OPTS="-server";groovy Mandelbrot.groovy
> > > > Groovy Elapsed 18.325
> > > > Groovy Elapsed 17.913
> > > > Groovy Elapsed 17.932
> > > > 
> > > > Groovy Version: 1.1-beta-3-SNAPSHOT JVM: 1.5.0_11-b03
> > > > 
> > > > export JAVA_OPTS="-server"; groovy Mandelbrot.groovy
> > > > Groovy Elapsed 26.999
> > > > Groovy Elapsed 25.406
> > > > Groovy Elapsed 25.274
> > > > 
> > > > Guillaume
> > > > 
> > > > 
> > > > On 8/27/07, Charles Oliver Nutter < charles.nutter@sun.com> wrote:
> > > > > Alex Tkachman wrote:
> > > > > > Now I would appreciate any reports if any performance improvement
> > > > noticed.
> > > > > Not a very narrow comparison, but here's 1.1-b2 versus trunk on a fib
> > > > > benchmark John Wilson posted some time back:
> > > > > 
> > > > > trunk:
> > > > > 
> > > > > ~/NetBeansProjects/groovy-core $ JAVA_OPTS=-server
> > > > > target/install/bin/groovy fib1.groovy
> > > > > 4369
> > > > > 832040
> > > > > 4249
> > > > > 832040
> > > > > 4078
> > > > > 832040
> > > > > 4088
> > > > > 832040
> > > > > 4086
> > > > > 832040
> > > > > 
> > > > > Groovy 1.1-b2
> > > > > 
> > > > > ~/NetBeansProjects/groovy-core $ JAVA_OPTS=-server
> > > > > ~/groovy-1.1-beta-2/bin/groovy fib1.groovy
> > > > > 4007
> > > > > 832040
> > > > > 3696
> > > > > 832040
> > > > > 3628
> > > > > 832040
> > > > > 3620
> > > > > 832040
> > > > > 3611
> > > > > 832040
> > > > > 
> > > > > This certainly isn't to say your changes have slowed it down, but
> > trunk
> > > > > seems slower than b2 for this benchmark so far. Perhaps it's because
> > I'm
> > > > > building trunk with Java 6? I wouldn't think that would make so much
> > > > > difference when they're both run under Java 6.
> > > > > 
> > > > > - Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic