Browse Source

Merge branch 'round-14' into upgrade-other-nodejs-frameworks

Keith Newman 9 years ago
parent
commit
ccaf7ea51a
49 changed files with 361 additions and 779 deletions
  1. 0 1
      .travis.yml
  2. 4 1
      README.md
  3. 1 1
      frameworks/Go/fasthttp/benchmark_config.json
  4. 0 1
      frameworks/Java/play1siena/.gitignore
  5. 0 2
      frameworks/Java/play1siena/README.md
  6. 0 89
      frameworks/Java/play1siena/app/controllers/Application.java
  7. 0 27
      frameworks/Java/play1siena/app/models/World.java
  8. 0 8
      frameworks/Java/play1siena/app/views/Application/index.html
  9. 0 19
      frameworks/Java/play1siena/app/views/errors/404.html
  10. 0 21
      frameworks/Java/play1siena/app/views/errors/500.html
  11. 0 16
      frameworks/Java/play1siena/app/views/main.html
  12. 0 25
      frameworks/Java/play1siena/benchmark_config.json
  13. 0 229
      frameworks/Java/play1siena/conf/application.conf
  14. 0 5
      frameworks/Java/play1siena/conf/dependencies.yml
  15. 0 3
      frameworks/Java/play1siena/conf/messages
  16. 0 12
      frameworks/Java/play1siena/conf/routes
  17. 0 1
      frameworks/Java/play1siena/modules/siena-2.0.6
  18. 0 3
      frameworks/Java/play1siena/notes.txt
  19. BIN
      frameworks/Java/play1siena/public/images/favicon.png
  20. 0 1
      frameworks/Java/play1siena/public/javascripts/jquery-1.6.4.min.js
  21. 0 0
      frameworks/Java/play1siena/public/stylesheets/main.css
  22. 0 9
      frameworks/Java/play1siena/setup.sh
  23. 0 24
      frameworks/Java/play1siena/source_code
  24. 0 7
      frameworks/Java/play1siena/test/Application.test.html
  25. 0 17
      frameworks/Java/play1siena/test/ApplicationTest.java
  26. 0 13
      frameworks/Java/play1siena/test/BasicTest.java
  27. 0 7
      frameworks/Java/play1siena/test/data.yml
  28. 2 4
      frameworks/PHP/codeigniter/application/config/config.php
  29. 2 2
      frameworks/PHP/codeigniter/application/config/database.php
  30. 158 98
      frameworks/PHP/codeigniter/application/config/mimes.php
  31. 2 1
      frameworks/PHP/codeigniter/application/controllers/Bench.php
  32. 0 0
      frameworks/PHP/codeigniter/application/controllers/Welcome.php
  33. 0 0
      frameworks/PHP/codeigniter/application/views/errors/error_404.php
  34. 0 0
      frameworks/PHP/codeigniter/application/views/errors/error_db.php
  35. 0 0
      frameworks/PHP/codeigniter/application/views/errors/error_general.php
  36. 0 0
      frameworks/PHP/codeigniter/application/views/errors/error_php.php
  37. 0 0
      frameworks/PHP/codeigniter/application/views/errors/index.html
  38. 1 2
      frameworks/PHP/codeigniter/composer.json
  39. 21 15
      frameworks/PHP/codeigniter/composer.lock
  40. 134 85
      frameworks/PHP/codeigniter/index.php
  41. 1 1
      frameworks/PHP/codeigniter/setup.sh
  42. 1 1
      frameworks/PHP/codeigniter/setup_hhvm.sh
  43. 0 7
      frameworks/Perl/dancer/cpanfile
  44. 9 2
      frameworks/Perl/dancer/setup.sh
  45. 8 8
      frameworks/Perl/kelp/setup.sh
  46. 0 6
      frameworks/Perl/plack/cpanfile
  47. 8 2
      frameworks/Perl/plack/setup.sh
  48. 8 2
      frameworks/Perl/web-simple/setup.sh
  49. 1 1
      toolset/benchmark/test_types/verifications.py

+ 0 - 1
.travis.yml

@@ -89,7 +89,6 @@ env:
     - "TESTDIR=Java/officefloor"
     - "TESTDIR=Java/permeagility"
     - "TESTDIR=Java/play1"
-    - "TESTDIR=Java/play1siena"
     - "TESTDIR=Java/play2-java"
     - "TESTDIR=Java/rapidoid"
     - "TESTDIR=Java/restexpress"

+ 4 - 1
README.md

@@ -43,9 +43,12 @@ required.
 
         $ vagrant ssh
 
-5. Run a test.
+5. Move into the FrameworkBenchmarks directory in the vm.
 
         vagrant@TFB-all:~$ cd ~/FrameworkBenchmarks
+        
+6. Run a test.
+
         vagrant@TFB-all:~/FrameworkBenchmarks$ toolset/run-tests.py --install server --mode verify --test beego
 
 _Note: `--install server` only needs to be added the first time that a tests is run. 

+ 1 - 1
frameworks/Go/fasthttp/benchmark_config.json

