Browse Source

[ruby/roda] Remove unused JRuby code (#8674)

JRuby is no longer tested. We can remove the specific code for it.
Petrik de Heus 1 year ago
parent
commit
2b8ca853c7

+ 1 - 3
frameworks/Ruby/roda-sequel/README.md

@@ -13,9 +13,7 @@ comparing a variety of web platforms.
 The tests will be run with:
 The tests will be run with:
 
 
 * [Ruby 3.3](http://www.ruby-lang.org)
 * [Ruby 3.3](http://www.ruby-lang.org)
-* [JRuby 9.1](http://jruby.org)
-* [Rubinius 3](https://rubinius.com)\*
-* [Puma 3](http://puma.io)
+* [Puma 6](http://puma.io)
 * [Passenger 5](https://www.phusionpassenger.com)
 * [Passenger 5](https://www.phusionpassenger.com)
 * [Unicorn 5](https://bogomips.org/unicorn/)
 * [Unicorn 5](https://bogomips.org/unicorn/)
 * [Roda 3](http://roda.jeremyevans.net)
 * [Roda 3](http://roda.jeremyevans.net)

+ 2 - 11
frameworks/Ruby/roda-sequel/boot.rb

@@ -29,11 +29,9 @@ def connect(dbtype)
 
 
   adapters = {
   adapters = {
     mysql: {
     mysql: {
-      jruby: "jdbc:mysql",
       mri: "mysql2"
       mri: "mysql2"
     },
     },
     postgresql: {
     postgresql: {
-      jruby: "jdbc:postgresql",
       mri: "postgres"
       mri: "postgres"
     }
     }
   }
   }
@@ -41,12 +39,7 @@ def connect(dbtype)
   opts = {}
   opts = {}
 
 
   # Determine threading/thread pool size and timeout
   # Determine threading/thread pool size and timeout
-  if defined?(JRUBY_VERSION)
-    opts[:max_connections] = (
-      2 * Math.log(Integer(ENV.fetch("MAX_CONCURRENCY")))
-    ).floor
-    opts[:pool_timeout] = 10
-  elsif defined?(Puma) &&
+  if defined?(Puma) &&
         (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
         (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
     opts[:max_connections] = (2 * Math.log(threads)).floor
     opts[:max_connections] = (2 * Math.log(threads)).floor
     opts[:pool_timeout] = 10
     opts[:pool_timeout] = 10
@@ -57,9 +50,7 @@ def connect(dbtype)
   Sequel.connect "%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}" %
   Sequel.connect "%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}" %
                    {
                    {
                      adapter:
                      adapter:
-                       adapters.fetch(dbtype).fetch(
-                         defined?(JRUBY_VERSION) ? :jruby : :mri
-                       ),
+                       adapters.fetch(dbtype).fetch(:mri),
                      host: "tfb-database",
                      host: "tfb-database",
                      database: "hello_world",
                      database: "hello_world",
                      user: "benchmarkdbuser",
                      user: "benchmarkdbuser",

+ 0 - 18
frameworks/Ruby/roda-sequel/config/java_tune.sh

@@ -1,18 +0,0 @@
-#!/bin/sh
-stack_size=1
-cache_size=240
-meta_size=192
-avail_mem=$(awk '/^MemAvailable/ { print int(0.6 * $2 / 1024); exit }' /proc/meminfo)
-heap_size=$(( avail_mem - meta_size - cache_size - (stack_size * MAX_CONCURRENCY * THREAD_FACTOR) ))
-
-JRUBY_OPTS="-J-server -J-XX:+AggressiveOpts -J-Djava.net.preferIPv4Stack=true"
-#JRUBY_OPTS="$JRUBY_OPTS -J-XX:+UseSerialGC"
-JRUBY_OPTS="$JRUBY_OPTS -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseConcMarkSweepGC"
-#JRUBY_OPTS="$JRUBY_OPTS -J-XX:+UseG1GC -J-XX:+UseStringDeduplication"
-JRUBY_OPTS="$JRUBY_OPTS -J-Xms${heap_size}m -J-Xmx${heap_size}m"
-JRUBY_OPTS="$JRUBY_OPTS -J-Xss${stack_size}m"
-JRUBY_OPTS="$JRUBY_OPTS -J-XX:MaxMetaspaceSize=${meta_size}m"
-JRUBY_OPTS="$JRUBY_OPTS -J-XX:ReservedCodeCacheSize=${cache_size}m"
-JRUBY_OPTS="$JRUBY_OPTS -Xcompile.invokedynamic=true -J-XX:+UseNUMA -J-XX:+AlwaysPreTouch"
-
-export JRUBY_OPTS