Skip to content

Commit

Permalink
Merge branch 'master' into php/upgrade/v8
Browse files Browse the repository at this point in the history
  • Loading branch information
waghanza authored Jan 22, 2021
2 parents 7cff392 + 8691231 commit eb5479f
Show file tree
Hide file tree
Showing 11 changed files with 295 additions and 211 deletions.
411 changes: 206 additions & 205 deletions README.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions clojure/donkey/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.clj-kondo
.lein-repl-history
.lsp
target
13 changes: 13 additions & 0 deletions clojure/donkey/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
framework:
github: AppsFlyer/donkey
version: 0.4

image: clojure:openjdk-11-lein-slim-buster

build:
- lein uberjar

binaries:
- target/uberjar/donkey.jar

command: java -Xms2G -server -Xmx2G -XX:+UseStringDeduplication -XX:+UseParallelGC -Dvertx.disableMetrics=true -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.disableHttpHeadersValidation=true -Dvertx.flashPolicyHandler=false -Djava.net.preferIPv4Stack=true -jar target/uberjar/donkey.jar 3000
8 changes: 8 additions & 0 deletions clojure/donkey/project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(defproject the-benchmarker-donkey "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[com.appsflyer/donkey "0.4.0"]]
:jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"]
:uberjar-name "donkey.jar"
:target-path "target/%s/"
:aot :all
:main d.server)
57 changes: 57 additions & 0 deletions clojure/donkey/src/d/server.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
(ns d.server
(:require [com.appsflyer.donkey.core :as donkey-core]
[com.appsflyer.donkey.server :as donkey-server])
(:gen-class)
(:import (io.vertx.core.impl.cpu CpuCoreSensor)))

(def empty-body
(bytes (byte-array (map (comp byte int) ""))))

(def empty-response
{:status 200
:headers {"content-type" "text/plain"}
:body empty-body})

(defn just-id [req]
(bytes (byte-array (map (comp byte int) (-> :path-params req (get "id"))))))

(defn get-user-id-response [req]
{:status 200
:headers {"content-type" "text/plain"}
:body (just-id req)})

(defn- get-root-handler [_ res _]
(res empty-response))

(defn- get-user-id-handler [req res _]
(res (get-user-id-response req)))

(defn- post-user-handler [_ res _]
(res empty-response))

(def get-root-route {:methods [:get]
:path "/"
:handler get-root-handler})

(def get-user-id-route {:methods [:get]
:path "/user/:id"
:handler get-user-id-handler})

(def post-user-route {:methods [:post]
:path "/user"
:handler post-user-handler})

(defn -main [& _]
(let [concurrency (max 1 (- (CpuCoreSensor/availableProcessors) 1))]
(->
(donkey-core/create-donkey
{:event-loops concurrency})
(donkey-core/create-server {:port 3000
:routes [get-root-route get-user-id-route post-user-route]
:instances concurrency
:compression false
:decompression false
:date-header true
:server-header true
:keep-alive true})
(donkey-server/start-sync))))
2 changes: 1 addition & 1 deletion go/air/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module main

require github.com/aofei/air v0.21.0
require github.com/aofei/air v0.21.1
2 changes: 1 addition & 1 deletion php/laravel/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"laravel/framework": "~8.23.0"
"laravel/framework": "~8.24.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion php/laravel/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework:
website: laravel.com
version: 8.23
version: 8.24

environment:
APP_ENV: production
Expand Down
2 changes: 1 addition & 1 deletion scala/play/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lazy val root = (project.in(file("."))
.settings(
libraryDependencies ++= Seq(
guice,
"com.typesafe.play" %% "play-json" % "[2.8,2.9)"
"com.typesafe.play" %% "play-json" % "[2.9,2.10)"
)
)
.enablePlugins(PlayScala)
Expand Down
2 changes: 1 addition & 1 deletion swift/vapor-framework/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/vapor/vapor.git", .upToNextMinor(from: "4.37.0"))
.package(url: "https://github.com/vapor/vapor.git", .upToNextMinor(from: "4.38.0"))
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
2 changes: 1 addition & 1 deletion swift/vapor-framework/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework:
website: vapor.codes
version: 4.37
version: 4.38
name: vapor

options: serve
Expand Down

0 comments on commit eb5479f

Please sign in to comment.