diff options
Diffstat (limited to 'images/benchmarks/ruby')
-rwxr-xr-x | images/benchmarks/ruby/Dockerfile | 27 | ||||
-rwxr-xr-x | images/benchmarks/ruby/Gemfile | 5 | ||||
-rw-r--r-- | images/benchmarks/ruby/Gemfile.lock | 26 | ||||
-rwxr-xr-x | images/benchmarks/ruby/config.ru | 2 | ||||
-rwxr-xr-x | images/benchmarks/ruby/index.erb | 8 | ||||
-rwxr-xr-x | images/benchmarks/ruby/main.rb | 27 |
6 files changed, 0 insertions, 95 deletions
diff --git a/images/benchmarks/ruby/Dockerfile b/images/benchmarks/ruby/Dockerfile deleted file mode 100755 index 13c4f6eed..000000000 --- a/images/benchmarks/ruby/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -# example based on https://github.com/errm/fib -FROM alpine:3.9 as build - -COPY Gemfile Gemfile.lock ./ - -RUN apk add --no-cache ruby ruby-dev ruby-bundler ruby-json build-base bash \ - && bundle install --frozen -j4 -r3 --no-cache --without development \ - && apk del --no-cache ruby-bundler \ - && rm -rf /usr/lib/ruby/gems/*/cache - -FROM alpine:3.9 as prod - -COPY --from=build /usr/lib/ruby/gems /usr/lib/ruby/gems -RUN apk add --no-cache ruby ruby-json ruby-etc redis apache2-utils \ - && ruby -e "Gem::Specification.map.each do |spec| \ - Gem::Installer.for_spec( \ - spec, \ - wrappers: true, \ - force: true, \ - install_dir: spec.base_dir, \ - build_args: spec.build_args, \ - ).generate_bin \ - end" - -COPY . /app/. - -STOPSIGNAL SIGINT diff --git a/images/benchmarks/ruby/Gemfile b/images/benchmarks/ruby/Gemfile deleted file mode 100755 index ac521b32c..000000000 --- a/images/benchmarks/ruby/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source "https://rubygems.org" - -gem "sinatra" -gem "puma" -gem "redis"
\ No newline at end of file diff --git a/images/benchmarks/ruby/Gemfile.lock b/images/benchmarks/ruby/Gemfile.lock deleted file mode 100644 index 041778e02..000000000 --- a/images/benchmarks/ruby/Gemfile.lock +++ /dev/null @@ -1,26 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - mustermann (1.0.3) - puma (3.4.0) - rack (2.0.6) - rack-protection (2.0.5) - rack - redis (4.1.0) - sinatra (2.0.5) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.5) - tilt (~> 2.0) - tilt (2.0.9) - -PLATFORMS - ruby - -DEPENDENCIES - puma - redis - sinatra - -BUNDLED WITH - 1.17.1
\ No newline at end of file diff --git a/images/benchmarks/ruby/config.ru b/images/benchmarks/ruby/config.ru deleted file mode 100755 index b2d135cc0..000000000 --- a/images/benchmarks/ruby/config.ru +++ /dev/null @@ -1,2 +0,0 @@ -require './main' -run Sinatra::Application
\ No newline at end of file diff --git a/images/benchmarks/ruby/index.erb b/images/benchmarks/ruby/index.erb deleted file mode 100755 index 7f7300e80..000000000 --- a/images/benchmarks/ruby/index.erb +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html> -<body> - <% text.each do |t| %> - <p><%= t %></p> - <% end %> -</body> -</html> diff --git a/images/benchmarks/ruby/main.rb b/images/benchmarks/ruby/main.rb deleted file mode 100755 index b998f004e..000000000 --- a/images/benchmarks/ruby/main.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "sinatra" -require "securerandom" -require "redis" - -redis_host = ENV["HOST"] -$redis = Redis.new(host: redis_host) - -def generateText - for i in 0..99 - $redis.set(i, randomBody(1024)) - end -end - -def randomBody(length) - return SecureRandom.alphanumeric(length) -end - -generateText -template = ERB.new(File.read('./index.erb')) - -get "/" do - texts = Array.new - for i in 0..4 - texts.push($redis.get(rand(0..99))) - end - template.result_with_hash(text: texts) -end |