Skip to content
Merged

aa #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f08a4a8
update smart-servlet to 0.1.3-SNAPSHOT (#6271)
smthing Jan 7, 2021
603cdca
Cutelyst update and fixes (#6249)
dantti Jan 8, 2021
6386132
Fix CI issue (#6274)
ajohnstonTE Jan 8, 2021
929900d
OfficeFloor (with GitHub Actions) (#6276)
sagenschneider Jan 8, 2021
39c47f7
Only generate CI jobs for languages that need to be tested (#6278)
ajohnstonTE Jan 8, 2021
eafe67f
[php-ngx] Update to PHP8 (#6282)
joanhey Jan 8, 2021
72a6226
[cakephp] Update to PHP8 (#6281)
joanhey Jan 8, 2021
30193d1
[Java] Add ActiveJ framework (#6280)
eduard-vasinskyi Jan 8, 2021
2ee4a7a
Add Watson Webserver framework (#6273)
Kaliumhexacyanoferrat Jan 8, 2021
f8005e8
Update lithium. (#6277)
matt-42 Jan 8, 2021
da62918
Update hyperf benchmark (#6279)
cexll Jan 8, 2021
9a3dfa8
Add NetCoreServer framework (C#) (#6272)
Kaliumhexacyanoferrat Jan 8, 2021
fe99c80
[aiohttp] Use SQLAlchemy directly (rather than aiopg) (#6248)
Dreamsorcerer Jan 8, 2021
42b020c
[c#/beetlex] update plaintext (#6285)
beetlex-io Jan 10, 2021
2648689
Test different pool size (#6286)
Dreamsorcerer Jan 10, 2021
4f9b40e
updates php/peachpie to the latest version (#6287)
jakubmisek Jan 11, 2021
0465ae0
Change CI to not force a full build on pushes
ajohnstonTE Jan 8, 2021
4205e27
Fix CI issue on master branches
ajohnstonTE Jan 11, 2021
1daa121
Merge pull request #6288 from ajohnstonTE/master
msmith-techempower Jan 12, 2021
c89e268
Label PRs with failing workflows (#6294)
ajohnstonTE Jan 13, 2021
d7bdd0b
Fix CI when targeting non-master branches (#6293)
ajohnstonTE Jan 13, 2021
8d110ce
[swoole-postgres] Update to PHP8 (#6296)
joanhey Jan 13, 2021
1105a4b
Update Python to 3.9.1 and other Django requirements (#6301)
SerhiyRomanov Jan 18, 2021
3830f1f
[aiohttp] Eliminate some overhead in jinja environment (#6289)
Dreamsorcerer Jan 18, 2021
fa5289b
[comet] Update to PHP8 (#6303)
joanhey Jan 19, 2021
6d43ad1
Lwan: Update to the newest version (#6304)
lpereira Jan 19, 2021
b89e0fa
Twitter: Update Finagle/Finatra library versions (#6308)
cacoco Jan 20, 2021
94a010b
Update dependencies of warp-rust (#6309)
sugar700 Jan 20, 2021
b30a82d
[duckphp] Update to PHP8 (#6311)
joanhey Jan 20, 2021
203629c
Update server version and set server header to 'TFB' (#6305)
Kaliumhexacyanoferrat Jan 20, 2021
8a73cb0
ntex: upgrade to v0.2 (#6316)
fafhrd91 Jan 23, 2021
a924590
Kumbiaphp clean (#6315)
joanhey Jan 23, 2021
93df532
Fix larvel-s to not use JIT (#6314)
joanhey Jan 23, 2021
64e02b4
OfficeFloor 3.31.0 (#6313)
sagenschneider Jan 23, 2021
0f93e20
[Ubiquity] update workerman to PHP8 (#6312)
jcheron Jan 23, 2021
5ffa0dd
[c#/beetlex] change plaintext buffer size, optimize fortunes. (#6300)
beetlex-io Jan 23, 2021
845f16a
Enable LTO for warp-rust (#6310)
sugar700 Jan 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 41 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [ push, pull_request ]
jobs:
setup:
runs-on: ubuntu-20.04
steps:
# Required for workflow triggers like the auto-label for failing PRs
- name: Save PR number
if: github.event_name == 'pull_request'
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
if: github.event_name == 'pull_request'
with:
name: pr
path: pr/
# Commit branch/name extraction from:
# https://github.community/t/accessing-commit-message-in-pull-request-event/17158/8
#
Expand All @@ -26,16 +33,35 @@ jobs:
echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD~1)" >> $GITHUB_ENV
# In case of a pull_request event, the commit we care about is HEAD^2, that
# is, the second parent of the pull request merge commit.
# The current branch name is directly given by GITHUB_HEAD_REF
- name: Get commit branch and commit message from PR
if: github.event_name == 'pull_request'
run: |
echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_ENV
echo "TARGET_BRANCH_NAME=$(echo ${GITHUB_BASE_REF##*/})" >> $GITHUB_ENV
echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
- uses: actions/setup-python@v2
with:
python-version: '2.7'
architecture: 'x64'
- name: Get all changes vs master
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "DIFF<<EOF" >> $GITHUB_ENV
echo "$(./toolset/github_actions/github_actions_diff.py)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Determine which (if any) tests need to be run
run: |
echo "RUN_TESTS<<EOF" >> $GITHUB_ENV
echo "$(grep -oP "github-actions-run-tests \K(.*)" <<< $DIFF || true)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- id: event_out
name: Write event outputs
run: |
Expand All @@ -45,6 +71,8 @@ jobs:
COMMIT_MESSAGE="${COMMIT_MESSAGE//$'\r'/'%0D'}"
echo "::set-output name=commit_message::$COMMIT_MESSAGE"
echo "::set-output name=branch_name::$BRANCH_NAME"
echo "::set-output name=target_branch_name::$TARGET_BRANCH_NAME"
echo "::set-output name=previous_commit::$PREVIOUS_COMMIT"
- id: verify_out
name: Write verify job matrix
run: |
Expand All @@ -53,15 +81,18 @@ jobs:
# include:
# - TESTLANG: {lang}
# with a TESTLANG object in the include array for each language under frameworks
VERIFY_MATRIX=$(ls -1 frameworks | jq -R | jq -sc "{include: map({TESTLANG: .})}")
VERIFY_MATRIX=$(ls -1 frameworks | jq -Rc '.+"/" | select(inside(env.RUN_TESTS)) | rtrimstr("/")' | jq -sc '{include: map({TESTLANG: .})}')
echo "::set-output name=verify_matrix::$VERIFY_MATRIX"
outputs:
commit_message: ${{ steps.event_out.outputs.commit_message }}
branch_name: ${{ steps.event_out.outputs.branch_name }}
target_branch_name: ${{ steps.event_out.outputs.target_branch_name }}
previous_commit: ${{ steps.event_out.outputs.previous_commit }}
verify_matrix: ${{ steps.verify_out.outputs.verify_matrix }}
verify:
needs: setup
if: ${{ !contains(needs.setup.outputs.commit_message, '[ci skip]') }}
# The matrix check is necessary because an empty job matrix is otherwise considered a workflow failure
if: ${{ !contains(needs.setup.outputs.commit_message, '[ci skip]') && contains(needs.setup.outputs.verify_matrix, 'TESTLANG') }}
runs-on: ubuntu-18.04
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.verify_matrix) }}
Expand All @@ -73,6 +104,8 @@ jobs:
TESTDIR: ${{ matrix.TESTDIR }}
COMMIT_MESSAGE: ${{ needs.setup.outputs.commit_message }}
BRANCH_NAME: ${{ needs.setup.outputs.branch_name }}
TARGET_BRANCH_NAME: ${{ needs.setup.outputs.target_branch_name }}
PREVIOUS_COMMIT: ${{ needs.setup.outputs.previous_commit }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- uses: actions/checkout@v2
Expand All @@ -82,8 +115,7 @@ jobs:
with:
python-version: '2.7'
architecture: 'x64'
- id: get_diff
name: Get all changes vs master
- name: Get all changes vs master
# Runs github_actions_diff, with the the output accessible in later steps
run: |
# Write the result to env.DIFF for later steps
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/label-failing-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Label PR if failed
on:
workflow_run:
workflows: [ "build" ]
types:
- completed
jobs:
apply_label:
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-20.04
steps:
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
with:
# scripts lightly modified from https://securitylab.github.com/research/github-actions-preventing-pwn-requests
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
- run: unzip pr.zip
- name: Label PR
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./NR'));
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
labels: ['PR: Please Update']
});
4 changes: 2 additions & 2 deletions frameworks/C++/cutelyst/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

export ASQL_VER=0.19.0
export ASQL_VER=0.26.0
export CUTELEE_VER=5.3.0
export CUTELYST_VER=2.13.0
export CUTELYST_VER=2.14.0

apt update -qq && \
apt install -yqq --no-install-recommends \
Expand Down
17 changes: 15 additions & 2 deletions frameworks/C++/cutelyst/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ cmake_minimum_required(VERSION 3.6.0 FATAL_ERROR)

project(cutelyst_benchmarks LANGUAGES CXX)

cmake_policy(SET CMP0069 NEW)

find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core Network Sql)
find_package(ASqlQt5 0.15.0 REQUIRED)
find_package(Cutelyst2Qt5 2.12 REQUIRED)
find_package(Cutelee5 REQUIRED)
find_package(PostgreSQL REQUIRED)
find_package(mimalloc 1.0)

# Auto generate moc files
set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -53,10 +58,18 @@ target_link_libraries(cutelyst_benchmarks
ASqlQt5::Core
)

add_executable(cutelyst-benchmarks main.cpp)
add_executable(cutelyst-benchmarks ${cutelyst_benchmarks_SRCS} main.cpp)
target_link_libraries(cutelyst-benchmarks
PUBLIC
Cutelyst::Core
Cutelyst::WSGI
Cutelyst::Utils::Sql
Cutelyst::View::Cutelee
Qt5::Core
Qt5::Network
cutelyst_benchmarks
Qt5::Sql
ASqlQt5::Core
)
if (mimalloc_FOUND)
target_link_libraries(cutelyst-benchmarks PUBLIC mimalloc)
endif ()
16 changes: 11 additions & 5 deletions frameworks/C++/cutelyst/src/databaseupdatestest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <QJsonObject>
#include <QJsonArray>

#include <QLoggingCategory>

DatabaseUpdatesTest::DatabaseUpdatesTest(QObject *parent) : Controller(parent)
{

Expand Down Expand Up @@ -41,14 +43,14 @@ void DatabaseUpdatesTest::updatep(Context *c)

db.execPrepared(APreparedQueryLiteral("SELECT randomNumber, id FROM world WHERE id=$1"),
{id}, [c, async] (AResult &result) {
if (Q_UNLIKELY(result.error() && !result.size())) {
if (Q_UNLIKELY(result.error() || !result.size())) {
c->res()->setStatus(Response::InternalServerError);
return;
}
}, c);
db.execPrepared(APreparedQueryLiteral("UPDATE world SET randomNumber=$1 WHERE id=$2"),
{randomNumber, id}, [c, async] (AResult &result) {
if (Q_UNLIKELY(result.error() && !result.size())) {
if (Q_UNLIKELY(result.error())) {
c->res()->setStatus(Response::InternalServerError);
return;
}
Expand Down Expand Up @@ -89,7 +91,7 @@ void DatabaseUpdatesTest::updateb(Context *c)

db.execPrepared(APreparedQueryLiteral("SELECT randomNumber, id FROM world WHERE id=$1"),
{id}, [c, async] (AResult &result) {
if (Q_UNLIKELY(result.error() && !result.size())) {
if (Q_UNLIKELY(result.error() || !result.size())) {
c->res()->setStatus(Response::InternalServerError);
return;
}
Expand All @@ -99,7 +101,7 @@ void DatabaseUpdatesTest::updateb(Context *c)

const APreparedQuery pq = getSql(queries);
db.execPrepared(pq, args, [c, async] (AResult &result) {
if (Q_UNLIKELY(result.error() && !result.size())) {
if (Q_UNLIKELY(result.error())) {
c->res()->setStatus(Response::InternalServerError);
return;
}
Expand Down Expand Up @@ -189,9 +191,13 @@ APreparedQuery DatabaseUpdatesTest::getSql(int count)
sql.append(QStringLiteral("ELSE randomnumber END WHERE id IN ("));

for (int i = 0; i < count; i++) {
sql.append(QLatin1Char('$') + QString::number(placeholdersCounter));
sql.append(QLatin1Char('$') + QString::number(placeholdersCounter) + QLatin1Char(','));
++placeholdersCounter;
}

if (count) {
sql.remove(sql.size() - 1, 1);
}
sql.append(QLatin1Char(')'));
m_sqlMap.insert(count, sql);

Expand Down
22 changes: 22 additions & 0 deletions frameworks/C++/lithium/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,28 @@
"display_name": "Lithium-postgres-batch",
"notes": "",
"versus": "None"
},

"postgres-batch-beta": {
"db_url" : "/db",
"query_url" : "/queries?N=",
"fortune_url" : "/fortunes",
"update_url" : "/updates?N=",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "Postgres",
"framework": "Lithium",
"language": "C++",
"flavor": "None",
"orm": "Full",
"platform": "None",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "Lithium-postgres-batch-beta",
"notes": "",
"versus": "None"
}

}
Expand Down
10 changes: 7 additions & 3 deletions frameworks/C++/lithium/compile-batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

DB_FLAG=$1
COMMIT=10b72ad8ce16528ff642f802e266a975964d06f9
MONOTHREAD=$2
COMMIT="$2"
MONOTHREAD=$2
if [ "$COMMIT" = "" ]; then
COMMIT="10b72ad8ce16528ff642f802e266a975964d06f9"
fi

if [ $DB_FLAG = "TFB_MYSQL" ]; then
echo "ERROR: Only Postgres has pipelining support for now."
Expand All @@ -17,9 +21,9 @@ fi

wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh

clang++ -fprofile-instr-generate=./profile.prof -flto -DLITHIUM_SERVER_NAME=l -DPROFILE_MODE -DN_SQL_CONNECTIONS=1 -DMONOTHREAD=$MONOTHREAD -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
clang++ -fprofile-instr-generate=./profile.prof -flto -DLITHIUM_SERVER_NAME=l -DPROFILE_MODE -DN_SQL_CONNECTIONS=1 -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
/lithium_tbf tfb-database 8081
llvm-profdata-10 merge -output=./profile.pgo ./profile.prof
clang++ -fprofile-instr-use=./profile.pgo -flto -DLITHIUM_SERVER_NAME=l -DNDEBUG -D$DB_FLAG -DN_SQL_CONNECTIONS=1 -DMONOTHREAD=$MONOTHREAD -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
clang++ -fprofile-instr-use=./profile.pgo -flto -DLITHIUM_SERVER_NAME=l -DNDEBUG -D$DB_FLAG -DN_SQL_CONNECTIONS=1 -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf

/lithium_tbf tfb-database 8080
2 changes: 1 addition & 1 deletion frameworks/C++/lithium/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DB_FLAG=$1
COMMIT="$2"

if [ "$COMMIT" = "" ]; then
COMMIT="e199537f15abce7cf25c0b4de0f14461a1f426ec"
COMMIT="a046b3345098157849d9e2ab49a475aaabf4a90f"
fi

if [ $DB_FLAG = "TFB_MYSQL" ]; then
Expand Down
17 changes: 17 additions & 0 deletions frameworks/C++/lithium/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[framework]
name = "lithium"
authors = ["Matthieu Garrigues <matthieu.garrigues@gmail.com>"]
github = "https://github.com/matt-42/lithium"

[main]
urls.plaintext = "/plaintext"
Expand Down Expand Up @@ -69,3 +71,18 @@ orm = "Full"
platform = "None"
webserver = "None"
versus = "None"

[postgres-batch-beta]
urls.db = "/db"
urls.query = "/queries?N="
urls.update = "/updates?N="
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Micro"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Full"
platform = "None"
webserver = "None"
versus = "None"
13 changes: 13 additions & 0 deletions frameworks/C++/lithium/lithium-postgres-batch-beta.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

FROM buildpack-deps:focal

RUN apt-get update -yqq
RUN apt-get install -yqq clang libboost-context-dev libboost-dev wget
RUN apt-get install -yqq bison flex

COPY ./ ./

RUN ./compile_libpq.sh batchmode
ENV LD_LIBRARY_PATH=/usr/lib

CMD ./compile-batch.sh TFB_PGSQL 16b3f43a2b292e5349b7b528fa9410b3239c15cb
2 changes: 1 addition & 1 deletion frameworks/C++/lithium/lithium-postgres-batch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ENV LD_LIBRARY_PATH=/usr/lib

EXPOSE 8080

CMD ./compile-batch.sh TFB_PGSQL 0
CMD ./compile-batch.sh TFB_PGSQL
2 changes: 1 addition & 1 deletion frameworks/C++/lithium/lithium-postgres-beta.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ENV LD_LIBRARY_PATH=/usr/lib

EXPOSE 8080

CMD ./compile.sh TFB_PGSQL 667f439040821d981923492e59749b87005268e4
CMD ./compile.sh TFB_PGSQL a046b3345098157849d9e2ab49a475aaabf4a90f
3 changes: 1 addition & 2 deletions frameworks/C/lwan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ CFLAGS = -mtune=native -march=native -O3 -fno-plt -flto -ffat-lto-objects -DNDEB
-I /lwan/src/lib \
`pkg-config mariadb --cflags` \
`pkg-config sqlite3 --cflags` \
`pkg-config luajit --cflags` \
-fauto-profile=/lwan/src/gcda/techempower.gcov
`pkg-config luajit --cflags`

LDFLAGS = -mtune=native -march=native -O3 -flto -ffat-lto-objects -Wl,-z,now,-z,relro \
-Wl,-whole-archive /lwan/build/src/lib/liblwan.a -Wl,-no-whole-archive \
Expand Down
Loading