-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into php/upgrade/v8
- Loading branch information
Showing
11 changed files
with
295 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
.clj-kondo | ||
.lein-repl-history | ||
.lsp | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|