Browse Source

Racket removal (#2454)

Nate 8 years ago
parent
commit
139e8b067a

+ 0 - 1
.travis.yml

@@ -162,7 +162,6 @@ env:
     - "TESTDIR=Python/weppy"
     - "TESTDIR=Python/weppy"
     - "TESTDIR=Python/wheezyweb"
     - "TESTDIR=Python/wheezyweb"
     - "TESTDIR=Python/wsgi"
     - "TESTDIR=Python/wsgi"
-    - "TESTDIR=Racket/racket-ws"
     - "TESTDIR=Ruby/grape"
     - "TESTDIR=Ruby/grape"
     - "TESTDIR=Ruby/ngx_mruby"
     - "TESTDIR=Ruby/ngx_mruby"
     - "TESTDIR=Ruby/padrino"
     - "TESTDIR=Ruby/padrino"

+ 0 - 1
frameworks/Racket/racket-ws/.gitignore

@@ -1 +0,0 @@
-/bench/compiled

+ 0 - 10
frameworks/Racket/racket-ws/README.md

@@ -1,10 +0,0 @@
-# Racket Web Server Benchmarking Test
-
-This is the Racket Web Server portion of a
-[benchmarking test suite](../) comparing a variety of web development
-platforms.
-
-
-## Infrastructure Software Versions
-The tests were run with:
-* Racket 5.3.1

+ 0 - 40
frameworks/Racket/racket-ws/bench/bench-ev.rkt

@@ -1,40 +0,0 @@
-#lang racket/base
-(module+ main
-  (require racket/tcp)
-
-  (define PORT 8000)
-
-  (define RESPONSE #"HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\n!")
-  (define END (bytes-length RESPONSE))
-  (define BUFFER-SIZE 64)
-  (define BUFFER (make-bytes BUFFER-SIZE))
-  (define const-eof (λ (x) eof))
-
-  (define EVTS null)
-  (define l (tcp-listen PORT 10 #t #f))
-  (define (accept-f l)
-    (define from (car l))
-    (define to (cadr l))
-    (define (read-f from)
-      (define read-k
-        ;; XXX This drops performance from about 132k/s to 120k/s,
-        ;; but is necessary because of crashing the benchmarks
-        (with-handlers ([exn:fail? const-eof])
-          (read-bytes-avail!* BUFFER from 0 BUFFER-SIZE)))
-      (cond
-        [(eof-object? read-k)
-         (close-input-port from)
-         (close-output-port to)
-         (set! EVTS (remq e EVTS))]
-        [else
-         (write-bytes-avail* RESPONSE to 0 END)]))
-    (define e
-      (handle-evt from read-f))
-    (set! EVTS (cons e EVTS)))
-  (define accept-evt
-    (handle-evt (tcp-accept-evt l) accept-f))
-  (printf "Ready\n")
-  (flush-output)
-  (let loop ()
-    (apply sync accept-evt EVTS)
-    (loop)))

+ 0 - 35
frameworks/Racket/racket-ws/bench/bench-th.rkt

@@ -1,35 +0,0 @@
-#lang racket/base
-(module+ main
-  (require racket/tcp)
-
-  (define PORT 8000)
-
-  (define RESPONSE #"HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\n!")
-  (define END (bytes-length RESPONSE))
-  (define BUFFER-SIZE 64)
-  (define BUFFER (make-bytes BUFFER-SIZE))
-  (define const-eof (λ (x) eof))
-
-  (define l (tcp-listen PORT 10 #t #f))
-
-  (printf "Ready\n")
-  (flush-output)
-
-  (let accept-loop ()
-    (define-values (from to) (tcp-accept l))
-    (thread
-     (λ ()
-       (let conn-loop ()
-         (define read-k
-           ;; XXX This drops performance from about 132k/s to 120k/s,
-           ;; but is necessary because of crashing the benchmarks
-           (with-handlers ([exn:fail? const-eof])
-             (read-bytes-avail! BUFFER from 0 BUFFER-SIZE)))
-         (cond
-           [(eof-object? read-k)
-            (close-input-port from)
-            (close-output-port to)]
-           [else
-            (write-bytes-avail RESPONSE to 0 END)
-            (conn-loop)]))))
-    (accept-loop)))

+ 0 - 35
frameworks/Racket/racket-ws/bench/bench-thf.rkt

@@ -1,35 +0,0 @@
-#lang racket/base
-(module+ main
-  (require racket/tcp)
-
-  (define PORT 8000)
-
-  (define RESPONSE #"HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\n!")
-  (define END (bytes-length RESPONSE))
-  (define BUFFER-SIZE 64)
-  (define BUFFER (make-bytes BUFFER-SIZE))
-  (define const-eof (λ (x) eof))
-
-  (define l (tcp-listen PORT 10 #t #f))
-
-  (printf "Ready\n")
-  (flush-output)
-
-  (let accept-loop ()
-    (define-values (from to) (tcp-accept l))
-    (thread
-     (λ ()
-       (let conn-loop ()
-         (define read-k
-           ;; XXX This drops performance from about 132k/s to 120k/s,
-           ;; but is necessary because of crashing the benchmarks
-           (with-handlers ([exn:fail? const-eof])
-             (read-bytes-avail!* BUFFER from 0 BUFFER-SIZE)))
-         (cond
-           [(eof-object? read-k)
-            (close-input-port from)
-            (close-output-port to)]
-           [else
-            (write-bytes-avail* RESPONSE to 0 END)
-            (conn-loop)]))))
-    (accept-loop)))

+ 0 - 87
frameworks/Racket/racket-ws/bench/bench.rkt

@@ -1,87 +0,0 @@
-#lang racket/base
-(require web-server/servlet-env
-         web-server/dispatch
-         web-server/http
-         json
-         db)
-
-(define DEPLOY? (box #t))
-
-(define (response/json x)
-  (response/output
-   #:mime-type #"application/json"
-   (λ (out)
-     (write-json x out))))
-
-(define (page/json req)
-  (response/json
-   (hasheq 'message "Hello, World!")))
-
-(define (go! db-host)
-  (define c
-    (cond
-      [(unbox DEPLOY?)
-       (virtual-connection
-        (connection-pool
-         (λ ()
-           (mysql-connect #:user "benchmarkdbuser"
-                          #:password "benchmarkdbpass"
-                          #:database "hello_world"
-                          #:server db-host))))]
-      [else
-       (define c (sqlite3-connect #:database 'memory))
-       (query-exec c "create table World ( id int, randomNumber int )")
-       (for ([i (in-range (add1 10000))])
-         (query-exec c "insert into World values ( $1, $1 )" i))
-       c]))
-
-  (define (db-one)
-    (define id (add1 (random 10000)))
-    (define randomNumber
-      (query-value c "select randomNumber from World where id = ?" id))
-    (hash 'id id 'randomNumber randomNumber))
-
-  (define (page/db req)
-    (response/json
-     (db-one)))
-
-  (define (clamp lo x hi)
-    (cond
-      [(x . < . lo) lo]
-      [(hi . < . x) hi]
-      [else          x]))
-
-  (define (page/dbs req is)
-    (define maybe-num (string->number is))
-    (define maybe-i (or maybe-num 0))
-    (define i (clamp 1 maybe-i 500))
-    (response/json
-     (for/list ([j (in-range i)])
-       (db-one))))
-
-  (define-values (main-dispatch main-url)
-    (dispatch-rules
-     [("json")
-      page/json]
-     [("db")
-      page/db]
-     [("dbs" (string-arg))
-      page/dbs]))
-
-  (serve/servlet
-   main-dispatch
-   #:port 8000
-   #:listen-ip #f
-   #:command-line? #t
-   #:banner? (not (unbox DEPLOY?))
-   #:servlet-regexp #rx""
-   #:servlet-path "/"))
-
-(module+ main
-  (require racket/cmdline)
-  (command-line #:program "bench"
-                #:once-each
-                ["--test" "Run in test mode"
-                 (set-box! DEPLOY? #f)]
-                #:args (db-host-s)
-                (go! db-host-s)))

+ 0 - 26
frameworks/Racket/racket-ws/benchmark_config.json

@@ -1,26 +0,0 @@
-{
-  "framework": "racket-ws",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "json_url": "/json",
-      "db_url": "/db",
-      "query_url": "/dbs/",
-      "port": 8000,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "MySQL",
-      "framework": "racket-ws",
-      "language": "Racket",
-      "flavor": "Racket6.6",
-      "orm": "Micro",
-      "platform": "None",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "Racket-ws",
-      "notes": "",
-      "versus": ""
-    }
-  }]
-}

+ 0 - 6
frameworks/Racket/racket-ws/setup.sh

@@ -1,6 +0,0 @@
-#!/bin/bash
-
-fw_depends mysql racket
-
-cd bench
-racket -t bench.rkt -- ${DBHOST} &

+ 0 - 22
toolset/setup/linux/languages/racket.sh

@@ -1,22 +0,0 @@
-#!/bin/bash
-
-RETCODE=$(fw_exists ${IROOT}/racket.installed)
-[ ! "$RETCODE" == 0 ] || { \
-  # Load environment variables
-  source $IROOT/racket.installed
-  return 0; }
-
-RACKET=$IROOT/racket
-
-fw_get -o racket-src.tar.gz http://mirror.racket-lang.org/installers/recent/racket-src.tgz
-fw_untar racket-src.tar.gz
-mv racket racket-install
-cd racket-install/src 
-./configure --prefix=$RACKET
-make
-make install
-
-echo "export RACKET_HOME=${RACKET}" > $IROOT/racket.installed
-echo -e "export PATH=\$RACKET_HOME/bin:\$PATH" >> $IROOT/racket.installed
-
-source $IROOT/racket.installed