Browse Source

Merge branch 'master' of https://github.com/lhotari/FrameworkBenchmarks into 806

James Yen 11 years ago
parent
commit
aa6ae483e4

+ 1 - 1
config/benchmark_profile

@@ -1,6 +1,6 @@
 export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
 export RESIN_HOME=~/FrameworkBenchmarks/installs/resin-4.0.36
-export GRAILS_HOME=~/FrameworkBenchmarks/installs/grails-2.3.3
+export GRAILS_HOME=~/FrameworkBenchmarks/installs/grails-2.3.6
 export VERTX_HOME=~/FrameworkBenchmarks/installs/vert.x-2.1M3
 export GOROOT=~/FrameworkBenchmarks/installs/go
 export GOPATH=~/FrameworkBenchmarks/go:~/FrameworkBenchmarks/webgo:~/FrameworkBenchmarks/revel

+ 1 - 1
grails/README.md

@@ -4,7 +4,7 @@ This is the Grails portion of a [benchmarking test suite](../) comparing a varie
 
 ## Infrastructure Software Versions
 The tests were run with:
-* [Grails 2.3.3](http://grails.org/)
+* [Grails 2.3.6](http://grails.org/)
 * [Java OpenJDK 1.7.0_09](http://openjdk.java.net/)
 * [Resin 4.0.34](http://www.caucho.com/)
 * [MySQL 5.5.29](https://dev.mysql.com/)

+ 0 - 16
grails/hello/.classpath

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src/java"/>
-	<classpathentry kind="src" path="src/groovy"/>
-	<classpathentry kind="src" path="grails-app/conf"/>
-	<classpathentry kind="src" path="grails-app/controllers"/>
-	<classpathentry kind="src" path="grails-app/domain"/>
-	<classpathentry kind="src" path="grails-app/services"/>
-	<classpathentry kind="src" path="grails-app/taglib"/>
-	<classpathentry kind="src" path="grails-app/utils"/>
-	<classpathentry kind="src" path="test/integration"/>
-	<classpathentry kind="src" path="test/unit"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.grails.ide.eclipse.core.CLASSPATH_CONTAINER"/>
-	<classpathentry kind="output" path="target-eclipse/classes"/>
-</classpath>

+ 2 - 0
grails/hello/.gitignore

@@ -15,3 +15,5 @@ stacktrace.log
 /web-app/WEB-INF/classes
 /.link_to_grails_plugins/
 /target-eclipse/
+.project
+.classpath

+ 0 - 25
grails/hello/.project

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>hello</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.grails.ide.eclipse.core.nature</nature>
-		<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>

+ 2 - 2
grails/hello/application.properties

@@ -1,6 +1,6 @@
 #Grails Metadata file
-#Sun Oct 20 22:08:59 EEST 2013
-app.grails.version=2.3.3
+#Tue Feb 25 10:29:09 EET 2014
+app.grails.version=2.3.6
 app.name=hello
 app.servlet.version=2.5
 app.version=0.1

+ 3 - 3
grails/hello/grails-app/conf/BuildConfig.groovy

@@ -59,11 +59,11 @@ grails.project.dependency.resolution = {
     dependencies {
         // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
 
-        runtime 'mysql:mysql-connector-java:5.1.27'
+        runtime 'mysql:mysql-connector-java:5.1.29'
     }
 
     plugins {
-        runtime ":hibernate:3.6.10.4"
+        runtime ":hibernate:3.6.10.8"
         //runtime ":jquery:1.10.2"
         //runtime ":resources:1.2.1"
 
@@ -72,6 +72,6 @@ grails.project.dependency.resolution = {
         //runtime ":cached-resources:1.0"
         //runtime ":yui-minify-resources:0.1.4"
 
-        build ":tomcat:7.0.47"
+        build ":tomcat:7.0.50.1"
     }
 }

+ 0 - 19
grails/hello/grails-app/conf/JsonWorkaroundBootStrap.groovy

@@ -1,19 +0,0 @@
-import org.codehaus.groovy.grails.web.json.JSONObject
-import org.springframework.util.ClassUtils
-import org.springframework.util.ReflectionUtils
-
-class JsonWorkaroundBootStrap {
-    def init = { servletContext ->
-        // activate workaround for GRAILS-10823
-        println("activating workaround for GRAILS-10823 - use this only for Grails 2.3.3")
-        def encoderInstance = ClassUtils.forName("org.codehaus.groovy.grails.plugins.codecs.JSONEncoder", JSONObject.class.getClassLoader()).newInstance()
-        ['javascriptEncoderStateless', 'javascriptEncoder'].each { fieldName ->
-            ReflectionUtils.findField(JSONObject, fieldName).with {
-                accessible = true
-                set(null, encoderInstance)
-            }
-        }
-    }
-    def destroy = {
-    }
-}

+ 9 - 15
grails/hello/grails-app/controllers/hello/HelloController.groovy

@@ -47,33 +47,27 @@ class HelloController {
         if(queries > 500) queries=500
         def random = ThreadLocalRandom.current()
 
-        List<Integer> worldIds = new ArrayList<Integer>(queries)
+        int[] worldIds = new int[queries]
         for (int i = 0; i < queries; i++) {
-            worldIds.add(random.nextInt(10000) + 1)
+            worldIds[i] = (random.nextInt(10000) + 1)
         }
-        List<World> worlds
+
+        List<World> worlds = new ArrayList<World>(queries)
         if (updateAlso) {
-            worlds = getAllLocked(worldIds as Serializable[])
-            for (World world : worlds) {
+            Arrays.sort(worldIds)
+            for (int id : worldIds) {
+                World world = World.lock(id)
                 world.randomNumber = random.nextInt(10000) + 1
+                worlds.add(world)
             }
         } else {
-            worlds = new ArrayList<World>(queries)
-            for (Integer id : worldIds) {
+            for (int id : worldIds) {
                 worlds.add(World.read(id))
             }
         }
         return worlds
     }
     
-    @CompileStatic(TypeCheckingMode.SKIP)
-    private List<World> getAllLocked(Serializable[] worldIds) {
-        World.withCriteria {
-            'in'('id', worldIds as Serializable[])
-            lock true
-        }
-    }
-    
     // Test type 4: Fortunes
     @Transactional(readOnly=true)
     def fortunes() {

+ 2 - 2
toolset/setup/linux/installer.py

@@ -295,8 +295,8 @@ class Installer:
     #
     # Grails
     #
-    self.__download("http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.3.3.zip")
-    self.__run_command("unzip -o grails-2.3.3.zip")
+    self.__download("http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.3.6.zip")
+    self.__run_command("unzip -o grails-2.3.6.zip")
 
     #
     # Play 2