@@ -1,7 +1,7 @@
 {
   "framework": "fasthttp",
   "tests": [{
-    "mysql": {
+    "default": {
       "setup_file": "setup-mysql",
       "json_url": "/json",
       "db_url": "/db",

+ 0 - 1
frameworks/Java/play1siena/.gitignore

@@ -1 +0,0 @@
-precompiled/*

+ 0 - 2
frameworks/Java/play1siena/README.md

@@ -1,2 +0,0 @@
-FrameworkBenchmarks-play1.2.5
-=============================

+ 0 - 89
frameworks/Java/play1siena/app/controllers/Application.java

@@ -1,89 +0,0 @@
-package controllers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ThreadLocalRandom;
-
-import models.World;
-import play.jobs.Job;
-import play.mvc.Controller;
-
-public class Application extends Controller {
-
-	private static final int TEST_DATABASE_ROWS = 10000;
-
-	public static void index() {
-		render();
-	}
-
-	public static void json() {
-		Map<String, String> result = new HashMap<String, String>();
-		result.put("message", "Hello, World!");
-		renderJSON(result);
-	}
-
-	public static void setup() {
-		
-		//JPAPlugin plugin = play.Play.plugin(JPAPlugin.class);
-		//plugin.startTx(true);
-		World w = new World() ; 
-		w.getPersistenceManager().beginTransaction();
-
-		// clean out the old
-		World.deleteAll();
-		System.out.println("DELETED");
-		// in with the new
-		List<World> worlds = new ArrayList<World>() ;
-		for (long i = 0; i <= TEST_DATABASE_ROWS; i++) {
-			int randomNumber = ThreadLocalRandom.current().nextInt(TEST_DATABASE_ROWS) + 1;
-			worlds.add(new World(i, randomNumber));
-			if (i % 100 == 0) {
-				
-
-				World.batch().insert(worlds) ;
-				System.out.println("FLUSHED : " + i + "/" + TEST_DATABASE_ROWS);
-				worlds.clear() ;
-			}
-		}
-		System.out.println("ADDED");
-		//plugin.closeTx(false);
-		w.getPersistenceManager().commitTransaction();
-
-	}
-
-	public static void db(int queries) throws InterruptedException,
-			ExecutionException {
-		if (queries == 0)
-			queries = 1;
-		final int queryCount = queries;
-		final List<World> worlds = new ArrayList<World>();
-		Job<List<World>> job = new Job<List<World>>() {
-			public java.util.List<World> doJobWithResult() throws Exception {
-				for (int i = 0; i < queryCount; ++i) {
-					Long id = Long
-							.valueOf(ThreadLocalRandom.current().nextInt(TEST_DATABASE_ROWS) + 1);
-					World result = World.findById(id);
-					worlds.add(result);
-				}
-				return worlds;
-			};
-		};
-		List<World> result = job.now().get();
-		renderJSON(result);
-	}
-
-	public static void dbSync(int queries) {
-		if (queries == 0)
-			queries = 1;
-		final List<World> worlds = new ArrayList<World>();
-		for (int i = 0; i < queries; ++i) {
-			Long id = Long.valueOf(ThreadLocalRandom.current().nextInt(TEST_DATABASE_ROWS) + 1);
-			World result = World.findById(id);
-			worlds.add(result);
-		}
-		renderJSON(worlds);
-	}
-}

+ 0 - 27
frameworks/Java/play1siena/app/models/World.java

@@ -1,27 +0,0 @@
-package models;
-
-import play.modules.siena.EnhancedModel;
-import siena.Column;
-import siena.Generator;
-import siena.Id;
-
-import play.modules.siena.EnhancedModel;
-import siena.Generator;
-
-public class World extends EnhancedModel  {
-
-	public World(long i, long number) {
-		id = i;
-		randomNumber = new Long(number);
-	}
-	
-	public World() {
-	}
-
-	@Id(Generator.NONE)
-	public Long id ;
-	
-	@Column("randomNumber")
-	public Long randomNumber;
-
-}

+ 0 - 8
frameworks/Java/play1siena/app/views/Application/index.html

@@ -1,8 +0,0 @@
-
-<ul>
-<li><a href="@{Application.db(queries:100)}">DB</a></li>
-<li><a href="@{Application.dbSync(queries:100)}">DB sync</a></li>
-<li><a href="@{Application.json}">JSON test</a></li>
-<li><a href="@{Application.setup}">populate db</a></li>
-</ul>
-

+ 0 - 19
frameworks/Java/play1siena/app/views/errors/404.html

@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-    <head>
-        <title>Not found</title>
-        <meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/>    
-    </head>
-    <body>
-        #{if play.mode.name() == 'DEV'}
-            #{404 result /}
-        #{/if}
-        #{else}
-            <h1>Not found</h1>
-            <p>
-                ${result.message}
-            </p>
-        #{/else}
-    </body>
-</html>

+ 0 - 21
frameworks/Java/play1siena/app/views/errors/500.html

@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-    <head>
-        <title>Application error</title>
-        <meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/>	
-    </head>
-    <body>
-        #{if play.mode.name() == 'DEV'}
-            #{500 exception /}
-        #{/if}
-        #{else}
-            <h1>Oops, an error occured</h1>
-            #{if exception instanceof play.exceptions.PlayException}
-                <p>
-                    This exception has been logged with id <strong>${exception.id}</strong>.
-                </p>
-            #{/if}
-        #{/else}
-    </body>
-</html>

+ 0 - 16
frameworks/Java/play1siena/app/views/main.html

@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-    <head>
-        <title>#{get 'title' /}</title>
-        <meta charset="${_response_encoding}">
-        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">
-        #{get 'moreStyles' /}
-        <link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
-        <script src="@{'/public/javascripts/jquery-1.6.4.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
-        #{get 'moreScripts' /}
-    </head>
-    <body>
-        #{doLayout /}
-    </body>
-</html>

+ 0 - 25
frameworks/Java/play1siena/benchmark_config.json

@@ -1,25 +0,0 @@
-{
-  "framework": "play1siena",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "json_url": "/play1/json",
-      "db_url": "/play1/db",
-      "query_url": "/play1/db?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "play1",
-      "language": "Java",
-      "orm": "Full",
-      "platform": "Netty",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "play1-siena",
-      "notes": "Siena alternate",
-      "versus": "netty"
-    }
-  }]
-}

+ 0 - 229
frameworks/Java/play1siena/conf/application.conf

@@ -1,229 +0,0 @@
-# This is the main configuration file for the application.
-# ~~~~~
-application.name=play-1.2.5
-
-# Application mode
-# ~~~~~
-# Set to dev to enable instant reloading and other development help.
-# Otherwise set to prod.
-application.mode=dev
-%prod.application.mode=prod
-
-# Secret key
-# ~~~~~
-# The secret key is used to secure cryptographics functions
-# If you deploy your application to several instances be sure to use the same key !
-application.secret=p7Abj8rpexZmmC8iPsY2PlXSo1xtHFhLKHRCHpE1ZqEgRU5TIHPcEbaryoj16vi8
-
-# i18n
-# ~~~~~
-# Define locales used by your application.
-# You can then place localized messages in conf/messages.{locale} files
-# application.langs=fr,en,ja
-
-# Date format
-# ~~~~~
-date.format=yyyy-MM-dd
-# date.format.fr=dd/MM/yyyy
-
-# Server configuration
-# ~~~~~
-# If you need to change the HTTP port, uncomment this (default is set to 9000)
-# http.port=9000
-#
-# By default the server listen for HTTP on the wilcard address.
-# You can restrict this.
-# http.address=127.0.0.1
-#
-# Use this if you don't host your Play application at the root of the domain
-# you're serving it from. This parameter has no effect when deployed as a
-# war, because the path will be handled by the application server.
-# http.path=/
-
-# Session configuration
-# ~~~~~~~~~~~~~~~~~~~~~~
-# By default, session will be written to the transient PLAY_SESSION cookie.
-# The cookies are not secured by default, only set it to true
-# if you're serving your pages through https.
-# application.session.cookie=PLAY
-# application.session.maxAge=1h
-# application.session.secure=false
-
-# Session/Cookie sharing between subdomain
-# ~~~~~~~~~~~~~~~~~~~~~~
-# By default a cookie is only valid for a specific domain. By setting
-# application.defaultCookieDomain to '.example.com', the cookies
-# will be valid for all domains ending with '.example.com', ie:
-# foo.example.com and bar.example.com
-# application.defaultCookieDomain=.example.com
-
-# JVM configuration
-# ~~~~~
-# Define which port is used by JPDA when application is in debug mode (default is set to 8000)
-# jpda.port=8000
-#
-# Java source level => 1.5, 1.6 or 1.7 (experimental)
-# java.source=1.5
-
-# Log level
-# ~~~~~
-# Specify log level for your application.
-# If you want a very customized log, create a log4j.properties file in the conf directory
-# application.log=INFO
-#
-# More logging configuration
-# application.log.path=/log4j.properties
-# application.log.system.out=off
-
-# Database configuration
-# ~~~~~ 
-# Enable a database engine if needed.
-#
-# To quickly set up a development database, use either:
-#   - mem : for a transient in memory database (H2 in memory)
-#   - fs  : for a simple file written database (H2 file stored)
-# db=mem
-#
-# To connect to a local MySQL5 database, use:
-# db=mysql://user:pwd@host/database
-#
-# To connect to a local PostgreSQL9 database, use:
-# db=postgres://user:pwd@host/database
-#
-# If you need a full JDBC configuration use the following :
-# db.url=jdbc:postgresql:database_name
-# db.driver=org.postgresql.Driver
-# db.user=root
-# db.pass=secret
-#
-# Connections pool configuration :
-db.pool.timeout=1000
-db.pool.maxSize=30
-db.pool.minSize=10
-#
-# If you want to reuse an existing Datasource from your application server, use:
-# db=java:/comp/env/jdbc/myDatasource
-#
-# When using an existing Datasource, it's sometimes needed to destroy it when
-# the application is stopped. Depending on the datasource, you can define a
-# generic "destroy" method :
-# db.destroyMethod=close
-db.driver= com.mysql.jdbc.Driver
-db.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
-db.user=benchmarkdbuser
-db.pass=benchmarkdbpass
-db.jndiName=DefaultDS
-
-db.default.driver= com.mysql.jdbc.Driver
-db.default.url=jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
-db.default.user=benchmarkdbuser
-db.default.pass=benchmarkdbpass
-db.default.jndiName=DefaultDS
-
-
-# JPA Configuration (Hibernate)
-# ~~~~~
-#
-# Specify the custom JPA dialect to use here (default to guess):
-# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
-#
-# Specify the ddl generation pattern to use. Set to none to disable it 
-# (default to update in DEV mode, and none in PROD mode):
-# jpa.ddl=update
-#
-# Debug SQL statements (logged using DEBUG level):
-# jpa.debugSQL=true
-#
-# You can even specify additional hibernate properties here:
-# hibernate.use_sql_comments=true
-# ...
-#
-# Store path for Blob content
-attachments.path=data/attachments
-
-# Memcached configuration
-# ~~~~~ 
-# Enable memcached if needed. Otherwise a local cache is used.
-# memcached=enabled
-#
-# Specify memcached host (default to 127.0.0.1:11211)
-# memcached.host=127.0.0.1:11211
-#
-# Or you can specify multiple host to build a distributed cache
-# memcached.1.host=127.0.0.1:11211
-# memcached.2.host=127.0.0.1:11212
-#
-# Use plain SASL to authenticate for memcached
-# memcached.user=
-# memcached.password=
-
-# HTTP Response headers control for static files
-# ~~~~~
-# Set the default max-age, telling the user's browser how long it should cache the page.
-# Default is 3600 (one hour). Set it to 0 to send no-cache.
-# This is only read in prod mode, in dev mode the cache is disabled.
-# http.cacheControl=3600
-
-# If enabled, Play will generate entity tags automatically and send a 304 when needed.
-# Default is true, set it to false to deactivate use of entity tags.
-# http.useETag=true
-
-# Custom mime types
-# mimetype.xpi=application/x-xpinstall
-
-# WS configuration
-# ~~~~~
-# Default engine is Async Http Client, uncomment to use
-# the JDK's internal implementation
-# webservice = urlfetch
-# If you need to set proxy params for WS requests
-# http.proxyHost = localhost
-# http.proxyPort = 3128
-# http.proxyUser = jojo
-# http.proxyPassword = jojo
-
-# Mail configuration
-# ~~~~~ 
-# Default is to use a mock Mailer
-mail.smtp=mock
-
-# Or, specify mail host configuration
-# mail.smtp.host=127.0.0.1
-# mail.smtp.user=admin
-# mail.smtp.pass=
-# mail.smtp.channel=ssl
-
-# Url-resolving in Jobs
-# ~~~~~~
-# When rendering templates with reverse-url-resoling (@@{..}) in Jobs (which do not have an inbound Http.Request),
-# ie if sending a HtmlMail, Play need to know which url your users use when accessing your app.
-# %test.application.baseUrl=http://localhost:9000/
-# %prod.application.baseUrl=http://www.yourdomain.com/
-
-# Jobs executor
-# ~~~~~~
-# Size of the Jobs pool
-# play.jobs.pool=10
-
-# Execution pool
-# ~~~~~
-# Default to 1 thread in DEV mode or (nb processors + 1) threads in PROD mode.
-# Try to keep a low as possible. 1 thread will serialize all requests (very useful for debugging purpose)
-# play.pool=3
-
-# Open file from errors pages
-# ~~~~~
-# If your text editor supports opening files by URL, Play! will
-# dynamically link error pages to files 
-#
-# Example, for textmate:
-# play.editor=txmt://open?url=file://%s&line=%s
-
-# Testing. Set up a custom configuration for test mode
-# ~~~~~
-#%test.module.cobertura=${play.path}/modules/cobertura
-%test.application.mode=dev
-%test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
-%test.jpa.ddl=create
-%test.mail.smtp=mock
-

+ 0 - 5
frameworks/Java/play1siena/conf/dependencies.yml

@@ -1,5 +0,0 @@
-# Application dependencies
-
-require:
-    - play
-    - play -> siena 2.0.6

+ 0 - 3
frameworks/Java/play1siena/conf/messages

@@ -1,3 +0,0 @@
-# You can specialize this file for each language.
-# For example, for French create a messages.fr file
-#

+ 0 - 12
frameworks/Java/play1siena/conf/routes

@@ -1,12 +0,0 @@
-# Routes
-# This file defines all application routes (Higher priority routes first)
-# ~~~~
-
-
-# Home page
-GET     /json                           Application.json
-GET     /db                             Application.db
-GET     /db_sync                        Application.dbSync
-GET     /setup                          Application.setup
-GET     /                               Application.index
-

+ 0 - 1
frameworks/Java/play1siena/modules/siena-2.0.6

@@ -1 +0,0 @@
-../../../installs/play-1.2.5/modules/siena-2.0.6

+ 0 - 3
frameworks/Java/play1siena/notes.txt

@@ -1,3 +0,0 @@
-json.tosjon jackson ?
-
-jackson version ?

BIN
frameworks/Java/play1siena/public/images/favicon.png


File diff suppressed because it is too large
+ 0 - 1
frameworks/Java/play1siena/public/javascripts/jquery-1.6.4.min.js


+ 0 - 0
frameworks/Java/play1siena/public/stylesheets/main.css


+ 0 - 9
frameworks/Java/play1siena/setup.sh

@@ -1,9 +0,0 @@
-#!/bin/bash
-
-sed -i 's|jdbc:mysql://.*:3306|jdbc:mysql://'"${DBHOST}"':3306|g' conf/application.conf
-
-fw_depends java play1 siena resin
-
-rm -rf $RESIN_HOME/webapps/*
-play war -o $RESIN_HOME/webapps/play1 --exclude benchmark_config.json
-resinctl start

+ 0 - 24
frameworks/Java/play1siena/source_code

@@ -1,24 +0,0 @@
-./play1siena/app/
-./play1siena/app/controllers
-./play1siena/app/controllers/Application.java
-./play1siena/app/views
-./play1siena/app/views/errors
-./play1siena/app/views/errors/500.html
-./play1siena/app/views/errors/404.html
-./play1siena/app/views/Application
-./play1siena/app/views/Application/index.html
-./play1siena/app/views/main.html
-./play1siena/app/models
-./play1siena/app/models/World.java
-./play1siena/public/
-./play1siena/public/javascripts
-./play1siena/public/javascripts/jquery-1.6.4.min.js
-./play1siena/public/images
-./play1siena/public/images/favicon.png
-./play1siena/public/stylesheets
-./play1siena/public/stylesheets/main.css
-./play1siena/test/
-./play1siena/test/Application.test.html
-./play1siena/test/BasicTest.java
-./play1siena/test/data.yml
-./play1siena/test/ApplicationTest.java

+ 0 - 7
frameworks/Java/play1siena/test/Application.test.html

@@ -1,7 +0,0 @@
-*{ You can use plain selenium command using the selenium tag }*
-
-#{selenium}
-    // Open the home page, and check that no error occured
-    open('/')
-    assertNotTitle('Application error')
-#{/selenium}

+ 0 - 17
frameworks/Java/play1siena/test/ApplicationTest.java

@@ -1,17 +0,0 @@
-import org.junit.*;
-import play.test.*;
-import play.mvc.*;
-import play.mvc.Http.*;
-import models.*;
-
-public class ApplicationTest extends FunctionalTest {
-
-    @Test
-    public void testThatIndexPageWorks() {
-        Response response = GET("/");
-        assertIsOk(response);
-        assertContentType("text/html", response);
-        assertCharset(play.Play.defaultWebEncoding, response);
-    }
-    
-}

+ 0 - 13
frameworks/Java/play1siena/test/BasicTest.java

@@ -1,13 +0,0 @@
-import org.junit.*;
-import java.util.*;
-import play.test.*;
-import models.*;
-
-public class BasicTest extends UnitTest {
-
-    @Test
-    public void aVeryImportantThingToTest() {
-        assertEquals(2, 1 + 1);
-    }
-
-}

+ 0 - 7
frameworks/Java/play1siena/test/data.yml

@@ -1,7 +0,0 @@
-# you describe your data using the YAML notation here
-# and then load them using Fixtures.load("data.yml")
-
-# User(bob):
-#   email: [email protected]
-#   password: secret
-#   fullname: Bob

+ 2 - 4
frameworks/PHP/codeigniter/application/config/config.php

@@ -246,13 +246,11 @@ $config['encryption_key'] = '';
 */
 $config['sess_cookie_name']		= 'ci_session';
 $config['sess_expiration']		= 7200;
-$config['sess_expire_on_close']	= FALSE;
-$config['sess_encrypt_cookie']	= FALSE;
 $config['sess_use_database']	= FALSE;
 $config['sess_table_name']		= 'ci_sessions';
 $config['sess_match_ip']		= FALSE;
-$config['sess_match_useragent']	= TRUE;
 $config['sess_time_to_update']	= 300;
+$config['sess_driver'] = 'files';
 
 /*
 |--------------------------------------------------------------------------
@@ -279,7 +277,7 @@ $config['cookie_secure']	= FALSE;
 | COOKIE data is encountered
 |
 */
-$config['global_xss_filtering'] = FALSE;
+$config['global_xss_filtering'] = NULL;
 
 /*
 |--------------------------------------------------------------------------

+ 2 - 2
frameworks/PHP/codeigniter/application/config/database.php

@@ -46,13 +46,13 @@
 */
 
 $active_group = 'default';
-$active_record = TRUE;
+$query_builder = TRUE;
 
 $db['default']['hostname'] = 'localhost';
 $db['default']['username'] = 'benchmarkdbuser';
 $db['default']['password'] = 'benchmarkdbpass';
 $db['default']['database'] = 'hello_world';
-$db['default']['dbdriver'] = 'mysql';
+$db['default']['dbdriver'] = 'mysqli';
 $db['default']['dbprefix'] = '';
 $db['default']['pconnect'] = TRUE;
 $db['default']['db_debug'] = TRUE;

+ 158 - 98
frameworks/PHP/codeigniter/application/config/mimes.php

@@ -1,4 +1,5 @@
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
+defined('BASEPATH') OR exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | MIME TYPES
@@ -7,100 +8,159 @@
 | Upload class to help identify allowed file types.
 |
 */
-
-$mimes = array(	'hqx'	=>	'application/mac-binhex40',
-				'cpt'	=>	'application/mac-compactpro',
-				'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
-				'bin'	=>	'application/macbinary',
-				'dms'	=>	'application/octet-stream',
-				'lha'	=>	'application/octet-stream',
-				'lzh'	=>	'application/octet-stream',
-				'exe'	=>	array('application/octet-stream', 'application/x-msdownload'),
-				'class'	=>	'application/octet-stream',
-				'psd'	=>	'application/x-photoshop',
-				'so'	=>	'application/octet-stream',
-				'sea'	=>	'application/octet-stream',
-				'dll'	=>	'application/octet-stream',
-				'oda'	=>	'application/oda',
-				'pdf'	=>	array('application/pdf', 'application/x-download'),
-				'ai'	=>	'application/postscript',
-				'eps'	=>	'application/postscript',
-				'ps'	=>	'application/postscript',
-				'smi'	=>	'application/smil',
-				'smil'	=>	'application/smil',
-				'mif'	=>	'application/vnd.mif',
-				'xls'	=>	array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
-				'ppt'	=>	array('application/powerpoint', 'application/vnd.ms-powerpoint'),
-				'wbxml'	=>	'application/wbxml',
-				'wmlc'	=>	'application/wmlc',
-				'dcr'	=>	'application/x-director',
-				'dir'	=>	'application/x-director',
-				'dxr'	=>	'application/x-director',
-				'dvi'	=>	'application/x-dvi',
-				'gtar'	=>	'application/x-gtar',
-				'gz'	=>	'application/x-gzip',
-				'php'	=>	'application/x-httpd-php',
-				'php4'	=>	'application/x-httpd-php',
-				'php3'	=>	'application/x-httpd-php',
-				'phtml'	=>	'application/x-httpd-php',
-				'phps'	=>	'application/x-httpd-php-source',
-				'js'	=>	'application/x-javascript',
-				'swf'	=>	'application/x-shockwave-flash',
-				'sit'	=>	'application/x-stuffit',
-				'tar'	=>	'application/x-tar',
-				'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
-				'xhtml'	=>	'application/xhtml+xml',
-				'xht'	=>	'application/xhtml+xml',
-				'zip'	=>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
-				'mid'	=>	'audio/midi',
-				'midi'	=>	'audio/midi',
-				'mpga'	=>	'audio/mpeg',
-				'mp2'	=>	'audio/mpeg',
-				'mp3'	=>	array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
-				'aif'	=>	'audio/x-aiff',
-				'aiff'	=>	'audio/x-aiff',
-				'aifc'	=>	'audio/x-aiff',
-				'ram'	=>	'audio/x-pn-realaudio',
-				'rm'	=>	'audio/x-pn-realaudio',
-				'rpm'	=>	'audio/x-pn-realaudio-plugin',
-				'ra'	=>	'audio/x-realaudio',
-				'rv'	=>	'video/vnd.rn-realvideo',
-				'wav'	=>	array('audio/x-wav', 'audio/wave', 'audio/wav'),
-				'bmp'	=>	array('image/bmp', 'image/x-windows-bmp'),
-				'gif'	=>	'image/gif',
-				'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
-				'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
-				'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
-				'png'	=>	array('image/png',  'image/x-png'),
-				'tiff'	=>	'image/tiff',
-				'tif'	=>	'image/tiff',
-				'css'	=>	'text/css',
-				'html'	=>	'text/html',
-				'htm'	=>	'text/html',
-				'shtml'	=>	'text/html',
-				'txt'	=>	'text/plain',
-				'text'	=>	'text/plain',
-				'log'	=>	array('text/plain', 'text/x-log'),
-				'rtx'	=>	'text/richtext',
-				'rtf'	=>	'text/rtf',
-				'xml'	=>	'text/xml',
-				'xsl'	=>	'text/xml',
-				'mpeg'	=>	'video/mpeg',
-				'mpg'	=>	'video/mpeg',
-				'mpe'	=>	'video/mpeg',
-				'qt'	=>	'video/quicktime',
-				'mov'	=>	'video/quicktime',
-				'avi'	=>	'video/x-msvideo',
-				'movie'	=>	'video/x-sgi-movie',
-				'doc'	=>	'application/msword',
-				'docx'	=>	array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
-				'xlsx'	=>	array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
-				'word'	=>	array('application/msword', 'application/octet-stream'),
-				'xl'	=>	'application/excel',
-				'eml'	=>	'message/rfc822',
-				'json' => array('application/json', 'text/json')
-			);
-
-
-/* End of file mimes.php */
-/* Location: ./application/config/mimes.php */
+return array(
+	'hqx'	=>	array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
+	'cpt'	=>	'application/mac-compactpro',
+	'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
+	'bin'	=>	array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
+	'dms'	=>	'application/octet-stream',
+	'lha'	=>	'application/octet-stream',
+	'lzh'	=>	'application/octet-stream',
+	'exe'	=>	array('application/octet-stream', 'application/x-msdownload'),
+	'class'	=>	'application/octet-stream',
+	'psd'	=>	array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
+	'so'	=>	'application/octet-stream',
+	'sea'	=>	'application/octet-stream',
+	'dll'	=>	'application/octet-stream',
+	'oda'	=>	'application/oda',
+	'pdf'	=>	array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
+	'ai'	=>	array('application/pdf', 'application/postscript'),
+	'eps'	=>	'application/postscript',
+	'ps'	=>	'application/postscript',
+	'smi'	=>	'application/smil',
+	'smil'	=>	'application/smil',
+	'mif'	=>	'application/vnd.mif',
+	'xls'	=>	array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
+	'ppt'	=>	array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
+	'pptx'	=> 	array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
+	'wbxml'	=>	'application/wbxml',
+	'wmlc'	=>	'application/wmlc',
+	'dcr'	=>	'application/x-director',
+	'dir'	=>	'application/x-director',
+	'dxr'	=>	'application/x-director',
+	'dvi'	=>	'application/x-dvi',
+	'gtar'	=>	'application/x-gtar',
+	'gz'	=>	'application/x-gzip',
+	'gzip'  =>	'application/x-gzip',
+	'php'	=>	array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
+	'php4'	=>	'application/x-httpd-php',
+	'php3'	=>	'application/x-httpd-php',
+	'phtml'	=>	'application/x-httpd-php',
+	'phps'	=>	'application/x-httpd-php-source',
+	'js'	=>	array('application/x-javascript', 'text/plain'),
+	'swf'	=>	'application/x-shockwave-flash',
+	'sit'	=>	'application/x-stuffit',
+	'tar'	=>	'application/x-tar',
+	'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
+	'z'	=>	'application/x-compress',
+	'xhtml'	=>	'application/xhtml+xml',
+	'xht'	=>	'application/xhtml+xml',
+	'zip'	=>	array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
+	'rar'	=>	array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
+	'mid'	=>	'audio/midi',
+	'midi'	=>	'audio/midi',
+	'mpga'	=>	'audio/mpeg',
+	'mp2'	=>	'audio/mpeg',
+	'mp3'	=>	array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
+	'aif'	=>	array('audio/x-aiff', 'audio/aiff'),
+	'aiff'	=>	array('audio/x-aiff', 'audio/aiff'),
+	'aifc'	=>	'audio/x-aiff',
+	'ram'	=>	'audio/x-pn-realaudio',
+	'rm'	=>	'audio/x-pn-realaudio',
+	'rpm'	=>	'audio/x-pn-realaudio-plugin',
+	'ra'	=>	'audio/x-realaudio',
+	'rv'	=>	'video/vnd.rn-realvideo',
+	'wav'	=>	array('audio/x-wav', 'audio/wave', 'audio/wav'),
+	'bmp'	=>	array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
+	'gif'	=>	'image/gif',
+	'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
+	'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
+	'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
+	'jp2'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'j2k'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'jpf'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'jpg2'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'jpx'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'jpm'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'mj2'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'mjp2'	=>	array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
+	'png'	=>	array('image/png',  'image/x-png'),
+	'tiff'	=>	'image/tiff',
+	'tif'	=>	'image/tiff',
+	'css'	=>	array('text/css', 'text/plain'),
+	'html'	=>	array('text/html', 'text/plain'),
+	'htm'	=>	array('text/html', 'text/plain'),
+	'shtml'	=>	array('text/html', 'text/plain'),
+	'txt'	=>	'text/plain',
+	'text'	=>	'text/plain',
+	'log'	=>	array('text/plain', 'text/x-log'),
+	'rtx'	=>	'text/richtext',
+	'rtf'	=>	'text/rtf',
+	'xml'	=>	array('application/xml', 'text/xml', 'text/plain'),
+	'xsl'	=>	array('application/xml', 'text/xsl', 'text/xml'),
+	'mpeg'	=>	'video/mpeg',
+	'mpg'	=>	'video/mpeg',
+	'mpe'	=>	'video/mpeg',
+	'qt'	=>	'video/quicktime',
+	'mov'	=>	'video/quicktime',
+	'avi'	=>	array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
+	'movie'	=>	'video/x-sgi-movie',
+	'doc'	=>	array('application/msword', 'application/vnd.ms-office'),
+	'docx'	=>	array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
+	'dot'	=>	array('application/msword', 'application/vnd.ms-office'),
+	'dotx'	=>	array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
+	'xlsx'	=>	array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
+	'word'	=>	array('application/msword', 'application/octet-stream'),
+	'xl'	=>	'application/excel',
+	'eml'	=>	'message/rfc822',
+	'json'  =>	array('application/json', 'text/json'),
+	'pem'   =>	array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
+	'p10'   =>	array('application/x-pkcs10', 'application/pkcs10'),
+	'p12'   =>	'application/x-pkcs12',
+	'p7a'   =>	'application/x-pkcs7-signature',
+	'p7c'   =>	array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
+	'p7m'   =>	array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
+	'p7r'   =>	'application/x-pkcs7-certreqresp',
+	'p7s'   =>	'application/pkcs7-signature',
+	'crt'   =>	array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
+	'crl'   =>	array('application/pkix-crl', 'application/pkcs-crl'),
+	'der'   =>	'application/x-x509-ca-cert',
+	'kdb'   =>	'application/octet-stream',
+	'pgp'   =>	'application/pgp',
+	'gpg'   =>	'application/gpg-keys',
+	'sst'   =>	'application/octet-stream',
+	'csr'   =>	'application/octet-stream',
+	'rsa'   =>	'application/x-pkcs7',
+	'cer'   =>	array('application/pkix-cert', 'application/x-x509-ca-cert'),
+	'3g2'   =>	'video/3gpp2',
+	'3gp'   =>	array('video/3gp', 'video/3gpp'),
+	'mp4'   =>	'video/mp4',
+	'm4a'   =>	'audio/x-m4a',
+	'f4v'   =>	array('video/mp4', 'video/x-f4v'),
+	'flv'	=>	'video/x-flv',
+	'webm'	=>	'video/webm',
+	'aac'   =>	'audio/x-acc',
+	'm4u'   =>	'application/vnd.mpegurl',
+	'm3u'   =>	'text/plain',
+	'xspf'  =>	'application/xspf+xml',
+	'vlc'   =>	'application/videolan',
+	'wmv'   =>	array('video/x-ms-wmv', 'video/x-ms-asf'),
+	'au'    =>	'audio/x-au',
+	'ac3'   =>	'audio/ac3',
+	'flac'  =>	'audio/x-flac',
+	'ogg'   =>	array('audio/ogg', 'video/ogg', 'application/ogg'),
+	'kmz'	=>	array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
+	'kml'	=>	array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
+	'ics'	=>	'text/calendar',
+	'ical'	=>	'text/calendar',
+	'zsh'	=>	'text/x-scriptzsh',
+	'7zip'	=>	array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
+	'cdr'	=>	array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
+	'wma'	=>	array('audio/x-ms-wma', 'video/x-ms-asf'),
+	'jar'	=>	array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
+	'svg'	=>	array('image/svg+xml', 'application/xml', 'text/xml'),
+	'vcf'	=>	'text/x-vcard',
+	'srt'	=>	array('text/srt', 'text/plain'),
+	'vtt'	=>	array('text/vtt', 'text/plain'),
+	'ico'	=>	array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
+);

+ 2 - 1
frameworks/PHP/codeigniter/application/controllers/bench.php → frameworks/PHP/codeigniter/application/controllers/Bench.php

@@ -17,6 +17,7 @@ class Bench extends CI_Controller {
 
     public function db($queries = 1) {
         $worlds = array();
+        $queries = is_numeric($queries) ? min(max($queries, 1), 500) : 1;
 
         for ($i = 0; $i < $queries; ++$i) {
             $worlds[] = $this->db
@@ -57,4 +58,4 @@ class Bench extends CI_Controller {
             'fortunes' => $fortunes
         ]);
     }
-}
+}

+ 0 - 0
frameworks/PHP/codeigniter/application/controllers/welcome.php → frameworks/PHP/codeigniter/application/controllers/Welcome.php


+ 0 - 0
frameworks/PHP/codeigniter/application/errors/error_404.php → frameworks/PHP/codeigniter/application/views/errors/error_404.php


+ 0 - 0
frameworks/PHP/codeigniter/application/errors/error_db.php → frameworks/PHP/codeigniter/application/views/errors/error_db.php


+ 0 - 0
frameworks/PHP/codeigniter/application/errors/error_general.php → frameworks/PHP/codeigniter/application/views/errors/error_general.php


+ 0 - 0
frameworks/PHP/codeigniter/application/errors/error_php.php → frameworks/PHP/codeigniter/application/views/errors/error_php.php


+ 0 - 0
frameworks/PHP/codeigniter/application/errors/index.html → frameworks/PHP/codeigniter/application/views/errors/index.html


+ 1 - 2
frameworks/PHP/codeigniter/composer.json

@@ -1,6 +1,5 @@
 {
     "require": {
-        "rogeriopradoj/codeigniter": "2.2.1-rc.2"
+        "codeigniter/framework": "3.0.6"
     }
 }
-

+ 21 - 15
frameworks/PHP/codeigniter/composer.lock

@@ -1,43 +1,49 @@
 {
     "_readme": [
         "This file locks the dependencies of your project to a known state",
-        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "92e99b460af6b4b46abd380a66a89f01",
+    "hash": "cb1f735c5760f769abbc696a6b129ff4",
+    "content-hash": "5d9e345faac86f61cf4288da91bf779b",
     "packages": [
         {
-            "name": "rogeriopradoj/codeigniter",
-            "version": "2.2.1-rc.2",
+            "name": "codeigniter/framework",
+            "version": "3.0.6",
             "source": {
                 "type": "git",
-                "url": "https://github.com/rogeriopradoj/codeigniter-composer.git",
-                "reference": "c3b605d2e5dc3752da7e6843daed31bcf87e225f"
+                "url": "https://github.com/bcit-ci/CodeIgniter.git",
+                "reference": "8082544c5b4b33175790f505587e202e3ca9e488"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/rogeriopradoj/codeigniter-composer/zipball/c3b605d2e5dc3752da7e6843daed31bcf87e225f",
-                "reference": "c3b605d2e5dc3752da7e6843daed31bcf87e225f",
+                "url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/8082544c5b4b33175790f505587e202e3ca9e488",
+                "reference": "8082544c5b4b33175790f505587e202e3ca9e488",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.2.4"
             },
-            "type": "library",
+            "require-dev": {
+                "mikey179/vfsstream": "1.1.*"
+            },
+            "suggest": {
+                "paragonie/random_compat": "Provides better randomness in PHP 5.x"
+            },
+            "type": "project",
             "notification-url": "https://packagist.org/downloads/",
             "license": [
-                "OSL-3.0"
+                "MIT"
             ],
-            "description": "A way to install CodeIgniter via composer",
-            "time": "2014-11-25 11:27:54"
+            "description": "The CodeIgniter framework",
+            "homepage": "https://codeigniter.com",
+            "time": "2016-03-21 16:26:30"
         }
     ],
     "packages-dev": [],
     "aliases": [],
     "minimum-stability": "stable",
-    "stability-flags": {
-        "rogeriopradoj/codeigniter": 5
-    },
+    "stability-flags": [],
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": [],

+ 134 - 85
frameworks/PHP/codeigniter/index.php

@@ -1,5 +1,6 @@
 <?php
 
+
 /*
  *---------------------------------------------------------------
  * APPLICATION ENVIRONMENT
@@ -16,9 +17,8 @@
  *     production
  *
  * NOTE: If you change these, also change the error_reporting() code below
- *
  */
-	define('ENVIRONMENT', 'production');
+	define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
 /*
  *---------------------------------------------------------------
  * ERROR REPORTING
@@ -27,53 +27,70 @@
  * Different environments will require different levels of error reporting.
  * By default development will show errors but testing and live will hide them.
  */
-
-if (defined('ENVIRONMENT'))
+switch (ENVIRONMENT)
 {
-	switch (ENVIRONMENT)
-	{
-		case 'development':
-			error_reporting(E_ALL);
-		break;
-	
-		case 'testing':
-		case 'production':
-			error_reporting(0);
-		break;
-
-		default:
-			exit('The application environment is not set correctly.');
-	}
+	case 'development':
+		error_reporting(-1);
+		ini_set('display_errors', 1);
+	break;
+	case 'testing':
+	case 'production':
+		ini_set('display_errors', 0);
+		if (version_compare(PHP_VERSION, '5.3', '>='))
+		{
+			error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
+		}
+		else
+		{
+			error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
+		}
+	break;
+	default:
+		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
+		echo 'The application environment is not set correctly.';
+		exit(1); // EXIT_ERROR
 }
-
 /*
  *---------------------------------------------------------------
- * SYSTEM FOLDER NAME
+ * SYSTEM DIRECTORY NAME
  *---------------------------------------------------------------
  *
- * This variable must contain the name of your "system" folder.
- * Include the path if the folder is not in the same  directory
- * as this file.
- *
+ * This variable must contain the name of your "system" directory.
+ * Set the path if it is not in the same directory as this file.
  */
-	$system_path = 'vendor/rogeriopradoj/codeigniter/system';
-
+	$system_path = 'vendor/codeigniter/framework/system';
 /*
  *---------------------------------------------------------------
- * APPLICATION FOLDER NAME
+ * APPLICATION DIRECTORY NAME
  *---------------------------------------------------------------
  *
  * If you want this front controller to use a different "application"
- * folder then the default one you can set its name here. The folder
- * can also be renamed or relocated anywhere on your server.  If
- * you do, use a full server path. For more info please see the user guide:
- * http://codeigniter.com/user_guide/general/managing_apps.html
+ * directory than the default one you can set its name here. The directory
+ * can also be renamed or relocated anywhere on your server. If you do,
+ * use an absolute (full) server path.
+ * For more info please see the user guide:
  *
- * NO TRAILING SLASH!
+ * https://codeigniter.com/user_guide/general/managing_apps.html
+ *:
+ *:
  *
+ * NO TRAILING SLASH!
  */
 	$application_folder = 'application';
-
+/*
+ *---------------------------------------------------------------
+ * VIEW DIRECTORY NAME
+ *---------------------------------------------------------------
+ *
+ * If you want to move the view directory out of the application
+ * directory, set the path to it here. The directory can be renamed
+ * and relocated anywhere on your server. If blank, it will default
+ * to the standard location inside your application directory.
+ * If you do move this, use an absolute (full) server path.
+ *
+ * NO TRAILING SLASH!
+ */
+	$view_folder = '';
 /*
  * --------------------------------------------------------------------
  * DEFAULT CONTROLLER
@@ -81,30 +98,25 @@ if (defined('ENVIRONMENT'))
  *
  * Normally you will set your default controller in the routes.php file.
  * You can, however, force a custom routing by hard-coding a
- * specific controller class/function here.  For most applications, you
+ * specific controller class/function here. For most applications, you
  * WILL NOT set your routing here, but it's an option for those
  * special instances where you might want to override the standard
  * routing in a specific front controller that shares a common CI installation.
  *
- * IMPORTANT:  If you set the routing here, NO OTHER controller will be
+ * IMPORTANT: If you set the routing here, NO OTHER controller will be
  * callable. In essence, this preference limits your application to ONE
- * specific controller.  Leave the function name blank if you need
+ * specific controller. Leave the function name blank if you need
  * to call functions dynamically via the URI.
  *
  * Un-comment the $routing array below to use this feature
- *
  */
-	// The directory name, relative to the "controllers" folder.  Leave blank
-	// if your controller is not in a sub-folder within the "controllers" folder
+	// The directory name, relative to the "controllers" directory.  Leave blank
+	// if your controller is not in a sub-directory within the "controllers" one
 	// $routing['directory'] = '';
-
-	// The controller class file name.  Example:  Mycontroller
+	// The controller class file name.  Example:  mycontroller
 	// $routing['controller'] = '';
-
 	// The controller function you wish to be called.
 	// $routing['function']	= '';
-
-
 /*
  * -------------------------------------------------------------------
  *  CUSTOM CONFIG VALUES
@@ -118,42 +130,41 @@ if (defined('ENVIRONMENT'))
  * config values.
  *
  * Un-comment the $assign_to_config array below to use this feature
- *
  */
 	// $assign_to_config['name_of_config_item'] = 'value of config item';
-
-
-
 // --------------------------------------------------------------------
 // END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
 // --------------------------------------------------------------------
-
 /*
  * ---------------------------------------------------------------
  *  Resolve the system path for increased reliability
  * ---------------------------------------------------------------
  */
-
 	// Set the current directory correctly for CLI requests
 	if (defined('STDIN'))
 	{
 		chdir(dirname(__FILE__));
 	}
-
-	if (realpath($system_path) !== FALSE)
+	if (($_temp = realpath($system_path)) !== FALSE)
 	{
-		$system_path = realpath($system_path).'/';
+		$system_path = $_temp.DIRECTORY_SEPARATOR;
+	}
+	else
+	{
+		// Ensure there's a trailing slash
+		$system_path = strtr(
+			rtrim($system_path, '/\\'),
+			'/\\',
+			DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
+		).DIRECTORY_SEPARATOR;
 	}
-
-	// ensure there's a trailing slash
-	$system_path = rtrim($system_path, '/').'/';
-
 	// Is the system path correct?
 	if ( ! is_dir($system_path))
 	{
-		exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
+		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
+		echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
+		exit(3); // EXIT_CONFIG
 	}
-
 /*
  * -------------------------------------------------------------------
  *  Now that we know the path, set the main path constants
@@ -161,45 +172,83 @@ if (defined('ENVIRONMENT'))
  */
 	// The name of THIS file
 	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
-
-	// The PHP file extension
-	// this global constant is deprecated.
-	define('EXT', '.php');
-
-	// Path to the system folder
-	define('BASEPATH', str_replace("\\", "/", $system_path));
-
-	// Path to the front controller (this file)
-	define('FCPATH', str_replace(SELF, '', __FILE__));
-
-	// Name of the "system folder"
-	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
-
-
-	// The path to the "application" folder
+	// Path to the system directory
+	define('BASEPATH', $system_path);
+	// Path to the front controller (this file) directory
+	define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
+	// Name of the "system" directory
+	define('SYSDIR', basename(BASEPATH));
+	// The path to the "application" directory
 	if (is_dir($application_folder))
 	{
-		define('APPPATH', $application_folder.'/');
+		if (($_temp = realpath($application_folder)) !== FALSE)
+		{
+			$application_folder = $_temp;
+		}
+		else
+		{
+			$application_folder = strtr(
+				rtrim($application_folder, '/\\'),
+				'/\\',
+				DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
+			);
+		}
+	}
+	elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
+	{
+		$application_folder = BASEPATH.strtr(
+			trim($application_folder, '/\\'),
+			'/\\',
+			DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
+		);
 	}
 	else
 	{
-		if ( ! is_dir(BASEPATH.$application_folder.'/'))
+		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
+		echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
+		exit(3); // EXIT_CONFIG
+	}
+	define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
+	// The path to the "views" directory
+	if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
+	{
+		$view_folder = APPPATH.'views';
+	}
+	elseif (is_dir($view_folder))
+	{
+		if (($_temp = realpath($view_folder)) !== FALSE)
 		{
-			exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
+			$view_folder = $_temp;
+		}
+		else
+		{
+			$view_folder = strtr(
+				rtrim($view_folder, '/\\'),
+				'/\\',
+				DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
+			);
 		}
-
-		define('APPPATH', BASEPATH.$application_folder.'/');
 	}
-
+	elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
+	{
+		$view_folder = APPPATH.strtr(
+			trim($view_folder, '/\\'),
+			'/\\',
+			DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
+		);
+	}
+	else
+	{
+		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
+		echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
+		exit(3); // EXIT_CONFIG
+	}
+	define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
 /*
  * --------------------------------------------------------------------
  * LOAD THE BOOTSTRAP FILE
  * --------------------------------------------------------------------
  *
  * And away we go...
- *
  */
 require_once BASEPATH.'core/CodeIgniter.php';
-
-/* End of file index.php */
-/* Location: ./index.php */

+ 1 - 1
frameworks/PHP/codeigniter/setup.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-fw_depends php5 nginx composer
+fw_depends php7 nginx composer
 
 sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php
 sed -i 's|root .*/FrameworkBenchmarks/php-codeigniter|root '"${TROOT}"'|g' deploy/nginx.conf

+ 1 - 1
frameworks/PHP/codeigniter/setup_hhvm.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-fw_depends php5 nginx composer hhvm
+fw_depends php7 nginx composer hhvm
 
 sed -i 's|localhost|'"${DBHOST}"'|g' application/config/database.php
 sed -i 's|SourceRoot = .*/FrameworkBenchmarks/codeigniter|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf

+ 0 - 7
frameworks/Perl/dancer/cpanfile

@@ -1,7 +0,0 @@
-requires 'Dancer', '1.3134';
-requires 'Dancer::Plugin::Database', '2.10';
-requires 'DBI', '1.633';
-requires 'DBD::mysql', '4.031';
-requires 'JSON::XS', '3.01';
-requires 'Plack', '1.0034';
-requires 'Starman', '0.4011';

+ 9 - 2
frameworks/Perl/dancer/setup.sh

@@ -6,8 +6,15 @@ sed -i 's|server unix.*frameworks-benchmark.sock;|server unix:'"${TROOT}"'/frame
 
 fw_depends perl nginx
 
-carton install --cpanfile ${TROOT}/cpanfile
-
+cpanm --notest --no-man-page \
+    [email protected] \
+    Dancer::Plugin::[email protected] \
+    [email protected] \
+    DBD::[email protected] \
+    JSON::[email protected] \
+    [email protected] \
+    [email protected]
+    
 nginx -c ${TROOT}/nginx.conf
 
 plackup -E production -s Starman --workers=${MAX_THREADS} -l ${TROOT}/frameworks-benchmark.sock -a ./app.pl &

+ 8 - 8
frameworks/Perl/kelp/setup.sh

@@ -7,14 +7,14 @@ sed -i 's|server unix.*frameworks-benchmark.sock;|server unix:'"${TROOT}"'/frame
 fw_depends perl nginx
 
 cpanm --notest --no-man-page \
-    Kelp \
-    DBI \
-    DBD::mysql \
-    MongoDB \
-    Kelp::Module::JSON::XS \
-    HTML::Escape \
-    HTTP::Parser::XS \
-    Starman
+    Kelp@0.9071 \
+    DBI@1.636 \
+    DBD::mysql@4.033 \
+    MongoDB@1.4.2 \
+    Kelp::Module::JSON::XS@0.502 \
+    HTML::Escape@1.10 \
+    HTTP::Parser::XS@0.17 \
+    Starman@0.4014
 
 nginx -c ${TROOT}/nginx.conf
 

+ 0 - 6
frameworks/Perl/plack/cpanfile

@@ -1,6 +0,0 @@
-requires 'JSON::XS', '3.01';
-requires 'HTTP::Parser::XS', '0.16';
-requires 'Plack', '1.0030';
-requires 'DBI', '1.631';
-requires 'DBD::mysql', '4.027';
-requires 'Starlet', '0.24';

+ 8 - 2
frameworks/Perl/plack/setup.sh

@@ -5,7 +5,13 @@ sed -i 's|server unix:.*/FrameworkBenchmarks/plack|server unix:'"${TROOT}"'|g' n
 
 fw_depends perl nginx
 
-cpanm --notest --no-man-page --installdeps $TROOT
-
+cpanm --notest --no-man-page \
+    JSON::[email protected] \
+    HTTP::Parser::[email protected] \
+    [email protected] \
+    [email protected] \
+    DBD::[email protected] \
+    [email protected]
+    
 nginx -c $TROOT/nginx.conf
 start_server --backlog=16384 --pid-file=$TROOT/app.pid --path=$TROOT/app.sock -- plackup -E production -s Starlet --max-keepalive-reqs 1000 --max-reqs-per-child 50000 --min-reqs-per-child 40000 --max-workers=${MAX_THREADS} -a $TROOT/app.psgi &

+ 8 - 2
frameworks/Perl/web-simple/setup.sh

@@ -5,8 +5,14 @@ sed -i 's|server unix:.*/FrameworkBenchmarks/web-simple|server unix:'"${TROOT}"'
 
 fw_depends perl nginx
 
-cpanm --notest --no-man-page Web::Simple DBI DBD::mysql Plack Starman JSON::XS
-
+cpanm --notest --no-man-page  \
+    Web::[email protected] \
+    [email protected] \
+    DBD::[email protected] \
+    [email protected] \
+    [email protected] \
+    JSON::[email protected]
+    
 nginx -c $TROOT/nginx.conf
 
 plackup -E production -s Starman --workers=${MAX_THREADS} -l $TROOT/frameworks-benchmark.sock -a $TROOT/app.pl &

+ 1 - 1
toolset/benchmark/test_types/verifications.py

@@ -125,7 +125,7 @@ def verify_helloworld_object(json_object, url):
         message = json_object['message']
 
         if message != 'hello, world!':
-            return [('fail', "Expected message of 'hello, world!', got '%s'" % message)]
+            return [('fail', "Expected message of 'hello, world!', got '%s'" % message, url)]
         return problems
 
 

Some files were not shown because too many files changed in this diff