diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 737a5a3017b..5bc13308a7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: run: | mkdir -p ./pr echo ${{ github.event.number }} > ./pr/NR - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: github.event_name == 'pull_request' with: name: pr @@ -20,7 +20,7 @@ jobs: # # We need to fetch more than one commit to be able to access HEAD^2 in case # of a pull request - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 10 # In case of a push event, the commit we care about is simply HEAD. @@ -46,7 +46,7 @@ jobs: 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@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -110,10 +110,10 @@ jobs: PREVIOUS_COMMIT: ${{ needs.setup.outputs.previous_commit }} PR_NUMBER: ${{ github.event.pull_request.number }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 10 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' diff --git a/.github/workflows/get-maintainers.yml b/.github/workflows/get-maintainers.yml index 7370310eb80..fb35e03b8c4 100644 --- a/.github/workflows/get-maintainers.yml +++ b/.github/workflows/get-maintainers.yml @@ -8,7 +8,7 @@ jobs: get_maintainers: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 10 - name: Get commit branch and commit message from PR @@ -19,7 +19,7 @@ jobs: 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@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -31,7 +31,7 @@ jobs: run: | python ./toolset/github_actions/get_maintainers.py > ./maintainers/maintainers.md - name: Save Maintainers - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: maintainers path: maintainers/ diff --git a/.github/workflows/label-failing-pr.yml b/.github/workflows/label-failing-pr.yml index 84ba509086c..10910510ace 100644 --- a/.github/workflows/label-failing-pr.yml +++ b/.github/workflows/label-failing-pr.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: 'Download artifact' - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v7 with: # scripts lightly modified from https://securitylab.github.com/research/github-actions-preventing-pwn-requests script: | @@ -32,7 +32,7 @@ jobs: fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - run: unzip pr.zip - name: Label PR - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/ping-maintainers.yml b/.github/workflows/ping-maintainers.yml index dd8dd607f68..5f97223b437 100644 --- a/.github/workflows/ping-maintainers.yml +++ b/.github/workflows/ping-maintainers.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: 'Download maintainers artifact' - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | let artifacts = await github.rest.actions.listWorkflowRunArtifacts({ @@ -32,7 +32,7 @@ jobs: fs.writeFileSync('${{github.workspace}}/maintainers.zip', Buffer.from(download.data)); - run: unzip maintainers.zip - name: Ping maintainers - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/frameworks/C++/cinatra/README.md b/frameworks/C++/cinatra/README.md index df01ca2c237..cc965dfb351 100644 --- a/frameworks/C++/cinatra/README.md +++ b/frameworks/C++/cinatra/README.md @@ -1,10 +1,10 @@ # cinatra Benchmarking Test -cinatra is a high-performance, easy-to-use http framework developed in Modern C++ (C++17) with the goal of making it easy and quick to develop web applications using the C++ programming language, located at https://github.com/qicosmos/cinatra +cinatra is a high-performance, easy-to-use http framework developed in Modern C++ (C++20) with the goal of making it easy and quick to develop web applications using the C++ programming language, located at https://github.com/qicosmos/cinatra ## Testing Source Code -* [PLAINTEXT](cinatra_benchmark/main.cpp) +* [PLAINTEXT](example/benchmark.cpp) ## Test URLs diff --git a/frameworks/C++/cinatra/benchmark_config.json b/frameworks/C++/cinatra/benchmark_config.json index 9db843e9f98..ceba18e4486 100644 --- a/frameworks/C++/cinatra/benchmark_config.json +++ b/frameworks/C++/cinatra/benchmark_config.json @@ -1,23 +1,25 @@ { "framework": "cinatra", - "tests": [{ - "default": { - "plaintext_url": "/plaintext", - "port": 8090, - "approach": "Realistic", - "classification": "Fullstack", - "database": "None", - "framework": "cinatra", - "language": "C++", - "flavor": "None", - "orm": "None", - "platform": "None", - "webserver": "None", - "os": "Linux", - "database_os": "Linux", - "display_name": "cinatra", - "notes": "", - "versus": "cinatra" + "tests": [ + { + "default": { + "plaintext_url": "/plaintext", + "port": 8090, + "approach": "Realistic", + "classification": "Fullstack", + "database": "None", + "framework": "cinatra", + "language": "C++", + "flavor": "None", + "orm": "None", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "cinatra", + "notes": "", + "versus": "cinatra" + } } - }] -} + ] +} \ No newline at end of file diff --git a/frameworks/C++/cinatra/cinatra.dockerfile b/frameworks/C++/cinatra/cinatra.dockerfile index d3731c44673..fcda3f3b083 100644 --- a/frameworks/C++/cinatra/cinatra.dockerfile +++ b/frameworks/C++/cinatra/cinatra.dockerfile @@ -1,22 +1,11 @@ -FROM ubuntu:18.04 +FROM ubuntu:22.04 RUN apt-get update -yqq && \ apt-get install -yqq cmake git uuid-dev gcc g++ autoconf -ENV ASIO=/asio -ENV ASIO_INTERNAL=/asio/asio ENV CINATRA=/cinatra -ENV CINATRA_EXAMPLE=/cinatra/example -WORKDIR / -RUN git clone https://github.com/chriskohlhoff/asio.git -WORKDIR $ASIO -RUN git checkout 8087252a0c3c2f0baad96ddbd6554db17a846376 -WORKDIR $ASIO_INTERNAL -RUN ./autogen.sh && ./configure -RUN make && make install WORKDIR / RUN git clone https://github.com/qicosmos/cinatra.git WORKDIR $CINATRA -RUN git checkout 5acb35cd72c3f72512c0a55e7dea9e25d7779039 -WORKDIR $CINATRA_EXAMPLE -RUN mkdir build && cd build && cmake .. && make +RUN git checkout c9bec308e27174c8b7f0f01c92652509f7b47253 +RUN mkdir build && cd build && cmake .. && make -j EXPOSE 8090 -CMD ./build/cinatra_example +CMD ./build/example/benchmark \ No newline at end of file diff --git a/frameworks/C++/cinatra/cinatra_benchmark/CMakeLists.txt b/frameworks/C++/cinatra/cinatra_benchmark/CMakeLists.txt index 615d6fa46d1..8bd58c0c53e 100644 --- a/frameworks/C++/cinatra/cinatra_benchmark/CMakeLists.txt +++ b/frameworks/C++/cinatra/cinatra_benchmark/CMakeLists.txt @@ -5,61 +5,10 @@ include_directories($ENV{CINATRA_HOME}) if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest") else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread -msse4.2 -std=c++17") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread -std=c++20") endif () -SET(ENABLE_GZIP OFF) -SET(ENABLE_SSL OFF) -SET(ENABLE_CLIENT_SSL OFF) -SET(ENABLE_ASIO_STANDALONE ON) +add_executable(cinatra_example main.cpp) +target_compile_definitions(cinatra_example PRIVATE ASYNC_SIMPLE_HAS_NOT_AIO) -if (ENABLE_SSL) - add_definitions(-DCINATRA_ENABLE_SSL) - message(STATUS "Use SSL") -endif() - -if(ENABLE_GZIP) - add_definitions(-DCINATRA_ENABLE_GZIP) -endif() - -if(ENABLE_CLIENT_SSL) - add_definitions(-DCINATRA_ENABLE_CLIENT_SSL) -endif() - -if(ENABLE_ASIO_STANDALONE) - add_definitions(-DASIO_STANDALONE) -else() - find_package(Boost 1.60 REQUIRED COMPONENTS system) -endif() - -if (ENABLE_SSL) -find_package(OpenSSL REQUIRED) -endif() -if (ENABLE_CLIENT_SSL) - find_package(OpenSSL REQUIRED) -endif() - -if (ENABLE_GZIP) - find_package(ZLIB REQUIRED) -endif() - -set(CINATRA_EXAMPLE - main.cpp - ) - -add_executable(${project_name} ${CINATRA_EXAMPLE}) -include_directories(${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) - -target_link_libraries(${project_name} ${Boost_LIBRARIES} uuid -lstdc++fs) -if (ENABLE_SSL) - target_link_libraries(${project_name} ${OPENSSL_LIBRARIES} pthread -ldl) -endif() - -if (ENABLE_CLIENT_SSL) - target_link_libraries(${project_name} ${OPENSSL_LIBRARIES} pthread -ldl) -endif() - -if (ENABLE_GZIP) - target_link_libraries(${project_name} ${ZLIB_LIBRARIES}) -endif() install(TARGETS ${project_name} DESTINATION include) diff --git a/frameworks/C++/cinatra/cinatra_benchmark/main.cpp b/frameworks/C++/cinatra/cinatra_benchmark/main.cpp index 6d4e3fa30e9..a7ee33a846f 100644 --- a/frameworks/C++/cinatra/cinatra_benchmark/main.cpp +++ b/frameworks/C++/cinatra/cinatra_benchmark/main.cpp @@ -1,21 +1,15 @@ -#include #include +#include using namespace cinatra; +using namespace std::chrono_literals; int main() { - http_server server(std::thread::hardware_concurrency()); - bool r = server.listen("0.0.0.0", "8090"); - if (!r) { - std::cout << "listen failed\n"; - return -1; - } - - server.enable_timeout(false); - server.set_http_handler("/plaintext", [](request& req, response& res) { - res.set_status_and_content("Hello, World!"); - }); - - server.run(); - return 0; + coro_http_server server(std::thread::hardware_concurrency(), 8090); + server.set_http_handler( + "/plaintext", [](coro_http_request &req, coro_http_response &resp) { + resp.need_date_head(false); + resp.set_status_and_content(status_type::ok, "Hello, world!"); + }); + server.sync_start(); } diff --git a/frameworks/C++/just-boost/just-boost.dockerfile b/frameworks/C++/just-boost/just-boost.dockerfile index 0eb409e1ab9..32aba994393 100644 --- a/frameworks/C++/just-boost/just-boost.dockerfile +++ b/frameworks/C++/just-boost/just-boost.dockerfile @@ -1,14 +1,14 @@ # docker build --progress=plain --build-arg CXXFLAGS="-Wall" -t just-boost -f just-boost.dockerfile . # docker run --rm --name just-boost -p 8000:8000 -d just-boost # docker container stop just-boost -FROM alpine:3.18 +FROM alpine:3.19 ARG APP=just-boost ARG CXXFLAGS=-O3 ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 ENV BCPP_PG_CONN_STR="postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world" -ENV BCPP_N_THREADS=32 +#ENV BCPP_N_THREADS=0 # default 0 : number of cores WORKDIR /usr/src/${APP} diff --git a/frameworks/C++/just-boost/main.cpp b/frameworks/C++/just-boost/main.cpp index fc296da6837..caa15084aea 100644 --- a/frameworks/C++/just-boost/main.cpp +++ b/frameworks/C++/just-boost/main.cpp @@ -117,8 +117,6 @@ handle_target( http::request>&& req, PGconn* conn = nullptr) { - static std::string msg = "Hello, World!"; - //std::cout << "handle_target: " << req.target() << std::endl; http::response res{http::status::ok, req.version()}; res.set(http::field::server, BOOST_BEAST_VERSION_STRING); @@ -130,13 +128,13 @@ handle_target( { // {"message":"Hello, World!"} json::object obj; - obj["message"] = msg; + obj["message"] = "Hello, World!"; res.body() = json::serialize(obj); } else if (req.target() == "/plaintext") { res.set(http::field::content_type, "text/plain"); - res.body() = msg; + res.body() = "Hello, World!"; } else if (req.target() == "/db" || req.target().starts_with("/queries/")) { @@ -328,9 +326,10 @@ do_listen(tcp::endpoint endpoint) { std::rethrow_exception(e); } - catch (std::exception &e) { - std::cerr << "Error in session: " << e.what() << "\n"; - } + catch (std::exception&){} +// catch (std::exception &e) { +// std::cerr << "Error in session: " << e.what() << "\n"; +// } }); } @@ -339,7 +338,13 @@ int main(int argc, char* argv[]) { auto const address = net::ip::make_address(becpp::env("BCPP_ADDRESS", "0.0.0.0")); auto const port = static_cast(std::atoi(becpp::env("BCPP_PORT", "8000"))); - auto const threads = std::max(1, std::atoi(becpp::env("BCPP_N_THREADS", "3"))); + auto env_threads = std::atoi(becpp::env("BCPP_N_THREADS", "0")); + if (env_threads == 0) + { + env_threads = std::thread::hardware_concurrency(); + std::cout << "Using number of cores: " << env_threads << '\n'; + } + auto const threads = std::max(1, env_threads); std::cout << "__GNUG__=" << __GNUG__ << '\n'; std::cout << "__cplusplus=" << __cplusplus << '\n'; diff --git a/frameworks/C++/treefrog/controllers/worldcontroller.cpp b/frameworks/C++/treefrog/controllers/worldcontroller.cpp index 61068dcce9b..3f3f71d484d 100644 --- a/frameworks/C++/treefrog/controllers/worldcontroller.cpp +++ b/frameworks/C++/treefrog/controllers/worldcontroller.cpp @@ -3,6 +3,7 @@ #include "pworld.h" #include "mngworld.h" #include +#include void WorldController::index() @@ -246,17 +247,48 @@ void WorldController::cached_pqueries(const QString &num) void WorldController::pupdates(const QString &num) { + const QString statement("UPDATE world SET randomnumber = CASE id"); QVariantList worlds; + QString ids; + QString q = statement; + q.reserve(4096); int d = std::min(std::max(num.toInt(), 1), 500); PWorld world; + auto blkupdate = [&q, &ids, &statement]() { + if (!ids.isEmpty()) { + ids.chop(1); + q += QStringLiteral(" END WHERE id IN (%1)").arg(ids); + TSqlQuery query; + query.exec(q); + ids.clear(); + q = statement; + } + }; + for (int i = 0; i < d; ++i) { int id = Tf::random(1, 10000); world = PWorld::get(id); world.setRandomNumber( Tf::random(1, 10000) ); - world.update(); + q += QLatin1String(" WHEN "); + q += QString::number(world.id()); + q += QLatin1String(" THEN "); + q += QString::number(world.randomNumber()); + ids += QString::number(world.id()); + ids += ','; worlds << world.toVariantMap(); + + if (!((i + 1) % 200)) { + blkupdate(); + } } + + if (d == 1) { + world.update(); + } else { + blkupdate(); + } + renderJson(worlds); } diff --git a/frameworks/C++/treefrog/models/world.cpp b/frameworks/C++/treefrog/models/world.cpp index 13d65a7c97f..3c08e17e827 100644 --- a/frameworks/C++/treefrog/models/world.cpp +++ b/frameworks/C++/treefrog/models/world.cpp @@ -46,10 +46,7 @@ World &World::operator=(const World &other) bool World::update() { - TSqlQueryORMapper mapper; - mapper.prepare(QStringLiteral("UPDATE world SET randomNumber=? WHERE id=?")); - mapper.addBind(randomNumber()).addBind(id()); - return mapper.exec(); + return TAbstractModel::update(); } World World::create(int randomNumber) @@ -74,10 +71,8 @@ World World::create(const QVariantMap &values) World World::get(uint id) { - TSqlQueryORMapper mapper; - mapper.prepare(QStringLiteral("SELECT * from world WHERE id=?")); - mapper.addBind(id); - return World(mapper.execFirst()); + TSqlORMapper mapper; + return World(mapper.findByPrimaryKey(id)); } int World::count() diff --git a/frameworks/C++/treefrog/treefrog-epoll.dockerfile b/frameworks/C++/treefrog/treefrog-epoll.dockerfile index 0e962dc03be..9eb910f4e9d 100644 --- a/frameworks/C++/treefrog/treefrog-epoll.dockerfile +++ b/frameworks/C++/treefrog/treefrog-epoll.dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps:jammy ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NOWARNINGS yes -ENV TFVER=2.7.1 +ENV TFVER=2.8.0 RUN apt-get update -yqq && apt-get upgrade -yq && \ apt-get install -yqq --no-install-recommends software-properties-common unzip wget libjemalloc-dev \ diff --git a/frameworks/C++/treefrog/treefrog-mongodb.dockerfile b/frameworks/C++/treefrog/treefrog-mongodb.dockerfile index c930ee9449a..df5a3694cdf 100644 --- a/frameworks/C++/treefrog/treefrog-mongodb.dockerfile +++ b/frameworks/C++/treefrog/treefrog-mongodb.dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps:jammy ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NOWARNINGS yes -ENV TFVER=2.7.1 +ENV TFVER=2.8.0 RUN apt-get update -yqq && apt-get upgrade -yq && \ apt-get install -yqq --no-install-recommends software-properties-common unzip wget libjemalloc-dev \ diff --git a/frameworks/C++/treefrog/treefrog-mysql.dockerfile b/frameworks/C++/treefrog/treefrog-mysql.dockerfile index f0b263b6573..a9b6a7d4b2c 100644 --- a/frameworks/C++/treefrog/treefrog-mysql.dockerfile +++ b/frameworks/C++/treefrog/treefrog-mysql.dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps:jammy ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NOWARNINGS yes -ENV TFVER=2.7.1 +ENV TFVER=2.8.0 RUN apt-get update -yqq && apt-get upgrade -yq && \ apt-get install -yqq --no-install-recommends software-properties-common unzip wget libjemalloc-dev \ diff --git a/frameworks/C++/treefrog/treefrog.dockerfile b/frameworks/C++/treefrog/treefrog.dockerfile index c930ee9449a..df5a3694cdf 100644 --- a/frameworks/C++/treefrog/treefrog.dockerfile +++ b/frameworks/C++/treefrog/treefrog.dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps:jammy ENV DEBIAN_FRONTEND noninteractive ENV DEBCONF_NOWARNINGS yes -ENV TFVER=2.7.1 +ENV TFVER=2.8.0 RUN apt-get update -yqq && apt-get upgrade -yq && \ apt-get install -yqq --no-install-recommends software-properties-common unzip wget libjemalloc-dev \ diff --git a/frameworks/C++/userver/userver-bare.dockerfile b/frameworks/C++/userver/userver-bare.dockerfile index 4b1210c8fe2..59704d05f25 100644 --- a/frameworks/C++/userver/userver-bare.dockerfile +++ b/frameworks/C++/userver/userver-bare.dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/userver-framework/ubuntu-userver-build-base:v1 AS builder +FROM ghcr.io/userver-framework/ubuntu-userver-build-base:v2 AS builder RUN apt update && \ apt install -y lsb-release wget software-properties-common gnupg && \ @@ -6,15 +6,17 @@ RUN apt update && \ WORKDIR /src RUN git clone https://github.com/userver-framework/userver.git && \ - cd userver && git checkout 781169b63bdbc012f7d98ed045bff75ff1b0b70d + cd userver && git checkout c2ca5454f0b0e93dd0a2e082904dedda5cda3052 + COPY userver_benchmark/ ./ RUN mkdir build && cd build && \ cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \ - -DUSERVER_FEATURE_REDIS=0 -DUSERVER_FEATURE_CLICKHOUSE=0 -DUSERVER_FEATURE_MONGODB=0 -DUSERVER_FEATURE_RABBITMQ=0 -DUSERVER_FEATURE_GRPC=0 \ -DUSERVER_FEATURE_UTEST=0 \ -DUSERVER_FEATURE_POSTGRESQL=1 \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_C_FLAGS="-march=native" \ - -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 -DUSERVER_USE_LD=lld-16 .. && \ + -DUSERVER_FEATURE_ERASE_LOG_WITH_LEVEL=warning \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=native -flto=thin" -DCMAKE_C_FLAGS="-march=native -flto=thin" \ + -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 -DUSERVER_USE_LD=lld-16 \ + -DUSERVER_LTO=0 .. && \ make -j $(nproc) FROM builder AS runner diff --git a/frameworks/C++/userver/userver.dockerfile b/frameworks/C++/userver/userver.dockerfile index 0c39abe0130..667d7ebd96b 100644 --- a/frameworks/C++/userver/userver.dockerfile +++ b/frameworks/C++/userver/userver.dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/userver-framework/ubuntu-userver-build-base:v1 AS builder +FROM ghcr.io/userver-framework/ubuntu-userver-build-base:v2 AS builder RUN apt update && \ apt install -y lsb-release wget software-properties-common gnupg && \ @@ -6,15 +6,17 @@ RUN apt update && \ WORKDIR /src RUN git clone https://github.com/userver-framework/userver.git && \ - cd userver && git checkout 781169b63bdbc012f7d98ed045bff75ff1b0b70d + cd userver && git checkout c2ca5454f0b0e93dd0a2e082904dedda5cda3052 + COPY userver_benchmark/ ./ RUN mkdir build && cd build && \ cmake -DUSERVER_IS_THE_ROOT_PROJECT=0 -DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0 \ - -DUSERVER_FEATURE_REDIS=0 -DUSERVER_FEATURE_CLICKHOUSE=0 -DUSERVER_FEATURE_MONGODB=0 -DUSERVER_FEATURE_RABBITMQ=0 -DUSERVER_FEATURE_GRPC=0 \ -DUSERVER_FEATURE_UTEST=0 \ -DUSERVER_FEATURE_POSTGRESQL=1 \ - -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_C_FLAGS="-march=native" \ - -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 -DUSERVER_USE_LD=lld-16 .. && \ + -DUSERVER_FEATURE_ERASE_LOG_WITH_LEVEL=warning \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=native -flto=thin" -DCMAKE_C_FLAGS="-march=native -flto=thin" \ + -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 -DUSERVER_USE_LD=lld-16 \ + -DUSERVER_LTO=0 .. && \ make -j $(nproc) FROM builder AS runner diff --git a/frameworks/C++/userver/userver_benchmark/CMakeLists.txt b/frameworks/C++/userver/userver_benchmark/CMakeLists.txt index 777bce060b7..507550f5755 100644 --- a/frameworks/C++/userver/userver_benchmark/CMakeLists.txt +++ b/frameworks/C++/userver/userver_benchmark/CMakeLists.txt @@ -9,10 +9,10 @@ file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/bare/*.cpp ) -include(userver/cmake/SetupEnvironment.cmake) include(GNUInstallDirs) add_subdirectory(userver) +userver_setup_environment() add_executable(${PROJECT_NAME} ${SOURCES} userver_techempower.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE userver-core userver-postgresql) +target_link_libraries(${PROJECT_NAME} PRIVATE userver-core userver-postgresql userver-llhttp) diff --git a/frameworks/C++/userver/userver_benchmark/bare/simple_connection.cpp b/frameworks/C++/userver/userver_benchmark/bare/simple_connection.cpp index eb09af89945..bb6a5a1880f 100644 --- a/frameworks/C++/userver/userver_benchmark/bare/simple_connection.cpp +++ b/frameworks/C++/userver/userver_benchmark/bare/simple_connection.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "simple_server.hpp" @@ -11,83 +11,57 @@ #include #include #include +#include namespace userver_techempower::bare { namespace { -template -class SmallString final { - public: - SmallString() = default; - - void Append(const char* data, std::size_t length) { - const auto old_size = Size(); - data_.resize(old_size + length); - std::memcpy(Data() + old_size, data, length); - } - - void Append(std::string_view sw) { Append(sw.data(), sw.size()); } - - [[nodiscard]] std::string_view AsSw() const { return {Data(), Size()}; } - - [[nodiscard]] char* Data() { return data_.data(); } - [[nodiscard]] const char* Data() const { return data_.data(); } - - [[nodiscard]] std::size_t Size() const { return data_.size(); } - - void Clear() { data_.resize(0); } - - private: - boost::container::small_vector data_; -}; - struct HttpParser final { - http_parser parser{}; - http_parser_settings parser_settings{}; + llhttp_t parser{}; + llhttp_settings_t parser_settings{}; std::function on_request_cb{}; - SmallString<50> url; + userver::utils::SmallString<50> url; explicit HttpParser(std::function on_request_cb) : on_request_cb{std::move(on_request_cb)} { - http_parser_init(&parser, HTTP_REQUEST); - parser.data = this; - - http_parser_settings_init(&parser_settings); + llhttp_settings_init(&parser_settings); parser_settings.on_url = HttpOnUrl; parser_settings.on_message_begin = HttpOnMessageBegin; parser_settings.on_message_complete = HttpOnMessageComplete; + + llhttp_init(&parser, HTTP_REQUEST, &parser_settings); + parser.data = this; } - void Execute(const char* data, std::size_t length) { - http_parser_execute(&parser, &parser_settings, data, length); + auto Execute(const char* data, std::size_t length) { + return llhttp_execute(&parser, data, length); } - static int HttpOnUrl(http_parser* parser, const char* data, - std::size_t length) { + static int HttpOnUrl(llhttp_t* parser, const char* data, std::size_t length) { auto* self = static_cast(parser->data); - self->url.Append(data, length); + self->url.append(std::string_view{data, length}); return 0; } - static int HttpOnMessageBegin(http_parser* parser) { + static int HttpOnMessageBegin(llhttp_t* parser) { auto* self = static_cast(parser->data); - self->url.Clear(); + self->url.clear(); return 0; } - static int HttpOnMessageComplete(http_parser* parser) { + static int HttpOnMessageComplete(llhttp_t* parser) { auto* self = static_cast(parser->data); - self->on_request_cb(self->url.AsSw()); + self->on_request_cb(static_cast(self->url)); return 0; } }; class ResponseBuffers final { public: - using HeadersString = SmallString<200>; + using HeadersString = userver::utils::SmallString<200>; HeadersString& Next(userver::engine::io::Socket& socket, std::string&& body) { if (Size() == kMaxResponses) { @@ -104,19 +78,18 @@ class ResponseBuffers final { return; } - boost::container::small_vector - iovec(Size() * 2); + boost::container::small_vector io_vector( + Size() * 2); std::size_t index = 0; std::size_t total_size = 0; - for (const auto& response : responses_) { - iovec[index++] = {response.headers.Data(), response.headers.Size()}; - iovec[index++] = {response.body.data(), response.body.size()}; - total_size += response.headers.Size() + response.body.size(); + for (auto& response : responses_) { + io_vector[index++] = {response.headers.data(), response.headers.size()}; + io_vector[index++] = {response.body.data(), response.body.size()}; + total_size += response.headers.size() + response.body.size(); } - if (socket.SendAll(iovec.data(), iovec.size(), {}) != total_size) { + if (socket.SendAll(io_vector.data(), io_vector.size(), {}) != total_size) { throw std::runtime_error{"Socket closed by remote"}; } @@ -191,17 +164,17 @@ void SimpleConnection::Process() { const auto content_length_str = std::to_string(response.body.size()); auto& headers = buffers.Next(socket_, std::move(response.body)); - headers.Append(kCommonHeaders); - headers.Append("Content-Type: "); - headers.Append(response.content_type); + headers.append(kCommonHeaders); + headers.append("Content-Type: "); + headers.append(response.content_type); - headers.Append("\r\nContent-Length: "); - headers.Append(content_length_str); + headers.append("\r\nContent-Length: "); + headers.append(content_length_str); - headers.Append("\r\nDate: "); - headers.Append(GetCachedDate()); + headers.append("\r\nDate: "); + headers.append(GetCachedDate()); - headers.Append(kHeadersEnd); + headers.append(kHeadersEnd); }; HttpParser parser{handle_request}; @@ -218,8 +191,7 @@ void SimpleConnection::Process() { break; } - parser.Execute(buffer.data(), last_bytes_read); - if (parser.parser.http_errno != 0) { + if (parser.Execute(buffer.data(), last_bytes_read) != HPE_OK) { break; } diff --git a/frameworks/C++/userver/userver_benchmark/bare/simple_router.cpp b/frameworks/C++/userver/userver_benchmark/bare/simple_router.cpp index 61e634a95c3..dd7cf60636a 100644 --- a/frameworks/C++/userver/userver_benchmark/bare/simple_router.cpp +++ b/frameworks/C++/userver/userver_benchmark/bare/simple_router.cpp @@ -52,32 +52,32 @@ SimpleResponse SimpleRouter::RouteRequest(std::string_view url) const { } if (StartsWith(url, kJsonUrlPrefix)) { - return {ToString(json::Handler::GetResponse()), kContentTypeJson}; + return {json::Handler::GetResponse(), kContentTypeJson}; } if (StartsWith(url, kSingleQueryUrlPrefix)) { - return {ToString(single_query_.GetResponse()), kContentTypeJson}; + return {single_query_.GetResponse(), kContentTypeJson}; } if (StartsWith(url, kMultipleQueriesUrlPrefix)) { const auto queries = db_helpers::ParseParamFromQuery( url.substr(kMultipleQueriesUrlPrefix.size()), "queries"); - return {ToString(multiple_queries_.GetResponse(queries)), kContentTypeJson}; + return {multiple_queries_.GetResponse(queries), kContentTypeJson}; } if (StartsWith(url, kUpdatesUrlPrefix)) { const auto queries = db_helpers::ParseParamFromQuery( url.substr(kMultipleQueriesUrlPrefix.size()), "queries"); - return {ToString(updates_.GetResponse(queries)), kContentTypeJson}; + return {updates_.GetResponse(queries), kContentTypeJson}; } if (StartsWith(url, kCachedQueriesUrlPrefix)) { const auto count = db_helpers::ParseParamFromQuery( url.substr(kCachedQueriesUrlPrefix.size()), "count"); - return {ToString(cached_queries_.GetResponse(count)), kContentTypeJson}; + return {cached_queries_.GetResponse(count), kContentTypeJson}; } if (StartsWith(url, kFortunesUrlPrefix)) { diff --git a/frameworks/C++/userver/userver_benchmark/common/db_helpers.cpp b/frameworks/C++/userver/userver_benchmark/common/db_helpers.cpp index 899a2aaa87c..5403c01bd14 100644 --- a/frameworks/C++/userver/userver_benchmark/common/db_helpers.cpp +++ b/frameworks/C++/userver/userver_benchmark/common/db_helpers.cpp @@ -3,7 +3,6 @@ #include #include -#include #include namespace userver_techempower::db_helpers { @@ -30,10 +29,21 @@ int ParseFromQueryVal(std::string_view query_val) { userver::storages::postgres::Query CreateNonLoggingQuery( std::string statement) { return userver::storages::postgres::Query{ - statement, std::nullopt /* name */, + std::move(statement), std::nullopt /* name */, userver::storages::postgres::Query::LogMode::kNameOnly}; } +void WriteToStream(const WorldTableRow& row, + userver::formats::json::StringBuilder& sb) { + userver::formats::json::StringBuilder::ObjectGuard obj{sb}; + + sb.Key("id"); + WriteToStream(row.id, sb); + + sb.Key("randomNumber"); + WriteToStream(row.random_number, sb); +} + int GenerateRandomId() { return userver::utils::RandRange(1, kMaxWorldRows + 1); } @@ -42,13 +52,6 @@ int GenerateRandomValue() { return userver::utils::RandRange(1, kMaxWorldRows + 1); } -userver::formats::json::Value Serialize( - const WorldTableRow& value, - userver::formats::serialize::To) { - return userver::formats::json::MakeObject("id", value.id, "randomNumber", - value.random_number); -} - int ParseParamFromQuery(const userver::server::http::HttpRequest& request, const std::string& name) { const auto& arg_str = request.GetArg(name); diff --git a/frameworks/C++/userver/userver_benchmark/common/db_helpers.hpp b/frameworks/C++/userver/userver_benchmark/common/db_helpers.hpp index a4325c3b0fa..abed0a41cb4 100644 --- a/frameworks/C++/userver/userver_benchmark/common/db_helpers.hpp +++ b/frameworks/C++/userver/userver_benchmark/common/db_helpers.hpp @@ -1,9 +1,12 @@ #pragma once #include +#include #include +#include #include #include +#include #include namespace userver_techempower::db_helpers { @@ -18,6 +21,9 @@ const userver::storages::postgres::Query kSelectRowQuery = constexpr auto kClusterHostType = userver::storages::postgres::ClusterHostType::kMaster; +constexpr userver::storages::postgres::CommandControl kDefaultPgCC{ + std::chrono::seconds{7}, std::chrono::seconds{7}}; + constexpr std::string_view kDbComponentName = "hello-world-db"; struct WorldTableRow final { @@ -25,13 +31,12 @@ struct WorldTableRow final { int random_number; }; +void WriteToStream(const WorldTableRow& row, + userver::formats::json::StringBuilder& sb); + int GenerateRandomId(); int GenerateRandomValue(); -userver::formats::json::Value Serialize( - const WorldTableRow& value, - userver::formats::serialize::To); - int ParseParamFromQuery(const userver::server::http::HttpRequest& request, const std::string& name); diff --git a/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.cpp index 00b35f94434..305b429b8b8 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.cpp @@ -1,28 +1,30 @@ #include "handler.hpp" -#include - #include +#include +#include + namespace userver_techempower::cached_queries { Handler::Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context) - : userver::server::handlers::HttpHandlerJsonBase{config, context}, + : userver::server::handlers::HttpHandlerBase{config, context}, cache_{context.FindComponent()}, query_arg_name_{"count"} {} -userver::formats::json::Value Handler::HandleRequestJsonThrow( +std::string Handler::HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const { const auto queries = db_helpers::ParseParamFromQuery(request, query_arg_name_); + request.GetHttpResponse().SetHeader(userver::http::headers::kContentType, + "application/json"); return GetResponse(queries); } -userver::formats::json::Value Handler::GetResponse(int queries) const { +std::string Handler::GetResponse(int queries) const { boost::container::small_vector result( queries); @@ -31,7 +33,9 @@ userver::formats::json::Value Handler::GetResponse(int queries) const { std::generate(result.begin(), result.end(), [&cache] { return cache.at(db_helpers::GenerateRandomId()); }); - return userver::formats::json::ValueBuilder{result}.ExtractValue(); + userver::formats::json::StringBuilder sb{}; + WriteToStream(result, sb); + return sb.GetString(); } } // namespace userver_techempower::cached_queries diff --git a/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.hpp b/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.hpp index ca286985a3e..dbc187cbd15 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.hpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/cached_queries/handler.hpp @@ -1,24 +1,23 @@ #pragma once -#include +#include #include "world_cache_component.hpp" namespace userver_techempower::cached_queries { -class Handler final : public userver::server::handlers::HttpHandlerJsonBase { +class Handler final : public userver::server::handlers::HttpHandlerBase { public: static constexpr std::string_view kName = "cached-queries-handler"; Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context); - userver::formats::json::Value HandleRequestJsonThrow( + std::string HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const final; - userver::formats::json::Value GetResponse(int queries) const; + std::string GetResponse(int queries) const; private: const WorldCacheComponent& cache_; diff --git a/frameworks/C++/userver/userver_benchmark/controllers/fortunes/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/fortunes/handler.cpp index 4c7619bc86d..acdc0346eb1 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/fortunes/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/fortunes/handler.cpp @@ -147,7 +147,7 @@ std::string Handler::HandleRequestThrow( std::string Handler::GetResponse() const { const auto pg_result = [this] { const auto lock = semaphore_.Acquire(); - return pg_->Execute(db_helpers::kClusterHostType, + return pg_->Execute(db_helpers::kClusterHostType, db_helpers::kDefaultPgCC, select_all_fortunes_query_); }(); diff --git a/frameworks/C++/userver/userver_benchmark/controllers/json/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/json/handler.cpp index 390acc7c0cd..fd1c18a6bf4 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/json/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/json/handler.cpp @@ -1,16 +1,25 @@ #include "handler.hpp" +#include +#include + namespace userver_techempower::json { -userver::formats::json::Value Handler::HandleRequestJsonThrow( - const userver::server::http::HttpRequest&, - const userver::formats::json::Value&, +std::string Handler::HandleRequestThrow( + const userver::server::http::HttpRequest& request, userver::server::request::RequestContext&) const { + request.GetHttpResponse().SetHeader(userver::http::headers::kContentType, + "application/json"); return GetResponse(); } -userver::formats::json::Value Handler::GetResponse() { - return userver::formats::json::MakeObject("message", "Hello, World!"); +std::string Handler::GetResponse() { + const auto json = + userver::formats::json::MakeObject("message", "Hello, World!"); + + userver::formats::json::StringBuilder sb{}; + sb.WriteValue(json); + return sb.GetString(); } } // namespace userver_techempower::json diff --git a/frameworks/C++/userver/userver_benchmark/controllers/json/handler.hpp b/frameworks/C++/userver/userver_benchmark/controllers/json/handler.hpp index 7771a94863b..224d9c457fe 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/json/handler.hpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/json/handler.hpp @@ -1,21 +1,20 @@ #pragma once -#include +#include namespace userver_techempower::json { -class Handler final : public userver::server::handlers::HttpHandlerJsonBase { +class Handler final : public userver::server::handlers::HttpHandlerBase { public: static constexpr std::string_view kName = "json-handler"; - using HttpHandlerJsonBase::HttpHandlerJsonBase; + using HttpHandlerBase::HttpHandlerBase; - userver::formats::json::Value HandleRequestJsonThrow( + std::string HandleRequestThrow( const userver::server::http::HttpRequest&, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const final; - static userver::formats::json::Value GetResponse(); + static std::string GetResponse(); }; } // namespace userver_techempower::json diff --git a/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.cpp index 19438c0ae6b..48ff33684e1 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -16,7 +17,7 @@ constexpr std::size_t kBestConcurrencyWildGuess = 256; Handler::Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context) - : userver::server::handlers::HttpHandlerJsonBase{config, context}, + : userver::server::handlers::HttpHandlerBase{config, context}, pg_{context .FindComponent( db_helpers::kDbComponentName) @@ -24,36 +25,41 @@ Handler::Handler(const userver::components::ComponentConfig& config, query_arg_name_{"queries"}, semaphore_{kBestConcurrencyWildGuess} {} -userver::formats::json::Value Handler::HandleRequestJsonThrow( +std::string Handler::HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const { const auto queries = db_helpers::ParseParamFromQuery(request, query_arg_name_); + request.GetHttpResponse().SetHeader(userver::http::headers::kContentType, + "application/json"); return GetResponse(queries); } -userver::formats::json::Value Handler::GetResponse(int queries) const { - boost::container::small_vector result(queries); - for (auto& value : result) { - value.id = db_helpers::GenerateRandomId(); - } - - { +std::string Handler::GetResponse(int queries) const { + const auto db_result = [this, queries] { const auto lock = semaphore_.Acquire(); - auto trx = pg_->Begin(db_helpers::kClusterHostType, {}); - for (auto& value : result) { - value.random_number = trx.Execute(db_helpers::kSelectRowQuery, value.id) - .AsSingleRow( - userver::storages::postgres::kRowTag) - .random_number; + auto query_queue = pg_->CreateQueryQueue(db_helpers::kClusterHostType, + db_helpers::kDefaultPgCC.execute); + query_queue.Reserve(queries); + for (std::size_t i = 0; i < static_cast(queries); ++i) { + query_queue.Push(db_helpers::kDefaultPgCC, db_helpers::kSelectRowQuery, + db_helpers::GenerateRandomId()); } - trx.Commit(); + + return query_queue.Collect(db_helpers::kDefaultPgCC.execute); + }(); + + boost::container::small_vector result(queries); + for (std::size_t i = 0; i < static_cast(queries); ++i) { + result[i] = db_result[i].AsSingleRow( + userver::storages::postgres::kRowTag); } - return userver::formats::json::ValueBuilder{result}.ExtractValue(); + userver::formats::json::StringBuilder sb{}; + WriteToStream(result, sb); + return sb.GetString(); } } // namespace userver_techempower::multiple_queries diff --git a/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.hpp b/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.hpp index a96de194546..55d227cc5f6 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.hpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/multiple_queries/handler.hpp @@ -2,24 +2,23 @@ #include "../../common/db_helpers.hpp" -#include +#include #include namespace userver_techempower::multiple_queries { -class Handler final : public userver::server::handlers::HttpHandlerJsonBase { +class Handler final : public userver::server::handlers::HttpHandlerBase { public: static constexpr std::string_view kName = "multiple-queries-handler"; Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context); - userver::formats::json::Value HandleRequestJsonThrow( + std::string HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const final; - userver::formats::json::Value GetResponse(int queries) const; + std::string GetResponse(int queries) const; private: const userver::storages::postgres::ClusterPtr pg_; diff --git a/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.cpp index a6547041b83..3730af8c54a 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.cpp @@ -1,6 +1,7 @@ #include "handler.hpp" #include +#include #include namespace userver_techempower::single_query { @@ -13,31 +14,34 @@ constexpr std::size_t kBestConcurrencyWildGuess = 256; Handler::Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context) - : userver::server::handlers::HttpHandlerJsonBase{config, context}, + : userver::server::handlers::HttpHandlerBase{config, context}, pg_{context .FindComponent( db_helpers::kDbComponentName) .GetCluster()}, semaphore_{kBestConcurrencyWildGuess} {} -userver::formats::json::Value Handler::HandleRequestJsonThrow( - const userver::server::http::HttpRequest&, - const userver::formats::json::Value&, +std::string Handler::HandleRequestThrow( + const userver::server::http::HttpRequest& request, userver::server::request::RequestContext&) const { + request.GetHttpResponse().SetHeader(userver::http::headers::kContentType, + "application/json"); return GetResponse(); } -userver::formats::json::Value Handler::GetResponse() const { +std::string Handler::GetResponse() const { const auto row = [this] { const auto lock = semaphore_.Acquire(); return pg_ - ->Execute(db_helpers::kClusterHostType, db_helpers::kSelectRowQuery, - db_helpers::GenerateRandomId()) + ->Execute(db_helpers::kClusterHostType, db_helpers::kDefaultPgCC, + db_helpers::kSelectRowQuery, db_helpers::GenerateRandomId()) .AsSingleRow( userver::storages::postgres::kRowTag); }(); - return db_helpers::Serialize(row, {}); + userver::formats::json::StringBuilder sb{}; + WriteToStream(row, sb); + return sb.GetString(); } } // namespace userver_techempower::single_query diff --git a/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.hpp b/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.hpp index 1352d3c373a..1ae92801d3f 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.hpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/single_query/handler.hpp @@ -2,25 +2,24 @@ #include "../../common/db_helpers.hpp" -#include +#include #include namespace userver_techempower::single_query { -class Handler final : public userver::server::handlers::HttpHandlerJsonBase { +class Handler final : public userver::server::handlers::HttpHandlerBase { public: static constexpr std::string_view kName = "single-query-handler"; Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context); - userver::formats::json::Value HandleRequestJsonThrow( + std::string HandleRequestThrow( const userver::server::http::HttpRequest&, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const final; - userver::formats::json::Value GetResponse() const; + std::string GetResponse() const; private: const userver::storages::postgres::ClusterPtr pg_; diff --git a/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.cpp b/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.cpp index 4bf62bf645e..6b0e975e839 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.cpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.cpp @@ -2,10 +2,20 @@ #include #include +#include #include #include +namespace userver::storages::postgres::io::traits { + +// Hijack userver's whitelist of allowed containers +template +struct IsCompatibleContainer> + : std::true_type {}; + +} // namespace userver::storages::postgres::io::traits + namespace userver_techempower::updates { namespace { @@ -26,59 +36,63 @@ constexpr std::size_t kBestConcurrencyWildGuess = 128; Handler::Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context) - : userver::server::handlers::HttpHandlerJsonBase{config, context}, + : userver::server::handlers::HttpHandlerBase{config, context}, pg_{context.FindComponent("hello-world-db") .GetCluster()}, query_arg_name_{"queries"}, update_query_{db_helpers::CreateNonLoggingQuery(kUpdateQueryStr)}, semaphore_{kBestConcurrencyWildGuess} {} -userver::formats::json::Value Handler::HandleRequestJsonThrow( +std::string Handler::HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const { const auto queries = db_helpers::ParseParamFromQuery(request, query_arg_name_); + request.GetHttpResponse().SetHeader(userver::http::headers::kContentType, + "application/json"); return GetResponse(queries); } -userver::formats::json::Value Handler::GetResponse(int queries) const { - // userver's PG doesn't accept boost::small_vector as an input, sadly - std::vector values(queries); - for (auto& value : values) { - value.id = db_helpers::GenerateRandomId(); +std::string Handler::GetResponse(int queries) const { + boost::container::small_vector ids(queries); + for (auto& id : ids) { + id = db_helpers::GenerateRandomId(); } // we have to sort ids to not deadlock in update - std::sort(values.begin(), values.end(), - [](const auto& lhs, const auto& rhs) { return lhs.id < rhs.id; }); + std::sort(ids.begin(), ids.end(), + [](const auto& lhs, const auto& rhs) { return lhs < rhs; }); - boost::container::small_vector result; + boost::container::small_vector values(queries); + for (auto& value : values) { + value = db_helpers::GenerateRandomValue(); + } - { + const auto db_results = [this, &ids, &values] { const auto lock = semaphore_.Acquire(); - auto trx = pg_->Begin(db_helpers::kClusterHostType, {}); - for (auto& value : values) { - value.random_number = trx.Execute(db_helpers::kSelectRowQuery, value.id) - .AsSingleRow( - userver::storages::postgres::kRowTag) - .random_number; + auto query_queue = pg_->CreateQueryQueue(db_helpers::kClusterHostType, + db_helpers::kDefaultPgCC.execute); + query_queue.Reserve(ids.size() + 1 /* for the update query */); + for (const auto id : ids) { + query_queue.Push(db_helpers::kDefaultPgCC, db_helpers::kSelectRowQuery, + id); } - // We copy values here (and hope compiler optimizes it into one memcpy call) - // to not serialize into json within transaction - result.assign(values.begin(), values.end()); + query_queue.Push(db_helpers::kDefaultPgCC, update_query_, ids, values); - for (auto& value : values) { - value.random_number = db_helpers::GenerateRandomValue(); - } + return query_queue.Collect(db_helpers::kDefaultPgCC.execute); + }(); - trx.ExecuteDecomposeBulk(update_query_, values, values.size()); - trx.Commit(); + boost::container::small_vector result(queries); + for (std::size_t i = 0; i < result.size(); ++i) { + result[i] = db_results[i].AsSingleRow( + userver::storages::postgres::kRowTag); } - return userver::formats::json::ValueBuilder{values}.ExtractValue(); + userver::formats::json::StringBuilder sb{}; + WriteToStream(result, sb); + return sb.GetString(); } } // namespace userver_techempower::updates diff --git a/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.hpp b/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.hpp index 15d6d0d29b0..d2a70884aad 100644 --- a/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.hpp +++ b/frameworks/C++/userver/userver_benchmark/controllers/updates/handler.hpp @@ -2,25 +2,24 @@ #include "../../common/db_helpers.hpp" -#include +#include #include #include namespace userver_techempower::updates { -class Handler final : public userver::server::handlers::HttpHandlerJsonBase { +class Handler final : public userver::server::handlers::HttpHandlerBase { public: static constexpr std::string_view kName = "updates-handler"; Handler(const userver::components::ComponentConfig& config, const userver::components::ComponentContext& context); - userver::formats::json::Value HandleRequestJsonThrow( + std::string HandleRequestThrow( const userver::server::http::HttpRequest& request, - const userver::formats::json::Value&, userver::server::request::RequestContext&) const final; - userver::formats::json::Value GetResponse(int queries) const; + std::string GetResponse(int queries) const; private: const userver::storages::postgres::ClusterPtr pg_; diff --git a/frameworks/C++/userver/userver_benchmark/userver_techempower.cpp b/frameworks/C++/userver/userver_benchmark/userver_techempower.cpp index 4b7dda0e2ae..6e994d3021c 100644 --- a/frameworks/C++/userver/userver_benchmark/userver_techempower.cpp +++ b/frameworks/C++/userver/userver_benchmark/userver_techempower.cpp @@ -4,6 +4,7 @@ #include +#include #include #include #include @@ -45,6 +46,20 @@ class NoopTracingManager final userver::server::http::HttpResponse&) const final {} }; +class MinimalMiddlewarePipelineBuilder final + : public userver::server::middlewares::PipelineBuilder { + public: + static constexpr std::string_view kName{ + "minimal-middleware-pipeline-builder"}; + using userver::server::middlewares::PipelineBuilder::PipelineBuilder; + + private: + userver::server::middlewares::MiddlewaresList BuildPipeline( + userver::server::middlewares::MiddlewaresList) const override { + return {"userver-unknown-exceptions-handling-middleware"}; + } +}; + int Main(int argc, char* argv[]) { auto component_list = userver::components::MinimalServerComponentList() @@ -63,8 +78,9 @@ int Main(int argc, char* argv[]) { .Append() // cache component .Append() .Append() - // tracing tweaks + // tracing and metrics tweaks .Append() + .Append() // bare .Append() .Append(); diff --git a/frameworks/C++/userver/userver_configs/static_config.yaml b/frameworks/C++/userver/userver_configs/static_config.yaml index b4fad14911f..b34b772237b 100644 --- a/frameworks/C++/userver/userver_configs/static_config.yaml +++ b/frameworks/C++/userver/userver_configs/static_config.yaml @@ -29,6 +29,7 @@ components_manager: handler-defaults: set_tracing_headers: false server-name: us + middleware-pipeline-builder: minimal-middleware-pipeline-builder simple-router: simple-server: port: 8081 @@ -62,6 +63,7 @@ components_manager: noop-tracing-manager: tracing-manager-locator: component-name: noop-tracing-manager + minimal-middleware-pipeline-builder: plaintext-handler: path: /plaintext @@ -83,6 +85,7 @@ components_manager: max_queue_size: 512 connecting_limit: 15 ignore_unused_query_params: true + connlimit_mode: manual single-query-handler: path: /db diff --git a/frameworks/C/h2o/h2o.dockerfile b/frameworks/C/h2o/h2o.dockerfile index 8a04c410cac..86ae416dd77 100644 --- a/frameworks/C/h2o/h2o.dockerfile +++ b/frameworks/C/h2o/h2o.dockerfile @@ -13,6 +13,7 @@ RUN apt-get -yqq update && \ curl \ flex \ g++ \ + libbpfcc-dev \ libbrotli-dev \ libcap-dev \ libicu-dev \ @@ -26,11 +27,12 @@ RUN apt-get -yqq update && \ libz-dev \ make \ ninja-build \ - patch \ pkg-config \ + rsync \ + ruby \ systemtap-sdt-dev -ARG H2O_VERSION=13ba727ad12dfb2338165d2bcfb2136457e33c8a +ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc WORKDIR /tmp/h2o-build RUN curl -LSs "https://github.com/h2o/h2o/archive/${H2O_VERSION}.tar.gz" | \ @@ -40,6 +42,7 @@ RUN curl -LSs "https://github.com/h2o/h2o/archive/${H2O_VERSION}.tar.gz" | \ -DCMAKE_AR=/usr/bin/gcc-ar \ -DCMAKE_C_FLAGS="-flto -march=native -mtune=native" \ -DCMAKE_RANLIB=/usr/bin/gcc-ranlib \ + -DWITH_MRUBY=on \ -G Ninja \ -S . && \ cmake --build build -j && \ @@ -54,13 +57,11 @@ RUN curl -LSs "https://github.com/x86-64/mustache-c/archive/${MUSTACHE_C_REVISIO CFLAGS="-flto -march=native -mtune=native -O3" ./autogen.sh && \ make -j "$(nproc)" install -ARG POSTGRESQL_VERSION=c1ec02be1d79eac95160dea7ced32ace84664617 +ARG POSTGRESQL_VERSION=a37bb7c13995b834095d9d064cad1023a6f99b10 WORKDIR /tmp/postgresql-build RUN curl -LSs "https://github.com/postgres/postgres/archive/${POSTGRESQL_VERSION}.tar.gz" | \ tar --strip-components=1 -xz && \ - curl -LSs "https://www.postgresql.org/message-id/attachment/152078/v5-0001-Add-PQsendPipelineSync-to-libpq.patch" | \ - patch -Np1 && \ CFLAGS="-flto -march=native -mtune=native -O3" ./configure \ --includedir=/usr/local/include/postgresql \ --prefix=/usr/local \ @@ -106,7 +107,6 @@ CMD ["taskset", \ "-a20", \ "-d", \ "dbname=hello_world host=tfb-database password=benchmarkdbpass sslmode=disable user=benchmarkdbuser", \ - "-e256", \ "-f", \ "/opt/h2o_app/share/h2o_app/template", \ "-m1"] diff --git a/frameworks/C/h2o/src/handlers/world.c b/frameworks/C/h2o/src/handlers/world.c index 0a7aaf1d813..5528ddb75c4 100644 --- a/frameworks/C/h2o/src/handlers/world.c +++ b/frameworks/C/h2o/src/handlers/world.c @@ -238,7 +238,7 @@ static int do_multiple_queries(bool do_update, bool use_cache, h2o_req_t *req) // MAX_QUERIES is a relatively small number, so assume no overflow in the following // arithmetic operations. - assert(num_query <= MAX_QUERIES); + assert(num_query && num_query <= MAX_QUERIES); size_t base_size = offsetof(multiple_query_ctx_t, res) + num_query * sizeof(query_result_t); @@ -246,8 +246,16 @@ static int do_multiple_queries(bool do_update, bool use_cache, h2o_req_t *req) base_size = base_size * _Alignof(query_param_t); const config_t * const config = ctx->global_thread_data->config; - const size_t num_query_in_progress = - MIN(num_query, config->max_db_conn_num * config->max_pipeline_query_num); + size_t num_query_in_progress = config->max_db_conn_num * config->max_pipeline_query_num; + + if (num_query_in_progress < config->max_db_conn_num || + num_query_in_progress < config->max_pipeline_query_num) + num_query_in_progress = num_query; + else + num_query_in_progress = MIN(num_query, num_query_in_progress); + + assert(num_query_in_progress); + size_t sz = base_size + num_query_in_progress * sizeof(query_param_t); if (do_update) { diff --git a/frameworks/C/h2o/src/main.c b/frameworks/C/h2o/src/main.c index db598523cce..f393b006542 100644 --- a/frameworks/C/h2o/src/main.c +++ b/frameworks/C/h2o/src/main.c @@ -176,10 +176,10 @@ static int parse_options(int argc, char *argv[], config_t *config) do { \ errno = 0; \ \ - const long long n = strtoll(optarg, NULL, 10); \ + const long n = strtol(optarg, NULL, 10); \ \ if (errno) { \ - print_library_error(__FILE__, __LINE__, "strtoll", errno); \ + print_library_error(__FILE__, __LINE__, "strtol", errno); \ return 1; \ } \ \ diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile new file mode 100644 index 00000000000..a114ee58727 --- /dev/null +++ b/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile @@ -0,0 +1,17 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +RUN apt-get update +RUN apt-get -yqq install clang zlib1g-dev +WORKDIR /app +COPY src/Platform . +RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql /p:PublishAot=true /p:OptimizationPreference=Speed /p:GarbageCollectionAdaptationMode=0 + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime +ENV URLS http://+:8080 + +WORKDIR /app +COPY --from=build /app/out ./ +COPY appsettings.postgresql.json ./appsettings.json + +EXPOSE 8080 + +ENTRYPOINT ["./Platform"] diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile index 0a6f94bd171..5ab25aa2bb9 100644 --- a/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile +++ b/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.100-rc.2 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY src/Minimal . RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-rc.2 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime ENV URLS http://+:8080 WORKDIR /app diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile index ae592c1e2ed..b0d126973cb 100644 --- a/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.100-rc.2 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY src/Mvc . RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-rc.2 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime ENV URLS http://+:8080 WORKDIR /app diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile index 628eb43c57b..505414aa173 100644 --- a/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile +++ b/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.100-rc.2 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY src/Platform . RUN dotnet publish -c Release -o out /p:DatabaseProvider=MySqlConnector -FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-rc.2 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime ENV URLS http://+:8080 WORKDIR /app diff --git a/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile index 90409f3b188..5a846103428 100644 --- a/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile +++ b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile @@ -1,11 +1,10 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0.100-rc.2 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY src/Platform . RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql -FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-rc.2 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime ENV URLS http://+:8080 -ENV DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS 1 WORKDIR /app COPY --from=build /app/out ./ diff --git a/frameworks/CSharp/aspnetcore/benchmark_config.json b/frameworks/CSharp/aspnetcore/benchmark_config.json index c8452e6ddf0..426f94ea5f7 100644 --- a/frameworks/CSharp/aspnetcore/benchmark_config.json +++ b/frameworks/CSharp/aspnetcore/benchmark_config.json @@ -25,6 +25,28 @@ "display_name": "ASP.NET Core [Platform, Pg]", "notes": "" }, + "aot": { + "plaintext_url": "/plaintext", + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries/", + "update_url": "/updates/", + "cached_query_url": "/cached-worlds/", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "Postgres", + "framework": "ASP.NET Core", + "language": "C#", + "orm": "Raw", + "platform": ".NET", + "flavor": "NativeAOT", + "webserver": "Kestrel", + "os": "Linux", + "database_os": "Linux", + "display_name": "ASP.NET Core [Platform, Pg, AOT]", + "notes": "" + }, "minimal": { "plaintext_url": "/plaintext", "json_url": "/json", diff --git a/frameworks/CSharp/aspnetcore/config.toml b/frameworks/CSharp/aspnetcore/config.toml index 46fdecb59c6..9ba1398034c 100644 --- a/frameworks/CSharp/aspnetcore/config.toml +++ b/frameworks/CSharp/aspnetcore/config.toml @@ -19,6 +19,23 @@ platform = ".NET" webserver = "Kestrel" versus = "None" +[aot] +urls.plaintext = "/plaintext" +urls.json = "/json" +urls.db = "/db" +urls.query = "/queries/" +urls.update = "/updates/" +urls.cached_query = "/cached-worlds/" +approach = "Realistic" +classification = "Platform" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = ".NET" +webserver = "Kestrel" +versus = "None" + [minimal] urls.plaintext = "/plaintext" urls.json = "/json" diff --git a/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj b/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj index d0262bd6d69..5ee139c7d58 100644 --- a/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj +++ b/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.Fortunes.cs b/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.Fortunes.cs index 5550be2c495..52a0939559c 100644 --- a/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.Fortunes.cs +++ b/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.Fortunes.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if !AOT using System.IO.Pipelines; using System.Runtime.CompilerServices; using System.Threading.Tasks; @@ -64,3 +65,4 @@ private static void EndTemplateRendering(ChunkedBufferWriter chun template.Dispose(); } } +#endif diff --git a/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.cs b/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.cs index 1d7810c2ebc..e256e958c75 100644 --- a/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.cs +++ b/frameworks/CSharp/aspnetcore/src/Platform/BenchmarkApplication.cs @@ -10,7 +10,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.Extensions.ObjectPool; +#if !AOT using RazorSlices; +#endif namespace PlatformBenchmarks { @@ -54,10 +56,12 @@ public bool Return(ChunkedBufferWriter writer) } } +#if !AOT #if NPGSQL private readonly static SliceFactory> FortunesTemplateFactory = RazorSlice.ResolveSliceFactory>("/Templates/FortunesUtf8.cshtml"); #else private readonly static SliceFactory> FortunesTemplateFactory = RazorSlice.ResolveSliceFactory>("/Templates/FortunesUtf16.cshtml"); +#endif #endif [ThreadStatic] @@ -163,7 +167,9 @@ private bool ProcessRequest(ref BufferWriter writer) private Task ProcessRequestAsync() => _requestType switch { +#if !AOT RequestType.FortunesRaw => FortunesRaw(Writer), +#endif RequestType.SingleQuery => SingleQuery(Writer), RequestType.Caching => Caching(Writer, _queries), RequestType.Updates => Updates(Writer, _queries), diff --git a/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj b/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj index c826ee1320b..fb4d0bf7014 100644 --- a/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj +++ b/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj @@ -6,6 +6,7 @@ true preview 38063504-d08c-495a-89c9-daaad2f60f31 + AOT;$(DefineConstants) @@ -18,10 +19,14 @@ - - - - + + + + + + $(MSBuildThisFileDirectory)Templates/**;$(DefaultItemExcludes) + + diff --git a/frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj b/frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj index d93151d2ee7..f3b5211caa5 100644 --- a/frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj +++ b/frameworks/CSharp/fastendpoints/Benchmarks/Benchmarks.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable CA2016;IDE1006 diff --git a/frameworks/CSharp/fastendpoints/README.md b/frameworks/CSharp/fastendpoints/README.md index 8e0f978fdf5..327f2749ab1 100644 --- a/frameworks/CSharp/fastendpoints/README.md +++ b/frameworks/CSharp/fastendpoints/README.md @@ -5,11 +5,11 @@ This includes tests for plaintext and json serialization. **Language** -* C# 10.0 +* C# 12.0 **Platforms** -* .NET Core (Windows and Linux) +* .NET 8 (Windows and Linux) **Web Servers** @@ -18,7 +18,7 @@ This includes tests for plaintext and json serialization. **Web Stack** * [FastEndpoints](https://fast-endpoints.com/) -* ASP.Net 6 +* ASP.NET 8 ## Paths & Source for Tests diff --git a/frameworks/CSharp/fastendpoints/fastendpoints.dockerfile b/frameworks/CSharp/fastendpoints/fastendpoints.dockerfile index e7e53b5d27b..08419edaf8f 100644 --- a/frameworks/CSharp/fastendpoints/fastendpoints.dockerfile +++ b/frameworks/CSharp/fastendpoints/fastendpoints.dockerfile @@ -1,16 +1,12 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY Benchmarks . RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime WORKDIR /app COPY --from=build /app/out ./ -ENV DOTNET_TieredPGO 1 -ENV DOTNET_TC_QuickJitForLoops 1 -ENV DOTNET_ReadyToRun 0 - EXPOSE 8080 ENTRYPOINT ["dotnet", "Benchmarks.dll"] \ No newline at end of file diff --git a/frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj b/frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj index f6ba3053312..4df8fb3e39a 100644 --- a/frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj +++ b/frameworks/CSharp/genhttp/Benchmarks/Benchmarks.csproj @@ -2,7 +2,7 @@ - net7.0 + net8.0 10.0 GenHTTP Benchmarks @@ -12,7 +12,7 @@ Exe true - true + true @@ -28,12 +28,12 @@ - - - + + + - - + + diff --git a/frameworks/CSharp/genhttp/Benchmarks/Tests/FortuneHandler.cs b/frameworks/CSharp/genhttp/Benchmarks/Tests/FortuneHandler.cs index d53b3f1328b..6add5edbaeb 100644 --- a/frameworks/CSharp/genhttp/Benchmarks/Tests/FortuneHandler.cs +++ b/frameworks/CSharp/genhttp/Benchmarks/Tests/FortuneHandler.cs @@ -88,7 +88,7 @@ public async ValueTask PrepareAsync() public ValueTask CalculateChecksumAsync() => new(17); - public IEnumerable GetContent(IRequest request) => Enumerable.Empty(); + public IAsyncEnumerable GetContentAsync(IRequest request) => AsyncEnumerable.Empty(); public ValueTask RenderAsync(TemplateModel model) => Template.RenderAsync(model); diff --git a/frameworks/CSharp/genhttp/Benchmarks/Utilities/ServerHeaderConcern.cs b/frameworks/CSharp/genhttp/Benchmarks/Utilities/ServerHeaderConcern.cs index d4020d4fd7e..28b3bee2ba7 100644 --- a/frameworks/CSharp/genhttp/Benchmarks/Utilities/ServerHeaderConcern.cs +++ b/frameworks/CSharp/genhttp/Benchmarks/Utilities/ServerHeaderConcern.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using GenHTTP.Api.Content; @@ -31,7 +32,7 @@ public ServerHeaderConcern(IHandler parent, Func contentFact #region Functionality - public IEnumerable GetContent(IRequest request) => Content.GetContent(request); + public IAsyncEnumerable GetContentAsync(IRequest request) => Content.GetContentAsync(request); public ValueTask PrepareAsync() => Content.PrepareAsync(); diff --git a/frameworks/CSharp/genhttp/genhttp.dockerfile b/frameworks/CSharp/genhttp/genhttp.dockerfile index 5cfddc0ccff..4331fd966f8 100644 --- a/frameworks/CSharp/genhttp/genhttp.dockerfile +++ b/frameworks/CSharp/genhttp/genhttp.dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app COPY Benchmarks . RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/runtime:7.0 AS runtime +FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime ENV DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS 1 # Full PGO diff --git a/frameworks/CSharp/reaper/README.md b/frameworks/CSharp/reaper/README.md new file mode 100755 index 00000000000..c524f6af577 --- /dev/null +++ b/frameworks/CSharp/reaper/README.md @@ -0,0 +1,17 @@ +# Reaper Benchmarking Test + +[Reaper](https://github.com/Reaper-Net/Reaper) is a .NET 8+ Source Generator-based REPR pattern API endpoint library. + +### Test Type Implementation Source Code + +* [JSON](src/Benchmark/JsonEndpoint.cs) +* [PLAINTEXT](src/Benchmark/PlainTextEndpoint.cs) + +## Test URLs +### JSON + +http://localhost:8080/json + +### PLAINTEXT + +http://localhost:8080/plaintext \ No newline at end of file diff --git a/frameworks/CSharp/reaper/ReaperTechEmpower.sln b/frameworks/CSharp/reaper/ReaperTechEmpower.sln new file mode 100644 index 00000000000..91fcb8bab43 --- /dev/null +++ b/frameworks/CSharp/reaper/ReaperTechEmpower.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmark", "src\Benchmark\Benchmark.csproj", "{F7BCAEA7-516A-4D65-915C-F9A43C6E875D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F7BCAEA7-516A-4D65-915C-F9A43C6E875D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7BCAEA7-516A-4D65-915C-F9A43C6E875D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7BCAEA7-516A-4D65-915C-F9A43C6E875D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7BCAEA7-516A-4D65-915C-F9A43C6E875D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/frameworks/CSharp/reaper/benchmark_config.json b/frameworks/CSharp/reaper/benchmark_config.json new file mode 100755 index 00000000000..586e8f8d6c2 --- /dev/null +++ b/frameworks/CSharp/reaper/benchmark_config.json @@ -0,0 +1,26 @@ +{ + "framework": "reaper", + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "framework": "Reaper", + "language": "C#", + "flavor": "CoreCLR", + "orm": "None", + "platform": ".NET", + "webserver": "Kestrel", + "os": "Linux", + "database_os": "Linux", + "display_name": "Reaper [aot,slim]", + "notes": "", + "versus": "aspnetcore-minimal" + } + } + ] +} diff --git a/frameworks/CSharp/reaper/reaper.dockerfile b/frameworks/CSharp/reaper/reaper.dockerfile new file mode 100644 index 00000000000..1e8171b8dd4 --- /dev/null +++ b/frameworks/CSharp/reaper/reaper.dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY src . +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + clang zlib1g-dev +WORKDIR "/src/Benchmark" +RUN dotnet publish "Benchmark.csproj" -c Release -o /app/publish + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +EXPOSE 8080 +COPY --from=build /app/publish . +ENTRYPOINT ["./Benchmark"] diff --git a/frameworks/CSharp/reaper/src/Benchmark/Benchmark.csproj b/frameworks/CSharp/reaper/src/Benchmark/Benchmark.csproj new file mode 100644 index 00000000000..e0e1ed8ee20 --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/Benchmark.csproj @@ -0,0 +1,25 @@ + + + + net8.0 + enable + enable + Linux + true + $(InterceptorsPreviewNamespaces);Reaper.Generated + true + Speed + + + + + .dockerignore + + + + + + + + + diff --git a/frameworks/CSharp/reaper/src/Benchmark/JsonEndpoint.cs b/frameworks/CSharp/reaper/src/Benchmark/JsonEndpoint.cs new file mode 100644 index 00000000000..26fba3b743f --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/JsonEndpoint.cs @@ -0,0 +1,19 @@ +using Reaper; +using Reaper.Attributes; + +namespace Benchmark; + +public class JsonResponse +{ + public string Message { get; set; } = default!; +} + +[ReaperRoute(HttpVerbs.Get, "/json")] +public class JsonEndpoint : ReaperEndpointXR +{ + public override Task HandleAsync() + { + Context.Response.ContentLength = 27; + return Task.FromResult(new JsonResponse { Message = "Hello, World!" }); + } +} \ No newline at end of file diff --git a/frameworks/CSharp/reaper/src/Benchmark/PlainTextEndpoint.cs b/frameworks/CSharp/reaper/src/Benchmark/PlainTextEndpoint.cs new file mode 100644 index 00000000000..a316a55b6b4 --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/PlainTextEndpoint.cs @@ -0,0 +1,16 @@ +using Reaper; +using Reaper.Attributes; + +namespace Benchmark; + +[ReaperRoute(HttpVerbs.Get, "/plaintext")] +public class PlainTextEndpoint : ReaperEndpointXR +{ + public override Task HandleAsync() + { + Context.Response.StatusCode = 200; + Context.Response.ContentType = "text/plain"; + Context.Response.ContentLength = 13; + return Task.FromResult("Hello, World!"); + } +} \ No newline at end of file diff --git a/frameworks/CSharp/reaper/src/Benchmark/Program.cs b/frameworks/CSharp/reaper/src/Benchmark/Program.cs new file mode 100644 index 00000000000..7a44cf047bd --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/Program.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using Benchmark; +using Reaper; + +var builder = WebApplication.CreateSlimBuilder(args); +builder.Logging.ClearProviders(); +builder.Logging.Configure(o => o.ActivityTrackingOptions = ActivityTrackingOptions.None); +builder.Services.ConfigureHttpJsonOptions(o => +{ + o.SerializerOptions.TypeInfoResolverChain.Insert(0, SourceGenerationContext.Default); +}); +builder.UseReaper(); + +var app = builder.Build(); + +app.UseReaperMiddleware(); +app.MapReaperEndpoints(); + +app.Run(); + +[JsonSerializable(typeof(JsonResponse))] +internal partial class SourceGenerationContext : JsonSerializerContext { } \ No newline at end of file diff --git a/frameworks/CSharp/reaper/src/Benchmark/Properties/launchSettings.json b/frameworks/CSharp/reaper/src/Benchmark/Properties/launchSettings.json new file mode 100644 index 00000000000..0f693d699d9 --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/Properties/launchSettings.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:55625", + "sslPort": 44373 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5286", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7035;http://localhost:5286", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/frameworks/CSharp/reaper/src/Benchmark/appsettings.Development.json b/frameworks/CSharp/reaper/src/Benchmark/appsettings.Development.json new file mode 100644 index 00000000000..0c208ae9181 --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/frameworks/CSharp/reaper/src/Benchmark/appsettings.json b/frameworks/CSharp/reaper/src/Benchmark/appsettings.json new file mode 100644 index 00000000000..10f68b8c8b4 --- /dev/null +++ b/frameworks/CSharp/reaper/src/Benchmark/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/frameworks/CSharp/sisk/.gitignore b/frameworks/CSharp/sisk/.gitignore new file mode 100644 index 00000000000..df5d0dc676b --- /dev/null +++ b/frameworks/CSharp/sisk/.gitignore @@ -0,0 +1,39 @@ +[Oo]bj/ +[Bb]in/ +TestResults/ +.nuget/ +*.sln +*.sln.ide/ +_ReSharper.*/ +.idea/ +packages/ +artifacts/ +PublishProfiles/ +*.sln +.vs/ +*.user +*.suo +*.cache +*.docstates +_ReSharper.* +nuget.exe +*net45.csproj +*net451.csproj +*k10.csproj +*.psess +*.vsp +*.pidb +*.userprefs +*DS_Store +*.ncrunchsolution +*.*sdf +*.ipch +*.swp +*~ +.build/ +.testPublish/ +launchSettings.json +BenchmarkDotNet.Artifacts/ +BDN.Generated/ +binaries/ +global.json diff --git a/frameworks/CSharp/sisk/README.md b/frameworks/CSharp/sisk/README.md new file mode 100644 index 00000000000..1ecb09ce930 --- /dev/null +++ b/frameworks/CSharp/sisk/README.md @@ -0,0 +1,18 @@ +# Sisk benchmark + +See the [Sisk Framework website](https://sisk.project-principium.dev/) for more information. + +## Infrastructure Software Versions + +**Language** + +* C# 11.0 + +**Platforms** + +* .NET Core + +## Paths & Source for Tests + +* [Plaintext](sisk/Program.cs): "/plaintext" +* [JSON](sisk/Program.cs): "/json" \ No newline at end of file diff --git a/frameworks/CSharp/sisk/benchmark_config.json b/frameworks/CSharp/sisk/benchmark_config.json new file mode 100644 index 00000000000..b2cc682ac22 --- /dev/null +++ b/frameworks/CSharp/sisk/benchmark_config.json @@ -0,0 +1,21 @@ +{ + "framework": "sisk", + "tests": [{ + "default": { + "plaintext_url": "/plaintext", + "json_url": "/json", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "None", + "framework": "Sisk", + "language": "C#", + "orm": "Raw", + "platform": ".NET", + "webserver": "Sisk", + "os": "Linux", + "database_os": "Linux", + "display_name": "Sisk Framework" + } + }] +} diff --git a/frameworks/CSharp/sisk/config.toml b/frameworks/CSharp/sisk/config.toml new file mode 100644 index 00000000000..25d9855ea65 --- /dev/null +++ b/frameworks/CSharp/sisk/config.toml @@ -0,0 +1,15 @@ +[framework] +name = "sisk" + +[main] +urls.plaintext = "/plaintext" +urls.json = "/json" +approach = "Realistic" +classification = "Fullstack" +database = "None" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = ".NET" +webserver = "Sisk" +versus = "None" diff --git a/frameworks/CSharp/sisk/sisk.dockerfile b/frameworks/CSharp/sisk/sisk.dockerfile new file mode 100644 index 00000000000..2a23e04743f --- /dev/null +++ b/frameworks/CSharp/sisk/sisk.dockerfile @@ -0,0 +1,19 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /source + +# copy csproj and restore as distinct layers +COPY sisk/*.csproj . +RUN dotnet restore -r linux-musl-x64 + +# copy and publish app and libraries +COPY sisk/ . +RUN dotnet publish -c release -o /app -r linux-musl-x64 + +# final stage/image +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime +WORKDIR /app +COPY --from=build /app . + +ENTRYPOINT ["dotnet", "./sisk.dll"] + +EXPOSE 8080 \ No newline at end of file diff --git a/frameworks/CSharp/sisk/sisk/Program.cs b/frameworks/CSharp/sisk/sisk/Program.cs new file mode 100644 index 00000000000..de5c69d1670 --- /dev/null +++ b/frameworks/CSharp/sisk/sisk/Program.cs @@ -0,0 +1,26 @@ +using Sisk.Core.Http; +using Sisk.Core.Routing; +using System.Net.Http.Json; + +var app = HttpServer.CreateBuilder(host => +{ + host.UseListeningPort("http://+:8080/"); +}); + +app.Router.SetRoute(RouteMethod.Get, "/plaintext", PlainText); +app.Router.SetRoute(RouteMethod.Get, "/json", Json); + +app.Start(); + +static HttpResponse PlainText(HttpRequest request) +{ + return new HttpResponse().WithContent("Hello, world!"); +} + +static HttpResponse Json(HttpRequest request) +{ + return new HttpResponse().WithContent(JsonContent.Create(new + { + message = "Hello, world!" + })); +} \ No newline at end of file diff --git a/frameworks/CSharp/sisk/sisk/sisk.csproj b/frameworks/CSharp/sisk/sisk/sisk.csproj new file mode 100644 index 00000000000..624dd50d4a3 --- /dev/null +++ b/frameworks/CSharp/sisk/sisk/sisk.csproj @@ -0,0 +1,15 @@ + + + + Exe + net8.0 + enable + enable + true + + + + + + + diff --git a/frameworks/Crystal/amber/.gitignore b/frameworks/Crystal/amber/.gitignore new file mode 100644 index 00000000000..4eb56dc378b --- /dev/null +++ b/frameworks/Crystal/amber/.gitignore @@ -0,0 +1 @@ +lib/* \ No newline at end of file diff --git a/frameworks/Crystal/amber/amber.dockerfile b/frameworks/Crystal/amber/amber.dockerfile index 9b99c6e6c1f..f04867c3205 100644 --- a/frameworks/Crystal/amber/amber.dockerfile +++ b/frameworks/Crystal/amber/amber.dockerfile @@ -1,19 +1,37 @@ -FROM crystallang/crystal:0.26.1 +FROM crystallang/crystal:1.10.1-alpine as build WORKDIR /amber COPY config config COPY src src -COPY run.sh run.sh + COPY shard.lock shard.lock COPY shard.yml shard.yml -ENV GC_MARKERS 1 +RUN apk update +RUN apk add yaml-dev sqlite-dev + +# RUN shards build amber --release +RUN shards install +RUN crystal build --release --no-debug --static src/amber.cr +RUN cp amber bin/amber + +# Main Image +FROM ubuntu:22.04 + +WORKDIR /amber + ENV AMBER_ENV production -ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_pool_size=56&max_idle_pool_size=56 +ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world +RUN apt-get update RUN apt-get install -yqq libyaml-dev -RUN shards build amber --release --no-debug + +COPY run.sh run.sh +RUN mkdir bin +COPY --from=build /amber/amber /amber/bin/amber EXPOSE 8080 CMD bash run.sh + + diff --git a/frameworks/Crystal/amber/config/application.cr b/frameworks/Crystal/amber/config/application.cr index 0495ed0d8a1..a5fcb74d1a8 100644 --- a/frameworks/Crystal/amber/config/application.cr +++ b/frameworks/Crystal/amber/config/application.cr @@ -27,14 +27,14 @@ Amber::Server.configure do |settings| # # > Read more about Linux PORT REUSE https://lwn.net/Articles/542629/ # - settings.port_reuse = false + settings.port_reuse = true # # # Process Count: This will enable Amber to be used in cluster mode, # spinning an instance for each number of process specified here. # Rule of thumb, always leave at least 1 core available for system processes/resources. # - settings.process_count = 1 + settings.process_count = (System.cpu_count).to_i32 # # # PORT: This is the port that you're application will run on. Examples would be (80, 443, 3000, 8080) @@ -45,7 +45,5 @@ Amber::Server.configure do |settings| # Log: Is the logger that will be used for Amber and it defaults to ::Logger.new(STDOUT). # You can supply a custom logger. # - settings.logger = Amber::Environment::Logger.new(nil) - # - # -end + settings.logging.severity = "info" +end \ No newline at end of file diff --git a/frameworks/Crystal/amber/config/initializers/database.cr b/frameworks/Crystal/amber/config/initializers/database.cr index 3f9bf640583..04240c59a66 100644 --- a/frameworks/Crystal/amber/config/initializers/database.cr +++ b/frameworks/Crystal/amber/config/initializers/database.cr @@ -1,4 +1,10 @@ require "granite/adapter/pg" -Granite.settings.logger = Logger.new(nil) -Granite::Adapters << Granite::Adapter::Pg.new({name: "pg", url: ENV["DATABASE_URL"]}) +cpu_count = System.cpu_count +pool_size = 56 // cpu_count +database_url = ENV["DATABASE_URL"] +url = "#{database_url}?initial_pool_size=#{pool_size}&max_idle_pool_size=#{pool_size}" + +puts url + +Granite::Connections << Granite::Adapter::Pg.new(name: "pg", url: url) diff --git a/frameworks/Crystal/amber/run.sh b/frameworks/Crystal/amber/run.sh index cec3997617b..7688dec1068 100644 --- a/frameworks/Crystal/amber/run.sh +++ b/frameworks/Crystal/amber/run.sh @@ -1,7 +1,4 @@ #!/bin/bash -for i in $(seq 1 $(nproc --all)); do - ./bin/amber & -done +./bin/amber -wait diff --git a/frameworks/Crystal/amber/shard.lock b/frameworks/Crystal/amber/shard.lock index 0d6c99c3483..635edcb60c1 100644 --- a/frameworks/Crystal/amber/shard.lock +++ b/frameworks/Crystal/amber/shard.lock @@ -1,86 +1,126 @@ -version: 1.0 +version: 2.0 shards: amber: - github: amberframework/amber - version: 0.9.0 + git: https://github.com/amberframework/amber.git + version: 1.4.1 amber_router: - github: amberframework/amber-router - version: 0.2.0 + git: https://github.com/amberframework/amber-router.git + version: 0.4.4 + + backtracer: + git: https://github.com/sija/backtracer.cr.git + version: 1.2.2 callback: - github: mosop/callback - version: 0.6.3 + git: https://github.com/amberframework/callback.git + version: 0.9.2 cli: - github: mosop/cli - version: 0.7.0 + git: https://github.com/amberframework/cli.git + version: 0.11.4 compiled_license: - github: elorest/compiled_license - version: 0.1.3 + git: https://github.com/elorest/compiled_license.git + version: 1.2.2 db: - github: crystal-lang/crystal-db - version: 0.5.0 + git: https://github.com/crystal-lang/crystal-db.git + version: 0.11.0 + + dotenv: + git: https://github.com/gdotdesign/cr-dotenv.git + version: 1.0.0 + + exception_page: + git: https://github.com/crystal-loot/exception_page.git + version: 0.3.1 + + future: + git: https://github.com/crystal-community/future.cr.git + version: 1.0.0 granite: - github: amberframework/granite - version: 0.13.1 + git: https://github.com/amberframework/granite.git + version: 0.23.3 + + i18n: + git: https://github.com/crimson-knight/i18n.cr.git + version: 0.4.1 + + ifrit: + git: https://github.com/imdrasil/ifrit.git + version: 0.1.3 inflector: - github: phoffer/inflector.cr - version: 0.1.8 + git: https://github.com/phoffer/inflector.cr.git + version: 1.0.0 + + jennifer: + git: https://github.com/imdrasil/jennifer.cr.git + version: 0.13.0 + + json_mapping: + git: https://github.com/crystal-lang/json_mapping.cr.git + version: 0.1.1 kilt: - github: jeromegn/kilt - version: 0.4.0 + git: https://github.com/jeromegn/kilt.git + version: 0.6.1 liquid: - github: TechMagister/liquid.cr - version: 0.3.0 + git: https://github.com/dare892/liquid.cr.git + version: 0.4.1+git.commit.e4ef5ca06bf5bafe74e0b270c7aae2941a91ddd3 micrate: - github: amberframework/micrate - version: 0.3.3 + git: https://github.com/amberframework/micrate.git + version: 0.15.0 mysql: - github: crystal-lang/crystal-mysql - version: 0.5.0 + git: https://github.com/crystal-lang/crystal-mysql.git + version: 0.14.0 optarg: - github: mosop/optarg - version: 0.5.8 + git: https://github.com/amberframework/optarg.git + version: 0.9.3 pg: - github: will/crystal-pg - version: 0.15.0 + git: https://github.com/will/crystal-pg.git + version: 0.26.0 pool: - github: ysbaddaden/pool - version: 0.2.3 + git: https://github.com/ysbaddaden/pool.git + version: 0.3.0 redis: - github: stefanwille/crystal-redis - version: 2.0.0 + git: https://github.com/stefanwille/crystal-redis.git + version: 2.8.3 + + sam: + git: https://github.com/imdrasil/sam.cr.git + version: 0.5.0 shell-table: - github: luckyframework/shell-table.cr - commit: 078a04ea58ead5203bb435a3b5fff448ddabaeea + git: https://github.com/luckyframework/shell-table.cr.git + version: 0.9.3 slang: - github: jeromegn/slang - version: 1.7.1 + git: https://github.com/jeromegn/slang.git + version: 1.7.3 sqlite3: - github: crystal-lang/crystal-sqlite3 - version: 0.10.0 - - string_inflection: - github: mosop/string_inflection - version: 0.2.1 + git: https://github.com/crystal-lang/crystal-sqlite3.git + version: 0.19.0 teeplate: - github: mosop/teeplate - version: 0.6.1 + git: https://github.com/amberframework/teeplate.git + version: 0.11.2 + + wordsmith: + git: https://github.com/luckyframework/wordsmith.git + version: 0.4.0 + + yaml_mapping: + git: https://github.com/crystal-lang/yaml_mapping.cr.git + version: 0.1.1 diff --git a/frameworks/Crystal/amber/shard.yml b/frameworks/Crystal/amber/shard.yml index b4b1cc224d2..c48994d4d4e 100644 --- a/frameworks/Crystal/amber/shard.yml +++ b/frameworks/Crystal/amber/shard.yml @@ -1,5 +1,5 @@ name: amber -version: 0.1.0 +version: 0.2.0 authors: - Amber Team and Contributors @@ -13,8 +13,28 @@ targets: dependencies: amber: github: amberframework/amber - version: 0.9.0 + version: 1.4.1 + + jennifer: + github: imdrasil/jennifer.cr + version: "~> 0.13.0" + + sam: + github: imdrasil/sam.cr + version: 0.5.0 + + pg: + github: will/crystal-pg + version: "= 0.26.0" + + mysql: + github: crystal-lang/crystal-mysql + version: 0.14.0 + + dotenv: + github: gdotdesign/cr-dotenv + version: 1.0.0 granite: github: amberframework/granite - version: 0.13.1 + version: 0.23.3 diff --git a/frameworks/Crystal/amber/src/controllers/benchmark_controller.cr b/frameworks/Crystal/amber/src/controllers/benchmark_controller.cr index 0533fa84651..aa29f7fef39 100644 --- a/frameworks/Crystal/amber/src/controllers/benchmark_controller.cr +++ b/frameworks/Crystal/amber/src/controllers/benchmark_controller.cr @@ -8,7 +8,7 @@ class BenchmarkController < Amber::Controller::Base before_action do all do response.headers["Server"] = "Amber" - response.headers["Date"] = HTTP.format_time(Time.now) + response.headers["Date"] = HTTP.format_time(Time.local) end end diff --git a/frameworks/Crystal/amber/src/models/fortune.cr b/frameworks/Crystal/amber/src/models/fortune.cr index 4bffdd59aa0..cbe4cb46f0c 100644 --- a/frameworks/Crystal/amber/src/models/fortune.cr +++ b/frameworks/Crystal/amber/src/models/fortune.cr @@ -1,9 +1,9 @@ require "granite/adapter/pg" class Fortune < Granite::Base - adapter pg - - table_name fortune - primary id : Int32 - field message : String + connection pg + table fortune + + column id : Int32, primary: true + column message : String end diff --git a/frameworks/Crystal/amber/src/models/world.cr b/frameworks/Crystal/amber/src/models/world.cr index 64347dca5b2..27976b48177 100644 --- a/frameworks/Crystal/amber/src/models/world.cr +++ b/frameworks/Crystal/amber/src/models/world.cr @@ -1,9 +1,9 @@ require "granite/adapter/pg" class World < Granite::Base - adapter pg + connection pg + table world - table_name world - primary id : Int32 - field randomnumber : Int32 + column id : Int32, primary: true + column randomnumber : Int32 end diff --git a/frameworks/Go/aah/src/benchmark/go.mod b/frameworks/Go/aah/src/benchmark/go.mod index 26910164c0d..99e5799799d 100644 --- a/frameworks/Go/aah/src/benchmark/go.mod +++ b/frameworks/Go/aah/src/benchmark/go.mod @@ -22,11 +22,11 @@ require ( github.com/satori/go.uuid v1.2.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/urfave/cli v1.20.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v9 v9.21.0 // indirect diff --git a/frameworks/Go/aah/src/benchmark/go.sum b/frameworks/Go/aah/src/benchmark/go.sum index 0a70faaf940..060b93b6321 100644 --- a/frameworks/Go/aah/src/benchmark/go.sum +++ b/frameworks/Go/aah/src/benchmark/go.sum @@ -42,8 +42,8 @@ github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= golang.org/x/crypto v0.0.0-20181012144002-a92615f3c490/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= @@ -51,12 +51,12 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced h1:4oqSq7eft7MdPKBGQK11X9WYUxmj6ZLgGTqYIbY1kyw= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= diff --git a/frameworks/Go/atreugo/src/go.mod b/frameworks/Go/atreugo/src/go.mod index 68c2acb94fe..a8b0f986fef 100644 --- a/frameworks/Go/atreugo/src/go.mod +++ b/frameworks/Go/atreugo/src/go.mod @@ -3,9 +3,7 @@ module atreugo/src go 1.19 require ( - github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c - github.com/jackc/pgx/v5 v5.0.4 - github.com/mailru/easyjson v0.7.7 + github.com/jackc/pgx/v5 v5.5.4 github.com/savsgio/atreugo/v11 v11.9.7 github.com/valyala/quicktemplate v1.7.0 ) @@ -13,22 +11,16 @@ require ( require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/fasthttp/router v1.4.12 // indirect - github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect - github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect - github.com/jackc/puddle v1.3.0 // indirect - github.com/jackc/puddle/v2 v2.0.0 // indirect - github.com/josharian/intern v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/klauspost/compress v1.15.10 // indirect github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.40.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/frameworks/Go/atreugo/src/go.sum b/frameworks/Go/atreugo/src/go.sum index f30a89a3d8d..628a4244926 100644 --- a/frameworks/Go/atreugo/src/go.sum +++ b/frameworks/Go/atreugo/src/go.sum @@ -1,138 +1,38 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/atreugo/mock v0.0.0-20200601091009-13c275b330b0 h1:IVqe9WnancrkICl5HqEfGjrnkQ4+VsU5fodcuFVoG/A= github.com/atreugo/mock v0.0.0-20200601091009-13c275b330b0/go.mod h1:HTHAc8RoZXMVTr6wZQN7Jjm3mYMnbfkqqKdnQgSoe9o= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fasthttp/router v1.4.12 h1:QEgK+UKARaC1bAzJgnIhdUMay6nwp+YFq6VGPlyKN1o= github.com/fasthttp/router v1.4.12/go.mod h1:41Qdc4Z4T2pWVVtATHCnoUnOtxdBoeKEYJTXhHwbxCQ= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= -github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c h1:Dznn52SgVIVst9UyOT9brctYUgxs+CvVfPaC3jKrA50= -github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= -github.com/jackc/pgx/v5 v5.0.4 h1:r5O6y84qHX/z/HZV40JBdx2obsHz7/uRj5b+CcYEdeY= -github.com/jackc/pgx/v5 v5.0.4/go.mod h1:U0ynklHtgg43fue9Ly30w3OCSTDPlXjig9ghrNGaguQ= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle/v2 v2.0.0 h1:Kwk/AlLigcnZsDssc3Zun1dk1tAtQNPaBBxBHWn0Mjc= -github.com/jackc/puddle/v2 v2.0.0/go.mod h1:itE7ZJY8xnoo0JqJEpSMprN0f+NQkMCuEV/N9j8h0oc= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.5.4 h1:Xp2aQS8uXButQdnCMWNmvx6UysWQQC+u1EoizjguY+8= +github.com/jackc/pgx/v5 v5.5.4/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo= github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/savsgio/atreugo/v11 v11.9.7 h1:nzd/0G0bkvja7e5/wEb27K/7pXlRcSDmE70WR3Fx9MI= github.com/savsgio/atreugo/v11 v11.9.7/go.mod h1:bziyB6t8H3YQ7mdCUX0ZVFTXo/7ANslmVbfRFM+pJOQ= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= @@ -142,93 +42,32 @@ github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTc github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/frameworks/Go/echo/src/go.mod b/frameworks/Go/echo/src/go.mod index 29ed5d97b1e..35307bb0fec 100644 --- a/frameworks/Go/echo/src/go.mod +++ b/frameworks/Go/echo/src/go.mod @@ -13,8 +13,8 @@ require ( github.com/mattn/go-isatty v0.0.16 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/frameworks/Go/echo/src/go.sum b/frameworks/Go/echo/src/go.sum index 320ff5c30de..c7d3f25fbcf 100644 --- a/frameworks/Go/echo/src/go.sum +++ b/frameworks/Go/echo/src/go.sum @@ -22,18 +22,18 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= diff --git a/frameworks/Go/fasthttp/src/go.mod b/frameworks/Go/fasthttp/src/go.mod index c02732cecb8..59cdcddeacd 100644 --- a/frameworks/Go/fasthttp/src/go.mod +++ b/frameworks/Go/fasthttp/src/go.mod @@ -3,7 +3,7 @@ module fasthttp/app go 1.19 require ( - github.com/jackc/pgx/v4 v4.17.2 + github.com/jackc/pgx/v4 v4.18.2 github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d github.com/valyala/fasthttp v1.40.0 github.com/valyala/quicktemplate v1.7.0 @@ -12,17 +12,17 @@ require ( require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect github.com/jackc/puddle v1.3.0 // indirect github.com/klauspost/compress v1.15.10 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/frameworks/Go/fasthttp/src/go.sum b/frameworks/Go/fasthttp/src/go.sum index 6511752d850..b8c91b7aa99 100644 --- a/frameworks/Go/fasthttp/src/go.sum +++ b/frameworks/Go/fasthttp/src/go.sum @@ -30,8 +30,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -47,22 +47,23 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -109,15 +110,12 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= @@ -150,9 +148,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -181,8 +178,8 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -192,8 +189,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -214,5 +211,4 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/frameworks/Go/fiber/src/go.mod b/frameworks/Go/fiber/src/go.mod index cc77f3409c8..2372b8f57f7 100644 --- a/frameworks/Go/fiber/src/go.mod +++ b/frameworks/Go/fiber/src/go.mod @@ -4,28 +4,27 @@ go 1.19 require ( github.com/goccy/go-json v0.10.0 - github.com/gofiber/fiber/v2 v2.50.0 - github.com/jackc/pgx/v5 v5.2.0 + github.com/gofiber/fiber/v2 v2.52.1 + github.com/jackc/pgx/v5 v5.5.4 github.com/valyala/quicktemplate v1.7.0 ) require ( github.com/andybalholm/brotli v1.0.5 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.5.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/puddle/v2 v2.1.2 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/klauspost/compress v1.17.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasthttp v1.50.0 // indirect + github.com/valyala/fasthttp v1.51.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/frameworks/Go/fiber/src/go.sum b/frameworks/Go/fiber/src/go.sum index 8781721ebb7..5ae0d5e53e3 100644 --- a/frameworks/Go/fiber/src/go.sum +++ b/frameworks/Go/fiber/src/go.sum @@ -6,28 +6,28 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofiber/fiber/v2 v2.50.0 h1:ia0JaB+uw3GpNSCR5nvC5dsaxXjRU5OEu36aytx+zGw= -github.com/gofiber/fiber/v2 v2.50.0/go.mod h1:21eytvay9Is7S6z+OgPi7c7n4++tnClWmhpimVHMimw= +github.com/gofiber/fiber/v2 v2.52.1 h1:1RoU2NS+b98o1L77sdl5mboGPiW+0Ypsi5oLmcYlgHI= +github.com/gofiber/fiber/v2 v2.52.1/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgx/v5 v5.2.0 h1:NdPpngX0Y6z6XDFKqmFQaE+bCtkqzvQIOt1wvBlAqs8= -github.com/jackc/pgx/v5 v5.2.0/go.mod h1:Ptn7zmohNsWEsdxRawMzk3gaKma2obW+NWTnKa0S4nk= -github.com/jackc/puddle/v2 v2.1.2 h1:0f7vaaXINONKTsxYDn4otOAiJanX/BMeAtY//BXqzlg= -github.com/jackc/puddle/v2 v2.1.2/go.mod h1:2lpufsF5mRHO6SuZkm0fNYxM6SWHfvyFj62KwNzgels= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.5.4 h1:Xp2aQS8uXButQdnCMWNmvx6UysWQQC+u1EoizjguY+8= +github.com/jackc/pgx/v5 v5.5.4/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -36,22 +36,20 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= -github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= -github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= +github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= @@ -61,14 +59,14 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/frameworks/Go/gearbox/src/go.mod b/frameworks/Go/gearbox/src/go.mod index f2a5cc6785b..79708752ac5 100644 --- a/frameworks/Go/gearbox/src/go.mod +++ b/frameworks/Go/gearbox/src/go.mod @@ -4,19 +4,19 @@ go 1.19 require ( github.com/gogearbox/gearbox v1.2.4 - github.com/jackc/pgx/v4 v4.17.2 + github.com/jackc/pgx/v4 v4.18.2 github.com/valyala/quicktemplate v1.7.0 ) require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect github.com/jackc/puddle v1.3.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.10 // indirect @@ -25,7 +25,7 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.40.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/frameworks/Go/gearbox/src/go.sum b/frameworks/Go/gearbox/src/go.sum index 9f9e9083572..443a9ec1b19 100644 --- a/frameworks/Go/gearbox/src/go.sum +++ b/frameworks/Go/gearbox/src/go.sum @@ -32,8 +32,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -49,22 +49,23 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -116,15 +117,12 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= @@ -158,9 +156,8 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -189,8 +186,8 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41 h1:ohgcoMbSofXygzo6AD2I1kz3BFmW1QArPYTtwEM3UXc= -golang.org/x/sys v0.0.0-20220915200043-7b5979e65e41/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -200,8 +197,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -222,5 +219,4 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/frameworks/Go/gin/gin-gorm/go.mod b/frameworks/Go/gin/gin-gorm/go.mod index ff15c7e28ec..cb57b57d80a 100644 --- a/frameworks/Go/gin/gin-gorm/go.mod +++ b/frameworks/Go/gin/gin-gorm/go.mod @@ -20,13 +20,13 @@ require ( github.com/gofrs/uuid v4.3.0+incompatible // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect - github.com/jackc/pgx/v4 v4.17.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect + github.com/jackc/pgx/v4 v4.18.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -42,10 +42,10 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/frameworks/Go/gin/gin-gorm/go.sum b/frameworks/Go/gin/gin-gorm/go.sum index 04c15d31cc6..a347b479b9d 100644 --- a/frameworks/Go/gin/gin-gorm/go.sum +++ b/frameworks/Go/gin/gin-gorm/go.sum @@ -36,8 +36,6 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -52,8 +50,9 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -69,22 +68,26 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -191,8 +194,8 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -202,8 +205,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -220,8 +223,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -230,8 +233,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -244,11 +247,9 @@ golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/frameworks/Go/gin/gin-src/go.mod b/frameworks/Go/gin/gin-src/go.mod index df6aca92639..46b9a94832b 100644 --- a/frameworks/Go/gin/gin-src/go.mod +++ b/frameworks/Go/gin/gin-src/go.mod @@ -26,10 +26,10 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/frameworks/Go/gin/gin-src/go.sum b/frameworks/Go/gin/gin-src/go.sum index 956d69bbd6b..7b727e54dc3 100644 --- a/frameworks/Go/gin/gin-src/go.sum +++ b/frameworks/Go/gin/gin-src/go.sum @@ -24,9 +24,7 @@ github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfC github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -64,21 +62,19 @@ github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZ golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/frameworks/Go/gin/gin-std/go.mod b/frameworks/Go/gin/gin-std/go.mod index b15771ce3cf..9c0fbb13ce8 100644 --- a/frameworks/Go/gin/gin-std/go.mod +++ b/frameworks/Go/gin/gin-std/go.mod @@ -27,10 +27,10 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/frameworks/Go/gin/gin-std/go.sum b/frameworks/Go/gin/gin-std/go.sum index d7c446e32e5..4a4e2132598 100644 --- a/frameworks/Go/gin/gin-std/go.sum +++ b/frameworks/Go/gin/gin-std/go.sum @@ -24,8 +24,6 @@ github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfC github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -65,20 +63,18 @@ github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZ golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/frameworks/Go/go-std/src/go.mod b/frameworks/Go/go-std/src/go.mod index ad635fe7e0f..e164c404d53 100644 --- a/frameworks/Go/go-std/src/go.mod +++ b/frameworks/Go/go-std/src/go.mod @@ -21,8 +21,8 @@ require ( github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/frameworks/Go/go-std/src/go.sum b/frameworks/Go/go-std/src/go.sum index afe042667a2..6118e45288d 100644 --- a/frameworks/Go/go-std/src/go.sum +++ b/frameworks/Go/go-std/src/go.sum @@ -42,8 +42,8 @@ github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTc github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -52,8 +52,8 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/frameworks/Go/goframe/src/go.mod b/frameworks/Go/goframe/src/go.mod index a14d0d3b7cd..81cd961b3a6 100644 --- a/frameworks/Go/goframe/src/go.mod +++ b/frameworks/Go/goframe/src/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/bytedance/sonic v1.4.0 github.com/gogf/gf/v2 v2.1.4 - github.com/jackc/pgx/v4 v4.17.2 + github.com/jackc/pgx/v4 v4.18.2 github.com/valyala/quicktemplate v1.7.0 ) @@ -23,12 +23,12 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/grokify/html-strip-tags-go v0.0.1 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect github.com/jackc/puddle v1.3.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/magiconair/properties v1.8.6 // indirect @@ -42,9 +42,9 @@ require ( go.opentelemetry.io/otel/sdk v1.7.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/frameworks/Go/goframe/src/go.sum b/frameworks/Go/goframe/src/go.sum index a103d1f9e04..3b2bb947b83 100644 --- a/frameworks/Go/goframe/src/go.sum +++ b/frameworks/Go/goframe/src/go.sum @@ -83,8 +83,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -100,22 +100,23 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -191,15 +192,13 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.13.0 h1:3TFY9yxOQShrvmjdM76K+jc66zJeT6D3/VFFYCGQf7M= github.com/tidwall/gjson v1.13.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -249,9 +248,8 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -269,8 +267,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -302,8 +300,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -311,10 +309,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= diff --git a/frameworks/Go/hertz/go.mod b/frameworks/Go/hertz/go.mod index a43ab903201..b04b09619ce 100644 --- a/frameworks/Go/hertz/go.mod +++ b/frameworks/Go/hertz/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/cloudwego/hertz v0.7.1 github.com/goccy/go-json v0.10.2 - github.com/jackc/pgx/v5 v5.4.3 + github.com/jackc/pgx/v5 v5.5.4 ) require ( @@ -28,9 +28,9 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/frameworks/Go/hertz/go.sum b/frameworks/Go/hertz/go.sum index fb87f4188a7..0d3f782c63b 100644 --- a/frameworks/Go/hertz/go.sum +++ b/frameworks/Go/hertz/go.sum @@ -37,8 +37,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= -github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jackc/pgx/v5 v5.5.4 h1:Xp2aQS8uXButQdnCMWNmvx6UysWQQC+u1EoizjguY+8= +github.com/jackc/pgx/v5 v5.5.4/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -77,8 +77,8 @@ golang.org/x/arch v0.0.0-20201008161808-52c3e6f60cff/go.mod h1:flIaEI6LNU6xOCD5P golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= @@ -86,18 +86,18 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/frameworks/Go/hertz/hertz-gorm/go.mod b/frameworks/Go/hertz/hertz-gorm/go.mod index f284bfed3b6..761cb65fa64 100644 --- a/frameworks/Go/hertz/hertz-gorm/go.mod +++ b/frameworks/Go/hertz/hertz-gorm/go.mod @@ -20,13 +20,13 @@ require ( github.com/henrylee2cn/ameda v1.4.10 // indirect github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.3 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect - github.com/jackc/pgx/v4 v4.17.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.3 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect + github.com/jackc/pgx/v4 v4.18.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect @@ -36,8 +36,8 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect + golang.org/x/crypto v0.20.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/frameworks/Go/hertz/hertz-gorm/go.sum b/frameworks/Go/hertz/hertz-gorm/go.sum index c84b073dce6..8dba8ad80e8 100644 --- a/frameworks/Go/hertz/hertz-gorm/go.sum +++ b/frameworks/Go/hertz/hertz-gorm/go.sum @@ -57,8 +57,9 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -74,22 +75,26 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -187,8 +192,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -214,8 +220,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220110181412-a018aaa089fe/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -223,8 +230,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -243,8 +251,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/frameworks/Go/sprapp/go.mod b/frameworks/Go/sprapp/go.mod index 8a92f3e6416..54ae324ad27 100644 --- a/frameworks/Go/sprapp/go.mod +++ b/frameworks/Go/sprapp/go.mod @@ -3,32 +3,32 @@ module sprapp go 1.18 require ( - github.com/cloudwego/hertz v0.7.1 - github.com/cloudxaas/gocpu v0.0.10 - github.com/cloudxaas/gostrconv v0.0.4 - github.com/panjf2000/ants/v2 v2.8.2 - golang.org/x/sys v0.14.0 + github.com/cloudwego/hertz v0.7.1 + github.com/cloudxaas/gocpu v0.0.10 + github.com/cloudxaas/gostrconv v0.0.4 + github.com/panjf2000/ants/v2 v2.8.2 + golang.org/x/sys v0.14.0 ) require ( - github.com/bytedance/go-tagexpr/v2 v2.9.2 // indirect - github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7 // indirect - github.com/bytedance/sonic v1.8.1 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cloudwego/netpoll v0.5.0 // indirect - github.com/cloudxaas/gocx v0.0.3 // indirect - github.com/cloudxaas/gohash v0.0.13 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/golang/protobuf v1.5.0 // indirect - github.com/henrylee2cn/ameda v1.4.10 // indirect - github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/nyaruka/phonenumbers v1.0.55 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/tidwall/gjson v1.14.4 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - google.golang.org/protobuf v1.27.1 // indirect + github.com/bytedance/go-tagexpr/v2 v2.9.2 // indirect + github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7 // indirect + github.com/bytedance/sonic v1.8.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/cloudwego/netpoll v0.5.0 // indirect + github.com/cloudxaas/gocx v0.0.3 // indirect + github.com/cloudxaas/gohash v0.0.13 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/golang/protobuf v1.5.0 // indirect + github.com/henrylee2cn/ameda v1.4.10 // indirect + github.com/henrylee2cn/goutil v0.0.0-20210127050712-89660552f6f8 // indirect + github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/nyaruka/phonenumbers v1.0.55 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/tidwall/gjson v1.14.4 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/frameworks/Go/sprapp/go.sum b/frameworks/Go/sprapp/go.sum index 460ac53c333..60bedb8d316 100644 --- a/frameworks/Go/sprapp/go.sum +++ b/frameworks/Go/sprapp/go.sum @@ -93,8 +93,9 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/frameworks/Go/webgo/src/go.mod b/frameworks/Go/webgo/src/go.mod index b62bcd8c84a..dedb5b8dbe2 100644 --- a/frameworks/Go/webgo/src/go.mod +++ b/frameworks/Go/webgo/src/go.mod @@ -2,16 +2,16 @@ module webgo go 1.19 -require github.com/JaCoB1123/web v0.5.3 +require ( + github.com/JaCoB1123/web v0.5.3 + github.com/tidwall/sjson v1.2.5 +) require ( - github.com/josharian/intern v1.0.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tidwall/sjson v1.2.5 // indirect - golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 // indirect - golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect - golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect ) diff --git a/frameworks/Go/webgo/src/go.sum b/frameworks/Go/webgo/src/go.sum index b6addf7bc4b..aa60740b3ad 100644 --- a/frameworks/Go/webgo/src/go.sum +++ b/frameworks/Go/webgo/src/go.sum @@ -1,9 +1,5 @@ github.com/JaCoB1123/web v0.5.3 h1:PLoZorwPqDgRNStHxbbSBXbXdiBDmJP3bgBeFXO8Jhg= github.com/JaCoB1123/web v0.5.3/go.mod h1:wX1fuLSacW6lNgIVFGTyCDsUuDyWa92iy9xXCZCidUU= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -15,19 +11,17 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY= -golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200802091954-4b90ce9b60b3 h1:qDJKu1y/1SjhWac4BQZjLljqvqiWUhjmDMnonmVGDAU= golang.org/x/sys v0.0.0-20200802091954-4b90ce9b60b3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20220919170432-7a66f970e087 h1:tPwmk4vmvVCMdr98VgL4JH+qZxPL8fqlUOHnyOM8N3w= -golang.org/x/term v0.0.0-20220919170432-7a66f970e087/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/frameworks/Java/act/pom.xml b/frameworks/Java/act/pom.xml index 6d22ea17292..8e66efe9a01 100644 --- a/frameworks/Java/act/pom.xml +++ b/frameworks/Java/act/pom.xml @@ -70,7 +70,7 @@ 1.8 8.0.28 - 42.4.1 + 42.7.2 1.3.2 3.4 com.techempower.act.AppEntry diff --git a/frameworks/Java/armeria/pom.xml b/frameworks/Java/armeria/pom.xml index a568b3035f6..e73e9d61e3c 100644 --- a/frameworks/Java/armeria/pom.xml +++ b/frameworks/Java/armeria/pom.xml @@ -33,7 +33,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 com.github.spullara.mustache.java diff --git a/frameworks/Java/dropwizard/pom.xml b/frameworks/Java/dropwizard/pom.xml index 312ba647189..5188cb78b1c 100644 --- a/frameworks/Java/dropwizard/pom.xml +++ b/frameworks/Java/dropwizard/pom.xml @@ -19,7 +19,7 @@ 2.3.0 8.0.28 2.9.4 - 42.4.3 + 42.7.2 3.8.0 3.1.0 3.1.1 diff --git a/frameworks/Java/helidon/nima/pom.xml b/frameworks/Java/helidon/nima/pom.xml index f558927de94..b08de529ffc 100644 --- a/frameworks/Java/helidon/nima/pom.xml +++ b/frameworks/Java/helidon/nima/pom.xml @@ -75,7 +75,7 @@ org.postgresql postgresql - 42.6.0 + 42.6.1 com.fizzed diff --git a/frameworks/Java/hserver/pom.xml b/frameworks/Java/hserver/pom.xml index 8d63b000645..4e304e8caf9 100644 --- a/frameworks/Java/hserver/pom.xml +++ b/frameworks/Java/hserver/pom.xml @@ -11,12 +11,12 @@ hserver-parent cn.hserver - 3.1.M2 + 3.4.M2 UTF-8 3.3.1 - 42.3.8 + 42.7.2 @@ -49,4 +49,4 @@ - \ No newline at end of file + diff --git a/frameworks/Java/hserver/src/main/resources/app.properties b/frameworks/Java/hserver/src/main/resources/app.properties index 78b388d9923..1a3bd9c7ae7 100644 --- a/frameworks/Java/hserver/src/main/resources/app.properties +++ b/frameworks/Java/hserver/src/main/resources/app.properties @@ -3,6 +3,5 @@ username= benchmarkdbuser password= benchmarkdbpass maximumPoolSize= 256 -level=info -#业务线程池 +log=info web.businessPool=-1 diff --git a/frameworks/Java/httpserver/pom.xml b/frameworks/Java/httpserver/pom.xml index 931c9c56f94..4526fb528bf 100644 --- a/frameworks/Java/httpserver/pom.xml +++ b/frameworks/Java/httpserver/pom.xml @@ -29,7 +29,7 @@ org.postgresql postgresql - 42.4.1 + 42.7.2 com.zaxxer diff --git a/frameworks/Java/inverno/inverno-postgres.dockerfile b/frameworks/Java/inverno/inverno-postgres.dockerfile index 5a2928679e3..6a3fcd9070f 100644 --- a/frameworks/Java/inverno/inverno-postgres.dockerfile +++ b/frameworks/Java/inverno/inverno-postgres.dockerfile @@ -1,11 +1,12 @@ -FROM maven:3.8.2-openjdk-16 as maven +FROM maven:3.9.6-amazoncorretto-21 as maven WORKDIR /inverno COPY src src COPY pom.xml pom.xml -RUN mvn package -q +RUN yum -y install binutils +RUN mvn package -q -Pio.inverno.io_uring EXPOSE 8080 -# CMD [ "target/maven-inverno/application_linux_amd64/inverno-benchmark-1.0.0-SNAPSHOT/bin/inverno-benchmark" ] +# CMD [ "target/inverno-benchmark-1.0.0-SNAPSHOT-application_linux_amd64/bin/inverno-benchmark" ] CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \ - target/maven-inverno/application_linux_amd64/inverno-benchmark-1.0.0-SNAPSHOT/bin/inverno-benchmark --com.techempower.inverno.benchmark.appConfiguration.db_host=\"$DBIP\" \ No newline at end of file + target/inverno-benchmark-1.0.0-SNAPSHOT-application_linux_amd64/bin/inverno-benchmark --com.techempower.inverno.benchmark.appConfiguration.db_host=\"$DBIP\" diff --git a/frameworks/Java/inverno/inverno.dockerfile b/frameworks/Java/inverno/inverno.dockerfile index 6af60a189dc..1dd39d53b27 100644 --- a/frameworks/Java/inverno/inverno.dockerfile +++ b/frameworks/Java/inverno/inverno.dockerfile @@ -1,9 +1,10 @@ -FROM maven:3.8.2-openjdk-16 as maven +FROM maven:3.9.6-amazoncorretto-21 as maven WORKDIR /inverno COPY src src COPY pom.xml pom.xml -RUN mvn package -q +RUN yum -y install binutils +RUN mvn package -q -Pio.inverno.io_uring EXPOSE 8080 -CMD [ "target/maven-inverno/application_linux_amd64/inverno-benchmark-1.0.0-SNAPSHOT/bin/inverno-benchmark", "--com.techempower.inverno.benchmark.appConfiguration.boot.reactor_prefer_vertx=false" ] +CMD [ "target/inverno-benchmark-1.0.0-SNAPSHOT-application_linux_amd64/bin/inverno-benchmark", "--com.techempower.inverno.benchmark.appConfiguration.boot.reactor_prefer_vertx=false" ] diff --git a/frameworks/Java/inverno/pom.xml b/frameworks/Java/inverno/pom.xml index 296f7d99246..40158dba480 100644 --- a/frameworks/Java/inverno/pom.xml +++ b/frameworks/Java/inverno/pom.xml @@ -6,7 +6,7 @@ io.inverno.dist inverno-parent - 1.4.1 + 1.7.0 com.techempower inverno-benchmark @@ -17,9 +17,9 @@ Inverno framework benchmark test - 16 - 16 - 16 + 21 + 21 + 21 @@ -79,10 +79,21 @@ ${version.netty} - + + + + io.netty.incubator + netty-incubator-transport-native-io_uring + linux-x86_64 + + + + io.vertx + vertx-io_uring-incubator @@ -90,36 +101,87 @@ log4j-core - - - - - io.inverno.tool - inverno-maven-plugin - - - inverno-package - package - - build-app - - - server - - - inverno-benchmark - -Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dio.netty.leakDetection.level=disabled -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.transport.epoll - - - - zip - - - - - - - + + + + io.inverno.epoll + + + io.netty + netty-transport-native-epoll + linux-x86_64 + + + + + + io.inverno.tool + inverno-maven-plugin + + + inverno-package-app + package + + package-app + + + server + + + inverno-benchmark + -Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkBounds=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.transport.classes.epoll,io.netty.transport.epoll.linux.x86_64 + + + + zip + + + + + + + + + + io.inverno.io_uring + + + io.netty + netty-transport-native-epoll + linux-x86_64 + + + + + + io.inverno.tool + inverno-maven-plugin + + + inverno-package-app + package + + package-app + + + server + + + inverno-benchmark + -Xms2g -Xmx2g -server -XX:+UseNUMA -XX:+UseParallelGC -Dio.netty.leakDetection.level=disabled -Dio.netty.buffer.checkBounds=false -Dio.netty.buffer.checkBounds=false -Dvertx.disableHttpHeadersValidation=true -Dvertx.disableMetrics=true -Dvertx.disableH2c=true -Dvertx.disableWebsockets=true -Dvertx.flashPolicyHandler=false -Dvertx.threadChecks=false -Dvertx.disableContextTimings=true -Dvertx.disableTCCL=true --add-modules io.netty.transport.unix.common,io.netty.incubator.transport.classes.io_uring,io.netty.incubator.transport.io_uring.linux.x86_64 + + + + zip + + + + + + + + + diff --git a/frameworks/Java/inverno/src/jmods/io.vertx.core/module-info.java b/frameworks/Java/inverno/src/jmods/io.vertx.core/module-info.java deleted file mode 100644 index 56fbff0c18c..00000000000 --- a/frameworks/Java/inverno/src/jmods/io.vertx.core/module-info.java +++ /dev/null @@ -1,99 +0,0 @@ -module io.vertx.core { - requires io.netty.handler.proxy; - requires io.netty.resolver.dns; - requires io.netty.transport.epoll; - requires io.netty.transport.unix.common; - requires java.naming; - requires org.apache.logging.log4j; - - requires transitive com.fasterxml.jackson.core; - requires transitive com.fasterxml.jackson.databind; - requires transitive io.netty.buffer; - requires transitive io.netty.codec; - requires transitive io.netty.codec.dns; - requires transitive io.netty.codec.http; - requires transitive io.netty.codec.http2; - requires transitive io.netty.common; - requires transitive io.netty.handler; - requires transitive io.netty.resolver; - requires transitive io.netty.transport; - requires transitive java.compiler; - requires transitive java.logging; - - exports io.vertx.core; - exports io.vertx.core.buffer; - exports io.vertx.core.buffer.impl; - exports io.vertx.core.cli; - exports io.vertx.core.cli.annotations; - exports io.vertx.core.cli.converters; - exports io.vertx.core.cli.impl; - exports io.vertx.core.datagram; - exports io.vertx.core.datagram.impl; - exports io.vertx.core.dns; - exports io.vertx.core.dns.impl; - exports io.vertx.core.dns.impl.decoder; - exports io.vertx.core.eventbus; - exports io.vertx.core.eventbus.impl; - exports io.vertx.core.eventbus.impl.clustered; - exports io.vertx.core.eventbus.impl.codecs; - exports io.vertx.core.file; - exports io.vertx.core.file.impl; - exports io.vertx.core.http; - exports io.vertx.core.http.impl; - exports io.vertx.core.http.impl.cgbystrom; - exports io.vertx.core.http.impl.headers; - exports io.vertx.core.http.impl.ws; - exports io.vertx.core.impl; - exports io.vertx.core.impl.cpu; - exports io.vertx.core.impl.future; - exports io.vertx.core.impl.launcher; - exports io.vertx.core.impl.launcher.commands; - exports io.vertx.core.impl.logging; - exports io.vertx.core.impl.resolver; - exports io.vertx.core.impl.utils; - exports io.vertx.core.impl.verticle; - exports io.vertx.core.json; - exports io.vertx.core.json.impl; - exports io.vertx.core.json.jackson; - exports io.vertx.core.json.pointer; - exports io.vertx.core.json.pointer.impl; - exports io.vertx.core.logging; - exports io.vertx.core.metrics; - exports io.vertx.core.metrics.impl; - exports io.vertx.core.net; - exports io.vertx.core.net.impl; - exports io.vertx.core.net.impl.pkcs1; - exports io.vertx.core.net.impl.pool; - exports io.vertx.core.net.impl.transport; - exports io.vertx.core.parsetools; - exports io.vertx.core.parsetools.impl; - exports io.vertx.core.shareddata; - exports io.vertx.core.shareddata.impl; - exports io.vertx.core.spi; - exports io.vertx.core.spi.cluster; - exports io.vertx.core.spi.cluster.impl; - exports io.vertx.core.spi.cluster.impl.selector; - exports io.vertx.core.spi.json; - exports io.vertx.core.spi.launcher; - exports io.vertx.core.spi.logging; - exports io.vertx.core.spi.metrics; - exports io.vertx.core.spi.observability; - exports io.vertx.core.spi.resolver; - exports io.vertx.core.spi.tracing; - exports io.vertx.core.streams; - exports io.vertx.core.streams.impl; - exports io.vertx.core.tracing; - - provides io.vertx.core.spi.launcher.CommandFactory with - io.vertx.core.impl.launcher.commands.RunCommandFactory, - io.vertx.core.impl.launcher.commands.VersionCommandFactory, - io.vertx.core.impl.launcher.commands.BareCommandFactory, - io.vertx.core.impl.launcher.commands.ListCommandFactory, - io.vertx.core.impl.launcher.commands.StartCommandFactory, - io.vertx.core.impl.launcher.commands.StopCommandFactory; - - uses io.vertx.core.spi.VertxServiceProvider; - uses io.vertx.core.spi.VerticleFactory; - uses io.vertx.core.spi.JsonFactory; - -} diff --git a/frameworks/Java/inverno/src/jmods/r2dbc.postgresql/module-info.java b/frameworks/Java/inverno/src/jmods/r2dbc.postgresql/module-info.java deleted file mode 100644 index 18208e43b04..00000000000 --- a/frameworks/Java/inverno/src/jmods/r2dbc.postgresql/module-info.java +++ /dev/null @@ -1,38 +0,0 @@ -module r2dbc.postgresql { - requires com.ongres.scram.client; - requires com.ongres.scram.common; - requires io.netty.codec; - requires io.netty.resolver; - requires io.netty.transport; - requires io.netty.transport.epoll; - requires io.netty.transport.unix.common; - requires java.naming; - - requires transitive io.netty.buffer; - requires transitive io.netty.common; - requires transitive io.netty.handler; - requires transitive org.reactivestreams; - requires transitive r2dbc.spi; - requires transitive reactor.core; - requires transitive reactor.netty.core; - - exports io.r2dbc.postgresql; - exports io.r2dbc.postgresql.api; - exports io.r2dbc.postgresql.authentication; - exports io.r2dbc.postgresql.client; - exports io.r2dbc.postgresql.codec; - exports io.r2dbc.postgresql.extension; - exports io.r2dbc.postgresql.message; - exports io.r2dbc.postgresql.message.backend; - exports io.r2dbc.postgresql.message.frontend; - exports io.r2dbc.postgresql.replication; - exports io.r2dbc.postgresql.util; - - provides io.r2dbc.postgresql.extension.Extension with - io.r2dbc.postgresql.codec.BuiltinDynamicCodecs; - provides io.r2dbc.spi.ConnectionFactoryProvider with - io.r2dbc.postgresql.PostgresqlConnectionFactoryProvider; - - uses io.r2dbc.postgresql.extension.Extension; - -} diff --git a/frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Handler.java b/frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Controller.java similarity index 96% rename from frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Handler.java rename to frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Controller.java index 1e7052c275e..639ec561159 100644 --- a/frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Handler.java +++ b/frameworks/Java/inverno/src/main/java/com/techempower/inverno/benchmark/internal/Controller.java @@ -23,13 +23,14 @@ import io.inverno.mod.base.concurrent.Reactor; import io.inverno.mod.base.concurrent.ReactorScope; import io.inverno.mod.base.converter.ConverterException; +import io.inverno.mod.http.base.ExchangeContext; import io.inverno.mod.http.base.HttpException; import io.inverno.mod.http.base.InternalServerErrorException; import io.inverno.mod.http.base.Parameter; import io.inverno.mod.http.base.Status; import io.inverno.mod.http.server.Exchange; -import io.inverno.mod.http.server.ExchangeContext; -import io.inverno.mod.http.server.RootExchangeHandler; +import io.inverno.mod.http.server.ErrorExchange; +import io.inverno.mod.http.server.ServerController; import io.inverno.mod.sql.SqlClient; import io.inverno.mod.sql.UnsafeSqlOperations; import io.netty.buffer.ByteBuf; @@ -42,7 +43,7 @@ import reactor.core.publisher.Mono; @Bean( visibility = Visibility.PRIVATE ) -public class Handler implements RootExchangeHandler> { +public class Controller implements ServerController, ErrorExchange> { private static final String PATH_PLAINTEXT = "/plaintext"; private static final String PATH_JSON = "/json"; @@ -65,7 +66,7 @@ public class Handler implements RootExchangeHandler> sqlClient ) { diff --git a/frameworks/Java/inverno/src/main/java/module-info.java b/frameworks/Java/inverno/src/main/java/module-info.java index 7f0f44d7b65..fefbf5c52a6 100644 --- a/frameworks/Java/inverno/src/main/java/module-info.java +++ b/frameworks/Java/inverno/src/main/java/module-info.java @@ -16,9 +16,9 @@ requires io.vertx.core; requires java.sql; - requires transitive io.netty.transport; - requires static io.netty.transport.unix.common; - requires static io.netty.transport.epoll; + //requires transitive io.netty.transport; + //requires static io.netty.transport.unix.common; + //requires static io.netty.transport.epoll; exports com.techempower.inverno.benchmark; exports com.techempower.inverno.benchmark.model; diff --git a/frameworks/Java/javalin/pom.xml b/frameworks/Java/javalin/pom.xml index 77133c44ab4..f45da15fcaf 100644 --- a/frameworks/Java/javalin/pom.xml +++ b/frameworks/Java/javalin/pom.xml @@ -15,7 +15,7 @@ 2.0.3 2.13.4 5.0.1 - 42.5.1 + 42.7.2 4.7.2 2.2.3 diff --git a/frameworks/Java/jlhttp/pom.xml b/frameworks/Java/jlhttp/pom.xml index eea865c88aa..5f12f34226c 100644 --- a/frameworks/Java/jlhttp/pom.xml +++ b/frameworks/Java/jlhttp/pom.xml @@ -35,7 +35,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 com.zaxxer diff --git a/frameworks/Java/jooby/jooby-jetty.dockerfile b/frameworks/Java/jooby/jooby-jetty.dockerfile index e832ecc3359..bd3786886ca 100644 --- a/frameworks/Java/jooby/jooby-jetty.dockerfile +++ b/frameworks/Java/jooby/jooby-jetty.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.0-eclipse-temurin-17 +FROM maven:3.9.6-eclipse-temurin-21-jammy WORKDIR /jooby COPY pom.xml pom.xml COPY src src diff --git a/frameworks/Java/jooby/jooby-mvc.dockerfile b/frameworks/Java/jooby/jooby-mvc.dockerfile index 3153f04df69..feaeb23bc8e 100644 --- a/frameworks/Java/jooby/jooby-mvc.dockerfile +++ b/frameworks/Java/jooby/jooby-mvc.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.0-eclipse-temurin-17 +FROM maven:3.9.6-eclipse-temurin-21-jammy WORKDIR /jooby COPY pom.xml pom.xml COPY src src diff --git a/frameworks/Java/jooby/jooby-netty.dockerfile b/frameworks/Java/jooby/jooby-netty.dockerfile index 141f166e27c..dd6afe017c7 100644 --- a/frameworks/Java/jooby/jooby-netty.dockerfile +++ b/frameworks/Java/jooby/jooby-netty.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.0-eclipse-temurin-17 +FROM maven:3.9.6-eclipse-temurin-21-jammy WORKDIR /jooby COPY pom.xml pom.xml COPY src src diff --git a/frameworks/Java/jooby/jooby-pgclient.dockerfile b/frameworks/Java/jooby/jooby-pgclient.dockerfile index b4a9ba32aad..e3c58df435c 100644 --- a/frameworks/Java/jooby/jooby-pgclient.dockerfile +++ b/frameworks/Java/jooby/jooby-pgclient.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.0-eclipse-temurin-17 +FROM maven:3.9.6-eclipse-temurin-21-jammy WORKDIR /jooby COPY pom.xml pom.xml COPY src src diff --git a/frameworks/Java/jooby/jooby.dockerfile b/frameworks/Java/jooby/jooby.dockerfile index d262363b076..98d1b029d36 100644 --- a/frameworks/Java/jooby/jooby.dockerfile +++ b/frameworks/Java/jooby/jooby.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.0-eclipse-temurin-17 +FROM maven:3.9.6-eclipse-temurin-21-jammy WORKDIR /jooby COPY pom.xml pom.xml COPY src src diff --git a/frameworks/Java/jooby/pom.xml b/frameworks/Java/jooby/pom.xml index 975c8359c1e..90b9758b991 100644 --- a/frameworks/Java/jooby/pom.xml +++ b/frameworks/Java/jooby/pom.xml @@ -11,12 +11,12 @@ jooby - 3.0.5 - 1.10.0 - 42.6.0 + 3.0.8 + 2.0.2 + 42.7.2 UTF-8 - 17 - 17 + 21 + 21 com.techempower.App @@ -41,7 +41,7 @@ com.mysql mysql-connector-j - 8.0.33 + 8.3.0 @@ -55,13 +55,13 @@ io.vertx vertx-pg-client - 4.4.4 + 4.5.4 com.dslplatform - dsl-json-java8 + dsl-json ${dsl-json.version} @@ -72,7 +72,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.5.0 add-source @@ -91,7 +91,7 @@ com.fizzed rocker-maven-plugin - 1.3.0 + 1.4.0 generate-rocker-templates @@ -110,7 +110,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.12.1 @@ -120,7 +120,7 @@ com.dslplatform - dsl-json-java8 + dsl-json ${dsl-json.version} @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.4.1 + 3.5.2 uber-jar diff --git a/frameworks/Java/light-java/pom.xml b/frameworks/Java/light-java/pom.xml index b7747ab7bb8..eca4217eec8 100644 --- a/frameworks/Java/light-java/pom.xml +++ b/frameworks/Java/light-java/pom.xml @@ -24,11 +24,11 @@ 11 11 2.0.1 - 1.2.3 + 1.3.12 2.3.5.Final 3.3.1 8.0.28 - 42.4.1 + 42.7.2 1.8.4 0.9.6 3.8.0 diff --git a/frameworks/Java/micronaut/common/src/main/java/benchmark/controller/AsyncBenchmarkController.java b/frameworks/Java/micronaut/common/src/main/java/benchmark/controller/AsyncBenchmarkController.java index 7e40c36a204..df8824142a8 100644 --- a/frameworks/Java/micronaut/common/src/main/java/benchmark/controller/AsyncBenchmarkController.java +++ b/frameworks/Java/micronaut/common/src/main/java/benchmark/controller/AsyncBenchmarkController.java @@ -9,12 +9,15 @@ import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; import io.micronaut.http.annotation.QueryValue; +import io.micronaut.scheduling.TaskExecutors; +import jakarta.inject.Named; import views.fortunes; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.concurrent.CompletionStage; +import java.util.concurrent.Executor; import static java.util.Comparator.comparing; @@ -24,11 +27,14 @@ public class AsyncBenchmarkController extends AbstractBenchmarkController { private final AsyncWorldRepository worldRepository; private final AsyncFortuneRepository fortuneRepository; + private final Executor executor; public AsyncBenchmarkController(AsyncWorldRepository worldRepository, - AsyncFortuneRepository fortuneRepository) { + AsyncFortuneRepository fortuneRepository, + @Named(TaskExecutors.BLOCKING) Executor executor) { this.worldRepository = worldRepository; this.fortuneRepository = fortuneRepository; + this.executor = executor; } @Get("/prepare-data-for-test") @@ -39,7 +45,7 @@ public CompletionStage prepareDataForTest() { // https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#single-database-query @Get("/db") public CompletionStage db() { - return worldRepository.findById(randomId()); + return worldRepository.findById(randomId()).thenApplyAsync(world -> world, executor); } // https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#multiple-database-queries @@ -50,20 +56,20 @@ public CompletionStage> queries(@QueryValue String queries) { for (int i = 0; i < count; i++) { ids.add(randomId()); } - return worldRepository.findByIds(ids); + return worldRepository.findByIds(ids).thenApplyAsync(worlds -> worlds, executor); } // https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#fortunes @Get(value = "/fortunes", produces = "text/html;charset=utf-8") public CompletionStage> fortune() { - return fortuneRepository.findAll().thenApply(fortuneList -> { + return fortuneRepository.findAll().thenApplyAsync(fortuneList -> { List all = new ArrayList<>(fortuneList.size() + 1); all.add(new Fortune(0, "Additional fortune added at request time.")); all.addAll(fortuneList); all.sort(comparing(Fortune::message)); String body = fortunes.template(all).render().toString(); return HttpResponse.ok(body).contentType("text/html;charset=utf-8"); - }); + }, executor); } // https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#database-updates @@ -74,7 +80,7 @@ public CompletionStage> updates(@QueryValue String queries) { world.setRandomNumber(randomWorldNumber()); } worlds.sort(Comparator.comparingInt(World::getId)); // Avoid deadlock - return worldRepository.updateAll(worlds).thenApply(ignore -> worlds); + return worldRepository.updateAll(worlds).thenApplyAsync(ignore -> worlds, executor); }); } diff --git a/frameworks/Java/micronaut/gradle.properties b/frameworks/Java/micronaut/gradle.properties index b292646568c..a52f36963cb 100644 --- a/frameworks/Java/micronaut/gradle.properties +++ b/frameworks/Java/micronaut/gradle.properties @@ -1 +1 @@ -micronautVersion = 4.1.6 +micronautVersion = 4.2.2 diff --git a/frameworks/Java/netty/pom.xml b/frameworks/Java/netty/pom.xml index e11a42ffc60..3b1f26781de 100644 --- a/frameworks/Java/netty/pom.xml +++ b/frameworks/Java/netty/pom.xml @@ -11,7 +11,7 @@ 11 11 - 4.1.92.Final + 4.1.108.Final 0.0.21.Final diff --git a/frameworks/Java/proteus/pom.xml b/frameworks/Java/proteus/pom.xml index cb4a0fe1a90..6840966094d 100644 --- a/frameworks/Java/proteus/pom.xml +++ b/frameworks/Java/proteus/pom.xml @@ -252,7 +252,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 diff --git a/frameworks/Java/quarkus/benchmark_config.json b/frameworks/Java/quarkus/benchmark_config.json index 9b838d3e98a..dd7fa017935 100644 --- a/frameworks/Java/quarkus/benchmark_config.json +++ b/frameworks/Java/quarkus/benchmark_config.json @@ -1,5 +1,6 @@ { "framework": "quarkus", + "maintainers": ["franz1981", "Sanne", "geoand"], "tests": [ { "default": { @@ -21,7 +22,7 @@ "webserver": "Vert.x", "os": "Linux", "database_os": "Linux", - "display_name": "Quarkus, Hibernate ORM", + "display_name": "Quarkus, Hibernate", "notes": "", "versus": "Netty" }, @@ -44,9 +45,55 @@ "webserver": "Vert.x", "os": "Linux", "database_os": "Linux", - "display_name": "Quarkus, Hibernate Reactive", + "display_name": "Quarkus, Reactive", "notes": "", "versus": "Netty" + }, + "vertx": { + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "Quarkus", + "language": "Java", + "flavor": "None", + "orm": "Raw", + "platform": "Vert.x", + "webserver": "Vert.x", + "os": "Linux", + "database_os": "Linux", + "display_name": "Quarkus, Vert.x", + "notes": "", + "versus": "Vert.x" + }, + "reactive-routes-pgclient": { + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "fullstack", + "database": "Postgres", + "framework": "Quarkus", + "language": "Java", + "flavor": "None", + "orm": "Raw", + "platform": "Vert.x", + "webserver": "Vert.x", + "os": "Linux", + "database_os": "Linux", + "display_name": "Quarkus, PostgreSQL", + "notes": "", + "versus": "Vert.x" } } ] diff --git a/frameworks/Java/quarkus/config.toml b/frameworks/Java/quarkus/config.toml index f6281628ac5..a11c64b4d76 100644 --- a/frameworks/Java/quarkus/config.toml +++ b/frameworks/Java/quarkus/config.toml @@ -34,3 +34,37 @@ orm = "Full" platform = "RESTEasy Reactive" webserver = "Vert.x" versus = "Netty" + +[vertx] +urls.plaintext = "/plaintext" +urls.json = "/json" +urls.db = "/db" +urls.query = "/queries?queries=" +urls.update = "/updates?queries=" +urls.fortune = "/fortunes" +approach = "Realistic" +classification = "Micro" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "Vert.x" +webserver = "Vert.x" +versus = "Vert.x" + +[reactive-routes-pgclient] +urls.plaintext = "/plaintext" +urls.json = "/json" +urls.db = "/db" +urls.query = "/queries?queries=" +urls.update = "/updates?queries=" +urls.fortune = "/fortunes" +approach = "Realistic" +classification = "fullstack" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "Vert.x" +webserver = "Vert.x" +versus = "Vert.x" diff --git a/frameworks/Java/quarkus/pom.xml b/frameworks/Java/quarkus/pom.xml index b0d16552e18..0739e3171f7 100644 --- a/frameworks/Java/quarkus/pom.xml +++ b/frameworks/Java/quarkus/pom.xml @@ -28,6 +28,8 @@ quarkus-benchmark-common resteasy-reactive-hibernate resteasy-reactive-hibernate-reactive + vertx + reactive-routes-pgclient diff --git a/frameworks/Java/quarkus/quarkus-hibernate-reactive.dockerfile b/frameworks/Java/quarkus/quarkus-hibernate-reactive.dockerfile index 8e671d7d02f..c9bd706429a 100644 --- a/frameworks/Java/quarkus/quarkus-hibernate-reactive.dockerfile +++ b/frameworks/Java/quarkus/quarkus-hibernate-reactive.dockerfile @@ -8,6 +8,8 @@ COPY --chown=185 pom.xml pom.xml COPY --chown=185 quarkus-benchmark-common quarkus-benchmark-common/ COPY --chown=185 resteasy-reactive-hibernate resteasy-reactive-hibernate/ COPY --chown=185 resteasy-reactive-hibernate-reactive resteasy-reactive-hibernate-reactive/ +COPY --chown=185 vertx vertx/ +COPY --chown=185 reactive-routes-pgclient reactive-routes-pgclient/ # Uncomment to test pre-release quarkus #RUN mkdir -p /root/.m2/repository/io diff --git a/frameworks/Java/quarkus/quarkus-reactive-routes-pgclient.dockerfile b/frameworks/Java/quarkus/quarkus-reactive-routes-pgclient.dockerfile new file mode 100644 index 00000000000..cfd9baa9b41 --- /dev/null +++ b/frameworks/Java/quarkus/quarkus-reactive-routes-pgclient.dockerfile @@ -0,0 +1,45 @@ +FROM registry.access.redhat.com/ubi8/openjdk-17:1.15 as maven +ENV LANGUAGE='en_US:en' + +WORKDIR /quarkus +ENV MODULE=reactive-routes-pgclient + +COPY --chown=185 pom.xml pom.xml +COPY --chown=185 quarkus-benchmark-common quarkus-benchmark-common/ +COPY --chown=185 resteasy-reactive-hibernate resteasy-reactive-hibernate/ +COPY --chown=185 resteasy-reactive-hibernate-reactive resteasy-reactive-hibernate-reactive/ +COPY --chown=185 vertx vertx/ +COPY --chown=185 reactive-routes-pgclient reactive-routes-pgclient/ + +# Uncomment to test pre-release quarkus +#RUN mkdir -p /root/.m2/repository/io +#COPY m2-quarkus /root/.m2/repository/io/quarkus + +USER 185 +WORKDIR /quarkus +RUN mvn -DskipTests install -pl :benchmark,:quarkus-benchmark-common -B -q + +WORKDIR /quarkus/$MODULE +RUN mvn dependency:go-offline -B -q +WORKDIR /quarkus + +COPY $MODULE/src $MODULE/src + +WORKDIR /quarkus/$MODULE +RUN mvn package -B -q +WORKDIR /quarkus + +FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.15 +ENV LANGUAGE='en_US:en' +WORKDIR /quarkus +ENV MODULE=reactive-routes-pgclient + +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/lib/ lib +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/app/ app +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/quarkus/ quarkus +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/quarkus-run.jar quarkus-run.jar +COPY --chown=185 run_quarkus.sh run_quarkus.sh + +EXPOSE 8080 +USER 185 +ENTRYPOINT "./run_quarkus.sh" diff --git a/frameworks/Java/quarkus/quarkus-vertx.dockerfile b/frameworks/Java/quarkus/quarkus-vertx.dockerfile new file mode 100644 index 00000000000..48ef610e0cd --- /dev/null +++ b/frameworks/Java/quarkus/quarkus-vertx.dockerfile @@ -0,0 +1,45 @@ +FROM registry.access.redhat.com/ubi8/openjdk-17:1.15 as maven +ENV LANGUAGE='en_US:en' + +WORKDIR /quarkus +ENV MODULE=vertx + +COPY --chown=185 pom.xml pom.xml +COPY --chown=185 quarkus-benchmark-common quarkus-benchmark-common/ +COPY --chown=185 resteasy-reactive-hibernate resteasy-reactive-hibernate/ +COPY --chown=185 resteasy-reactive-hibernate-reactive resteasy-reactive-hibernate-reactive/ +COPY --chown=185 vertx vertx/ +COPY --chown=185 reactive-routes-pgclient reactive-routes-pgclient/ + +# Uncomment to test pre-release quarkus +#RUN mkdir -p /root/.m2/repository/io +#COPY m2-quarkus /root/.m2/repository/io/quarkus + +USER 185 +WORKDIR /quarkus +RUN mvn -DskipTests install -pl :benchmark,:quarkus-benchmark-common -B -q + +WORKDIR /quarkus/$MODULE +RUN mvn dependency:go-offline -B -q +WORKDIR /quarkus + +COPY $MODULE/src $MODULE/src + +WORKDIR /quarkus/$MODULE +RUN mvn package -B -q +WORKDIR /quarkus + +FROM registry.access.redhat.com/ubi8/openjdk-17-runtime:1.15 +ENV LANGUAGE='en_US:en' +WORKDIR /quarkus +ENV MODULE=vertx + +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/lib/ lib +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/app/ app +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/quarkus/ quarkus +COPY --chown=185 --from=maven /quarkus/$MODULE/target/quarkus-app/quarkus-run.jar quarkus-run.jar +COPY --chown=185 run_quarkus.sh run_quarkus.sh + +EXPOSE 8080 +USER 185 +ENTRYPOINT "./run_quarkus.sh" diff --git a/frameworks/Java/quarkus/quarkus.dockerfile b/frameworks/Java/quarkus/quarkus.dockerfile index 05ad3c1896e..506b0532eea 100644 --- a/frameworks/Java/quarkus/quarkus.dockerfile +++ b/frameworks/Java/quarkus/quarkus.dockerfile @@ -8,6 +8,8 @@ COPY --chown=185 pom.xml pom.xml COPY --chown=185 quarkus-benchmark-common quarkus-benchmark-common/ COPY --chown=185 resteasy-reactive-hibernate resteasy-reactive-hibernate/ COPY --chown=185 resteasy-reactive-hibernate-reactive resteasy-reactive-hibernate-reactive/ +COPY --chown=185 vertx vertx/ +COPY --chown=185 reactive-routes-pgclient reactive-routes-pgclient/ # Uncomment to test pre-release quarkus #RUN mkdir -p /root/.m2/repository/io diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/pom.xml b/frameworks/Java/quarkus/reactive-routes-pgclient/pom.xml new file mode 100644 index 00000000000..599183b4656 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + + io.quarkus + benchmark + 1.0-SNAPSHOT + + + reactive-routes-pgclient + + + + io.quarkus + quarkus-benchmark-common + + + io.quarkus + quarkus-reactive-pg-client + + + io.quarkus + quarkus-scheduler + + + io.quarkus + quarkus-reactive-routes + + + io.vertx + vertx-web + + + io.vertx + vertx-web-templ-rocker + + + + com.google.guava + guava + 32.0.0-jre + + + io.netty + netty-transport-native-epoll + linux-x86_64 + + + + + + + com.fizzed + rocker-maven-plugin + 1.3.0 + + + generate-rocker-templates + generate-sources + + generate + + + ${project.basedir}/src/main/resources + true + true + false + + + + + + + com.google.guava + guava + 32.0.0-jre + + + + + + + + \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/filter/ServerHeaderFilter.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/filter/ServerHeaderFilter.java new file mode 100644 index 00000000000..d9bc3ce8a66 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/filter/ServerHeaderFilter.java @@ -0,0 +1,36 @@ +package io.quarkus.benchmark.filter; + +import io.quarkus.scheduler.Scheduled; +import io.quarkus.vertx.web.RouteFilter; +import io.vertx.core.http.HttpHeaders; +import io.vertx.ext.web.RoutingContext; +import jakarta.annotation.PostConstruct; +import jakarta.inject.Singleton; + +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; + +@Singleton +public class ServerHeaderFilter { + + private static final CharSequence SERVER_HEADER_VALUE = HttpHeaders.createOptimized("Quarkus"); + private CharSequence date; + + @PostConstruct + public void init() { + updateDate(); + } + + @Scheduled(every = "1s") + void updateDate() { + date = HttpHeaders.createOptimized(DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now())); + } + + @RouteFilter(100) + void addDefaultHeaders(final RoutingContext rc) { + final var headers = rc.response().headers(); + headers.add(HttpHeaders.SERVER, SERVER_HEADER_VALUE); + headers.add(HttpHeaders.DATE, date); + rc.next(); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/Fortune.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/Fortune.java new file mode 100644 index 00000000000..ed941d8b505 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/Fortune.java @@ -0,0 +1,25 @@ +package io.quarkus.benchmark.model; + +public class Fortune implements Comparable { + + private final int id; + private final String message; + + public Fortune(final int id, final String message) { + this.id = id; + this.message = message; + } + + public int getId() { + return id; + } + + public String getMessage() { + return message; + } + + @Override + public int compareTo(final Fortune other) { + return message.compareTo(other.message); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/World.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/World.java new file mode 100644 index 00000000000..f56b7dd0850 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/model/World.java @@ -0,0 +1,29 @@ +package io.quarkus.benchmark.model; + +public class World implements Comparable { + + private final Integer id; + private Integer randomNumber; + + public World(final Integer id, final Integer randomNumber) { + this.id = id; + this.randomNumber = randomNumber; + } + + public Integer getId() { + return id; + } + + public int getRandomNumber() { + return randomNumber; + } + + public void setRandomNumber(final Integer randomNumber) { + this.randomNumber = randomNumber; + } + + @Override + public int compareTo(final World o) { + return id.compareTo(o.id); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java new file mode 100644 index 00000000000..bba1ae2e4c7 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java @@ -0,0 +1,29 @@ +package io.quarkus.benchmark.repository; + +import java.util.ArrayList; +import java.util.List; + +import io.quarkus.benchmark.model.Fortune; +import io.smallrye.mutiny.Uni; +import io.vertx.mutiny.sqlclient.Row; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +@Singleton +public class FortuneRepository { + + @Inject + PgClients clients; + + public Uni> findAll() { + return clients.getClient().preparedQuery("SELECT * FROM Fortune") + .execute() + .map(rowset -> { + final List ret = new ArrayList<>(rowset.size() + 1); + for (final Row r : rowset) { + ret.add(new Fortune(r.getInteger(0), r.getString(1))); + } + return ret; + }); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java new file mode 100644 index 00000000000..77297726a79 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java @@ -0,0 +1,58 @@ +package io.quarkus.benchmark.repository; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import io.vertx.mutiny.sqlclient.SqlClient; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import org.eclipse.microprofile.config.inject.ConfigProperty; + +import io.vertx.mutiny.core.Vertx; +import io.vertx.mutiny.pgclient.PgPool; +import io.vertx.pgclient.PgConnectOptions; +import io.vertx.sqlclient.PoolOptions; + +@Singleton +public class PgClientFactory { + + // vertx-reactive:postgresql://tfb-database:5432/hello_world + private static final String PG_URI_MATCHER = "vertx-reactive:postgresql://([-a-zA-Z]+):([0-9]+)/(.*)"; + + @ConfigProperty(name = "quarkus.datasource.url") + String url; + + @ConfigProperty(name = "quarkus.datasource.username") + String user; + + @ConfigProperty(name = "quarkus.datasource.password") + String pass; + + @Inject + Vertx vertx; + + @Produces + @Singleton + public PgClients pgClients() { + return new PgClients(this); + } + + + SqlClient sqlClient(final int size) { + final PoolOptions options = new PoolOptions(); + final PgConnectOptions connectOptions = new PgConnectOptions(); + final Matcher matcher = Pattern.compile(PG_URI_MATCHER).matcher(url); + matcher.matches(); + connectOptions.setDatabase(matcher.group(3)); + connectOptions.setHost(matcher.group(1)); + connectOptions.setPort(Integer.parseInt(matcher.group(2))); + connectOptions.setUser(user); + connectOptions.setPassword(pass); + connectOptions.setCachePreparedStatements(true); + // Large pipelining means less flushing and we use a single connection anyway + connectOptions.setPipeliningLimit(100_000); + options.setMaxSize(size); + return PgPool.client(vertx, connectOptions, options); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClients.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClients.java new file mode 100644 index 00000000000..8b54a9cab24 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/PgClients.java @@ -0,0 +1,33 @@ +package io.quarkus.benchmark.repository; + +import io.netty.util.concurrent.FastThreadLocal; +import io.vertx.mutiny.sqlclient.SqlClient; + +class PgClients { + private final FastThreadLocal sqlClient = new FastThreadLocal<>() { + @Override + protected void onRemoval(final SqlClient value) { + if (value != null) { + value.close(); + } + } + }; + private PgClientFactory pgClientFactory; + + // for ArC + public PgClients() { + } + + public PgClients(final PgClientFactory pgClientFactory) { + this.pgClientFactory = pgClientFactory; + } + + SqlClient getClient() { + SqlClient ret = sqlClient.get(); + if (ret == null) { + ret = pgClientFactory.sqlClient(1); + sqlClient.set(ret); + } + return ret; + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java new file mode 100644 index 00000000000..630be2b3861 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java @@ -0,0 +1,59 @@ +package io.quarkus.benchmark.repository; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import io.quarkus.benchmark.model.World; +import io.smallrye.mutiny.Uni; +import io.vertx.core.json.JsonObject; +import io.vertx.mutiny.sqlclient.Row; +import io.vertx.mutiny.sqlclient.Tuple; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +@Singleton +public class WorldRepository { + + //like muggle's JsonWorld + public static class JsonWorld extends JsonObject { + public JsonWorld(final Integer id, final Integer randomNumber) { + super(Map.of("id", id, "randomNumber", randomNumber)); + } + } + + + @Inject + PgClients clients; + + + public Uni findAsJsonWorld(final Integer id) { + return clients.getClient().preparedQuery("SELECT id, randomNumber FROM World WHERE id = $1") + .execute(Tuple.of(id)) + .map(rowset -> { + final Row row = rowset.iterator().next(); + return new JsonWorld(row.getInteger(0), row.getInteger(1)); + }); + } + + public Uni find(final Integer id) { + return clients.getClient().preparedQuery("SELECT id, randomNumber FROM World WHERE id = $1") + .execute(Tuple.of(id)) + .map(rowset -> { + final Row row = rowset.iterator().next(); + return new World(row.getInteger(0), row.getInteger(1)); + }); + } + + public Uni update(final World[] worlds) { + Arrays.sort(worlds); + final List args = new ArrayList<>(worlds.length); + for (final World world : worlds) { + args.add(Tuple.of(world.getId(), world.getRandomNumber())); + } + return clients.getClient().preparedQuery("UPDATE World SET randomNumber = $2 WHERE id = $1") + .executeBatch(args) + .map(v -> null); + } +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/BaseResource.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/BaseResource.java new file mode 100644 index 00000000000..13a14912ce2 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/BaseResource.java @@ -0,0 +1,32 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.json.JsonArray; +import io.vertx.core.json.JsonObject; +import io.vertx.core.json.jackson.JacksonCodec; +import io.vertx.ext.web.RoutingContext; + +public abstract class BaseResource { + + // TODO verify how to override/replace io.quarkus.vertx.runtime.jackson.QuarkusJacksonFactory in io.vertx.core.spi.JsonFactory + private static final JacksonCodec JACKSON_CODEC = new JacksonCodec(); + + void sendJson(final RoutingContext rc, final JsonObject json) { + var response = rc.response(); + response.headers().add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + response.end(JACKSON_CODEC.toBuffer(json, false), null); + } + + void sendJson(final RoutingContext rc, final JsonArray json) { + var response = rc.response(); + response.headers().add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + response.end(JACKSON_CODEC.toBuffer(json, false), null); + } + + Void handleFail(final RoutingContext rc, final Throwable t) { + rc.response().setStatusCode(500).end(t.toString()); + return null; + } + +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/DbResource.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/DbResource.java new file mode 100644 index 00000000000..e2533434d24 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/DbResource.java @@ -0,0 +1,102 @@ +package io.quarkus.benchmark.resource; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.concurrent.ThreadLocalRandom; +import java.util.stream.IntStream; + +import io.quarkus.benchmark.model.World; +import io.quarkus.benchmark.repository.WorldRepository; +import io.quarkus.benchmark.repository.WorldRepository.JsonWorld; +import io.quarkus.vertx.web.Route; +import io.smallrye.mutiny.Uni; +import io.vertx.core.json.JsonArray; +import io.vertx.ext.web.RoutingContext; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + + +@Singleton +public class DbResource extends BaseResource { + + @Inject + WorldRepository worldRepository; + + @Route(path = "db") + public void db(final RoutingContext rc) { + worldRepository.findAsJsonWorld(boxedRandomWorldNumber()) + .subscribe().with(world -> sendJson(rc, world), + t -> handleFail(rc, t)); + } + + @Route(path = "queries") + public void queries(final RoutingContext rc) { + final var queries = rc.request().getParam("queries"); + final var worlds = new Uni[parseQueryCount(queries)]; + final var ret = new JsonWorld[worlds.length]; + // replace below with a for loop + Arrays.setAll(worlds, i -> { + return worldRepository.findAsJsonWorld(boxedRandomWorldNumber()).map(w -> ret[i] = w); + }); + + Uni.combine().all().unis(worlds) + .combinedWith(v -> Arrays.asList(ret)) + .subscribe().with(list -> { + sendJson(rc, new JsonArray(list)); + }, + t -> handleFail(rc, t)); + } + + @Route(path = "updates") + public void updates(final RoutingContext rc) { + final var queries = rc.request().getParam("queries"); + final var worlds = new Uni[parseQueryCount(queries)]; + final var wordsToUpdate = new World[worlds.length]; + Arrays.setAll(worlds, i -> { + return randomWorld().map(w -> { + w.setRandomNumber(boxedRandomWorldNumber()); + wordsToUpdate[i] = w; + return w; + }); + }); + + Uni.combine().all().unis(worlds) + .combinedWith(v -> null) + .flatMap(v -> worldRepository.update(wordsToUpdate)) + .map(updated -> wordsToUpdate) + .subscribe().with(updatedWordsOrderedById -> { + final var jsonWorlds = new JsonArray(new ArrayList<>(updatedWordsOrderedById.length)); + for (final World world : updatedWordsOrderedById) { + jsonWorlds.add(new JsonWorld(world.getId(), world.getRandomNumber())); + } + sendJson(rc, jsonWorlds); + }, + t -> handleFail(rc, t)); + } + + private Uni randomWorld() { + return worldRepository.find(boxedRandomWorldNumber()); + } + + private static final Integer[] BOXED_RND = IntStream.range(1, 10001).boxed().toArray(Integer[]::new); + + private static Integer boxedRandomWorldNumber() { + final int rndValue = ThreadLocalRandom.current().nextInt(1, 10001); + final var boxedRnd = BOXED_RND[rndValue - 1]; + assert boxedRnd.intValue() == rndValue; + return boxedRnd; + } + + private static int parseQueryCount(final String textValue) { + if (textValue == null) { + return 1; + } + final int parsedValue; + try { + parsedValue = Integer.parseInt(textValue); + } catch (final NumberFormatException e) { + return 1; + } + return Math.min(500, Math.max(1, parsedValue)); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/FortuneResource.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/FortuneResource.java new file mode 100644 index 00000000000..5289a52a194 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/FortuneResource.java @@ -0,0 +1,43 @@ +package io.quarkus.benchmark.resource; + +import java.util.Collections; + +import io.quarkus.benchmark.model.Fortune; +import io.quarkus.benchmark.rocker.VertxRawRockerOutputFactories; +import io.quarkus.benchmark.repository.FortuneRepository; +import io.quarkus.vertx.web.Route; +import io.vertx.core.http.HttpHeaders; +import io.vertx.ext.web.RoutingContext; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import views.Fortunes; + +@Singleton +public class FortuneResource extends BaseResource { + + private static final CharSequence HTML_UTF8_CONTENT_TYPE = HttpHeaders.createOptimized("text/html; charset=UTF-8"); + + @Inject + FortuneRepository repository; + @Inject + VertxRawRockerOutputFactories factories; + + public FortuneResource() { + + } + + @Route(path = "fortunes") + public void fortunes(final RoutingContext rc) { + repository.findAll() + .subscribe() + .with(fortunes -> { + fortunes.add(new Fortune(0, "Additional fortune added at request time.")); + Collections.sort(fortunes); + final var vertxRockerOutput = Fortunes.template(fortunes).render(factories.ioFactory()); + var res = rc.response(); + res.headers().add(HttpHeaders.CONTENT_TYPE, HTML_UTF8_CONTENT_TYPE); + res.end(vertxRockerOutput.buffer(), null); + }, + t -> handleFail(rc, t)); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonMessage.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonMessage.java new file mode 100644 index 00000000000..5a2b743a19b --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonMessage.java @@ -0,0 +1,12 @@ +package io.quarkus.benchmark.resource; + +import io.vertx.core.json.JsonObject; + +import java.util.Map; + +public class JsonMessage extends JsonObject { + + public JsonMessage(final String message) { + super(Map.of("message", message)); + } +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonResource.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonResource.java new file mode 100644 index 00000000000..d53a821b1d3 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/JsonResource.java @@ -0,0 +1,17 @@ +package io.quarkus.benchmark.resource; + + +import io.quarkus.vertx.web.Route; +import io.vertx.ext.web.RoutingContext; +import jakarta.inject.Singleton; + +@Singleton +public class JsonResource extends BaseResource { + + private static final String HELLO = "Hello, World!"; + + @Route(path = "json") + public void json(final RoutingContext rc) { + sendJson(rc, new JsonMessage(HELLO)); + } +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/PlaintextResource.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/PlaintextResource.java new file mode 100644 index 00000000000..fcd24cadcfd --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/resource/PlaintextResource.java @@ -0,0 +1,24 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.quarkus.vertx.web.Route; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpHeaders; +import io.vertx.ext.web.RoutingContext; +import jakarta.inject.Singleton; + +@Singleton +public class PlaintextResource { + private static final String HELLO_WORLD = "Hello, world!"; + private static final Buffer HELLO_WORLD_BUFFER = Buffer.buffer(HELLO_WORLD, "UTF-8"); + private static final CharSequence HELLO_WORLD_LENGTH = HttpHeaders.createOptimized("" + HELLO_WORLD.length()); + + @Route(path = "plaintext") + public void plaintext(final RoutingContext rc) { + final var response = rc.response(); + final var headers = response.headers(); + headers.add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.TEXT_PLAIN); + headers.add(HttpHeaders.CONTENT_LENGTH, HELLO_WORLD_LENGTH); + response.end(HELLO_WORLD_BUFFER, null); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java new file mode 100644 index 00000000000..8dd5bec161b --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java @@ -0,0 +1,65 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.ContentType; +import com.fizzed.rocker.RockerOutputFactory; +import io.netty.buffer.ByteBuf; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.buffer.impl.PartialPooledByteBufAllocator; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +final class RawRockerOutput implements VertxRawRockerOutput { + + private final ByteBuf buff = PartialPooledByteBufAllocator.INSTANCE.directBuffer(); + private final Buffer buffer = Buffer.buffer(buff); + + RawRockerOutput() { + } + + public static RockerOutputFactory raw() { + final RawRockerOutput output = new RawRockerOutput(); + return (_contentType, charsetName) -> { + output.reset(); + return output; + }; + } + + private void reset() { + buff.resetReaderIndex(); + buff.resetWriterIndex(); + } + + @Override + public RawRockerOutput w(final byte[] bytes) throws IOException { + buffer.appendBytes(bytes); + return this; + } + + @Override + public RawRockerOutput w(final String s) throws IOException { + buffer.appendString(s); + return this; + } + + @Override + public ContentType getContentType() { + return ContentType.RAW; + } + + @Override + public Charset getCharset() { + return StandardCharsets.UTF_8; + } + + @Override + public int getByteLength() { + return buffer.length(); + } + + @Override + public Buffer buffer() { + return buffer; + } +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java new file mode 100644 index 00000000000..ada27e4e4bf --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java @@ -0,0 +1,15 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.RockerOutputFactory; +import io.vertx.core.buffer.Buffer; + +public interface VertxRawRockerOutput extends com.fizzed.rocker.RockerOutput { + + // factory + static RockerOutputFactory factory() { + return RawRockerOutput.raw(); + } + + Buffer buffer(); + +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java new file mode 100644 index 00000000000..faf834738c4 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java @@ -0,0 +1,29 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.RockerOutputFactory; +import io.netty.util.concurrent.FastThreadLocal; +import io.vertx.core.Context; +import jakarta.inject.Singleton; + +@Singleton +public class VertxRawRockerOutputFactories { + + private final FastThreadLocal> ioPool; + + VertxRawRockerOutputFactories() { + ioPool = new FastThreadLocal<>() { + @Override + protected RockerOutputFactory initialValue() { + if (!Context.isOnEventLoopThread()) { + return null; + } + return VertxRawRockerOutput.factory(); + } + }; + } + + public RockerOutputFactory ioFactory() { + return ioPool.get(); + } + +} diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/application.properties b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/application.properties new file mode 100644 index 00000000000..1175db6f746 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/application.properties @@ -0,0 +1,11 @@ +quarkus.datasource.url=vertx-reactive:postgresql://tfb-database:5432/hello_world +quarkus.datasource.username=benchmarkdbuser +quarkus.datasource.password=benchmarkdbpass +quarkus.datasource.reactive.max-size=64 +quarkus.log.console.enable=true +quarkus.log.console.level=INFO +quarkus.log.file.enable=false +quarkus.log.level=INFO +quarkus.vertx.prefer-native-transport=true + +quarkus.arc.context-propagation.enabled=false diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/import.sql b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/import.sql new file mode 100644 index 00000000000..f76881b4287 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/import.sql @@ -0,0 +1 @@ +INSERT INTO Fortune(id, message) VALUES (1, 'Test value One'); \ No newline at end of file diff --git a/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/views/Fortunes.rocker.html b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/views/Fortunes.rocker.html new file mode 100644 index 00000000000..cfa4f8341e2 --- /dev/null +++ b/frameworks/Java/quarkus/reactive-routes-pgclient/src/main/resources/views/Fortunes.rocker.html @@ -0,0 +1,8 @@ +@import java.util.* +@import io.quarkus.benchmark.model.* +@args(List fortunes) +Fortunes +@for ((ForIterator i, Fortune fortune) : fortunes) { + +} +
idmessage
@fortune.getId()@fortune.getMessage()
\ No newline at end of file diff --git a/frameworks/Java/quarkus/run_quarkus.sh b/frameworks/Java/quarkus/run_quarkus.sh index 7f8bc785fd1..e93ef48f616 100755 --- a/frameworks/Java/quarkus/run_quarkus.sh +++ b/frameworks/Java/quarkus/run_quarkus.sh @@ -10,6 +10,7 @@ # Consider using -Dquarkus.http.io-threads=$((`grep --count ^processor /proc/cpuinfo`)) \ JAVA_OPTIONS="-server \ + -Dquarkus.http.limits.max-body-size= \ -Dquarkus.vertx.prefer-native-transport=true \ -XX:-StackTraceInThrowable \ -Dquarkus.http.accept-backlog=-1 \ diff --git a/frameworks/Java/quarkus/vertx/pom.xml b/frameworks/Java/quarkus/vertx/pom.xml new file mode 100644 index 00000000000..e751ed6aa51 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + + io.quarkus + benchmark + 1.0-SNAPSHOT + + + io.quarkus.benchmark + vertx + + + + io.quarkus + quarkus-benchmark-common + + + io.quarkus + quarkus-arc + + + io.vertx + vertx-pg-client + ${vertx.version} + + + io.quarkus + quarkus-vertx + + + io.vertx + vertx-web-templ-rocker + + + + com.google.guava + guava + 32.0.0-jre + + + io.netty + netty-transport-native-epoll + linux-x86_64 + + + + + + + com.fizzed + rocker-maven-plugin + 1.3.0 + + + generate-rocker-templates + generate-sources + + generate + + + ${project.basedir}/src/main/resources + true + true + false + + + + + + + com.google.guava + guava + 32.0.0-jre + + + + + + + + diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/filter/HttpResponseDecorator.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/filter/HttpResponseDecorator.java new file mode 100644 index 00000000000..8fedfd8fe6b --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/filter/HttpResponseDecorator.java @@ -0,0 +1,40 @@ +package io.quarkus.benchmark.filter; + +import io.vertx.core.Vertx; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerResponse; +import jakarta.annotation.PreDestroy; +import jakarta.inject.Singleton; + +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; + +@Singleton +public class HttpResponseDecorator { + private static final CharSequence HEADER_DATE = HttpHeaders.createOptimized("date"); + private static final CharSequence QUARKUS_SERVER = HttpHeaders.createOptimized("quarkus"); + private final Vertx vertx; + private CharSequence date; + private final long timerId; + + public HttpResponseDecorator(final Vertx vertx) { + this.vertx = vertx; + date = createDateHeader(); + timerId = vertx.setPeriodic(1000, ignore -> date = createDateHeader()); + } + + public static CharSequence createDateHeader() { + return HttpHeaders.createOptimized(DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now())); + } + + @PreDestroy + public void destroy() { + vertx.cancelTimer(timerId); + } + + public void decorate(final HttpServerResponse response) { + final var headers = response.headers(); + headers.add(HttpHeaders.SERVER, QUARKUS_SERVER); + headers.add(HEADER_DATE, date); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/Fortune.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/Fortune.java new file mode 100644 index 00000000000..a8a56cc71b9 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/Fortune.java @@ -0,0 +1,24 @@ +package io.quarkus.benchmark.model; + +public class Fortune implements Comparable { + private final int id; + private final String message; + + public Fortune(final int id, final String message) { + this.id = id; + this.message = message; + } + + public int getId() { + return id; + } + + public String getMessage() { + return message; + } + + @Override + public int compareTo(final Fortune other) { + return message.compareTo(other.message); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/JsonMessage.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/JsonMessage.java new file mode 100644 index 00000000000..db58d8e1da4 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/JsonMessage.java @@ -0,0 +1,12 @@ +package io.quarkus.benchmark.model; + +import io.vertx.core.json.JsonObject; + +import java.util.Map; + +public class JsonMessage extends JsonObject { + + public JsonMessage(final String message) { + super(Map.of("message", message)); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/World.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/World.java new file mode 100644 index 00000000000..07f0b4f972e --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/model/World.java @@ -0,0 +1,24 @@ +package io.quarkus.benchmark.model; + +public final class World implements Comparable { + private final Integer id; + private final Integer randomNumber; + + public World(final Integer id, final Integer randomNumber) { + this.id = id; + this.randomNumber = randomNumber; + } + + public Integer getId() { + return id; + } + + public Integer getRandomNumber() { + return randomNumber; + } + + @Override + public int compareTo(final World o) { + return id.compareTo(o.id); + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java new file mode 100644 index 00000000000..4130f1f3cbd --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/FortuneRepository.java @@ -0,0 +1,44 @@ +package io.quarkus.benchmark.repository; + +import io.quarkus.benchmark.model.Fortune; +import io.vertx.core.AsyncResult; +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.sqlclient.Row; +import io.vertx.sqlclient.RowIterator; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Singleton +public class FortuneRepository { + + @Inject + PgConnectionPool pgConnectionPool; + + public void findAllSortedFortunes(final Handler>> resultHandler) { + pgConnectionPool.pgConnection().selectFortuneQuery() + .execute(fortuneRows -> { + if (fortuneRows.succeeded()) { + final List fortunes = new ArrayList<>(fortuneRows.result().size() + 1); + final RowIterator resultSet = fortuneRows.result().iterator(); + if (!resultSet.hasNext()) { + resultHandler.handle(Future.succeededFuture(List.of())); + return; + } + while (resultSet.hasNext()) { + final Row row = resultSet.next(); + fortunes.add(new Fortune(row.getInteger(0), row.getString(1))); + } + fortunes.add(new Fortune(0, "Additional fortune added at request time.")); + Collections.sort(fortunes); + resultHandler.handle(Future.succeededFuture(fortunes)); + } else { + resultHandler.handle(Future.failedFuture(fortuneRows.cause())); + } + }); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java new file mode 100644 index 00000000000..4289a644669 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgClientFactory.java @@ -0,0 +1,67 @@ +package io.quarkus.benchmark.repository; + +import io.vertx.core.Vertx; +import io.vertx.pgclient.PgConnectOptions; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Singleton; +import org.eclipse.microprofile.config.inject.ConfigProperty; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@Singleton +public class PgClientFactory { + + // vertx-reactive:postgresql://tfb-database:5432/hello_world + private static final String PG_URI_MATCHER = "vertx-reactive:postgresql://([-a-zA-Z]+):([0-9]+)/(.*)"; + @ConfigProperty(name = "quarkus.datasource.url") + String url; + @ConfigProperty(name = "quarkus.datasource.username") + String user; + @ConfigProperty(name = "quarkus.datasource.password") + String pass; + + private final Vertx vertx; + private PgConnectionPool pgConnectionPool; + + public PgClientFactory(final Vertx vertx) { + this.vertx = vertx; + } + + @Produces + @Singleton + PgConnectionPool connectionPool() { + PgConnectionPool pgConnectionPool = null; + try { + pgConnectionPool = new PgConnectionPool(vertx, pgConnectOptions()); + } catch (final Exception e) { + // TODO LOG ME: usually means inability to connect to the database + } finally { + this.pgConnectionPool = pgConnectionPool; + return pgConnectionPool; + } + } + + @PreDestroy + public void closeConnectionPool() { + if (pgConnectionPool != null) { + pgConnectionPool.close(); + } + } + + private PgConnectOptions pgConnectOptions() { + final PgConnectOptions options = new PgConnectOptions(); + final Matcher matcher = Pattern.compile(PG_URI_MATCHER).matcher(url); + matcher.matches(); + options.setDatabase(matcher.group(3)); + options.setHost(matcher.group(1)); + options.setPort(Integer.parseInt(matcher.group(2))); + options.setUser(user); + options.setPassword(pass); + options.setCachePreparedStatements(true); + // Large pipelining means less flushing and we use a single connection anyway + options.setPipeliningLimit(100_000); + return options; + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgConnectionPool.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgConnectionPool.java new file mode 100644 index 00000000000..0a04a9fde25 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/PgConnectionPool.java @@ -0,0 +1,208 @@ +package io.quarkus.benchmark.repository; + +import io.netty.util.concurrent.EventExecutor; +import io.netty.util.concurrent.FastThreadLocal; +import io.vertx.core.AsyncResult; +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.core.Promise; +import io.vertx.core.Vertx; +import io.vertx.pgclient.PgConnectOptions; +import io.vertx.pgclient.PgConnection; +import io.vertx.sqlclient.PreparedQuery; +import io.vertx.sqlclient.PreparedStatement; +import io.vertx.sqlclient.Row; +import io.vertx.sqlclient.RowSet; +import io.vertx.sqlclient.impl.SqlClientInternal; + +import java.util.ArrayList; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReferenceArray; + +public class PgConnectionPool implements AutoCloseable { + + static final String SELECT_WORLD = "SELECT id, randomnumber from WORLD where id=$1"; + static final String SELECT_FORTUNE = "SELECT id, message from FORTUNE"; + private final FastThreadLocal pgConnectionPool; + private final AtomicReferenceArray pgConnections; + + public PgConnectionPool(final Vertx vertx, final PgConnectOptions options) { + final var executors = new ArrayList(Runtime.getRuntime().availableProcessors()); + vertx.nettyEventLoopGroup().forEach(executors::add); + final var connectionsCompleted = new CompletableFuture<>(); + final var completedConnections = new AtomicReferenceArray>(executors.size()); + final var allCompleted = new AtomicInteger(executors.size()); + final var connectionAffinityMap = new ConcurrentHashMap(executors.size()); + for (int i = 0; i < executors.size(); i++) { + final int executorId = i; + executors.get(i).execute(() -> connect(vertx, options) + .onComplete(ar -> { + final boolean lastCompleted = allCompleted.decrementAndGet() == 0; + if (!completedConnections.compareAndSet(executorId, null, ar)) { + if (ar.succeeded()) { + ar.result().connection.close(); + } + } else if (ar.succeeded()) { + // assign the executorId to the connection + ar.result().executorId = executorId; + connectionAffinityMap.put(Thread.currentThread(), ar.result()); + } + if (lastCompleted) { + connectionsCompleted.complete(null); + } + })); + } + // TODO make the global timeout to be configurable + try { + connectionsCompleted.join(); + } catch (final Throwable t) { + // let's forcibly close all completed connections + forceCloseEstablishedConnections(completedConnections); + throw new IllegalStateException("cannot establish all connections", t); + } + // let's fast-fail if we cannot establish all connections + pgConnections = new AtomicReferenceArray<>(completedConnections.length()); + for (int i = 0; i < completedConnections.length(); i++) { + final AsyncResult ar = completedConnections.get(i); + if (ar == null || ar.failed()) { + forceCloseEstablishedConnections(completedConnections); + throw new IllegalStateException("cannot establish all connections"); + } else { + pgConnections.set(i, ar.result()); + } + } + pgConnectionPool = new FastThreadLocal<>() { + @Override + protected PgClientConnection initialValue() { + return connectionAffinityMap.get(Thread.currentThread()); + } + + @Override + protected void onRemoval(final PgClientConnection value) { + final PgClientConnection removed = connectionAffinityMap.remove(Thread.currentThread()); + if (removed != null) { + final var connectionToClose = pgConnections.getAndSet(removed.executorId, null); + if (connectionToClose != null) { + assert connectionToClose == removed; + connectionToClose.connection.close(); + } + } + } + }; + } + + private static Handler> onSuccess(final Handler handler) { + return ar -> { + if (ar.succeeded()) { + handler.handle(ar.result()); + } + }; + } + + private static Future connect(final Vertx vertx, final PgConnectOptions options) { + final PgClientConnection result = new PgClientConnection(); + final Promise connectionEstablished = Promise.promise(); + final var future = PgConnection.connect(vertx, options) + .flatMap(conn -> { + result.connection = (SqlClientInternal) conn; + final Future f1 = conn.prepare(SELECT_WORLD) + .andThen(onSuccess(ps -> result.SELECT_WORLD_QUERY = ps.query())); + final Future f2 = conn.prepare(SELECT_FORTUNE) + .andThen(onSuccess(ps -> result.SELECT_FORTUNE_QUERY = ps.query())); + + final int QUERIES = 500; + result.UPDATE_WORLD_QUERY = new PreparedQuery[QUERIES]; + var updateWorldQueries = new ArrayList>(QUERIES); + for (int queryCount = 1; queryCount <= QUERIES; queryCount++) { + updateWorldQueries.add(result.prepareUpdateQueryFor(conn, queryCount)); + } + return Future.join(f1, f2, Future.join(updateWorldQueries)); + }).onComplete(ar -> { + if (ar.failed() && result.connection != null) { + result.connection.close(); + } + }); + future.onComplete(ar -> { + if (ar.succeeded()) { + connectionEstablished.complete(result); + } else { + connectionEstablished.fail(ar.cause()); + } + }); + return connectionEstablished.future(); + } + + private static void forceCloseEstablishedConnections(final AtomicReferenceArray> completedConnections) { + final AsyncResult noResult = Future.succeededFuture(); + for (int i = 0; i < completedConnections.length(); i++) { + final AsyncResult ar = completedConnections.getAndSet(i, noResult); + if (ar != null && ar.succeeded() && ar.result() != null && ar.result().connection != null) { + try { + ar.result().connection.close(); + } catch (final Throwable t2) { + // ignore + } + } + } + } + + public PgClientConnection pgConnection() { + return pgConnectionPool.get(); + } + + @Override + public void close() { + for (int i = 0; i < pgConnections.length(); i++) { + final var connection = pgConnections.getAndSet(i, null); + if (connection != null) { + connection.connection.close(); + } + } + } + + public static class PgClientConnection { + private int executorId; + private PreparedQuery> SELECT_WORLD_QUERY; + private PreparedQuery> SELECT_FORTUNE_QUERY; + private PreparedQuery>[] UPDATE_WORLD_QUERY; + private SqlClientInternal connection; + + public PreparedQuery> selectWorldQuery() { + return SELECT_WORLD_QUERY; + } + + public PreparedQuery> selectFortuneQuery() { + return SELECT_FORTUNE_QUERY; + } + + public PreparedQuery> updateWorldQuery(int queryCount) { + return UPDATE_WORLD_QUERY[queryCount - 1]; + } + + private Future prepareUpdateQueryFor(PgConnection connection, int queryCount) { + return connection.prepare(updateQueryFor(queryCount)).andThen(onSuccess(ps -> UPDATE_WORLD_QUERY[queryCount - 1] = ps.query())); + } + private static String updateQueryFor(int queryCount) { + StringBuilder sql = new StringBuilder(); + sql.append("UPDATE WORLD SET RANDOMNUMBER = CASE ID"); + for (int i = 0; i < queryCount; i++) { + int offset = (i * 2) + 1; + sql.append(" WHEN $" + offset + " THEN $" + (offset + 1)); + } + sql.append(" ELSE RANDOMNUMBER"); + sql.append(" END WHERE ID IN ($1"); + for (int i = 1; i < queryCount; i++) { + int offset = (i * 2) + 1; + sql.append(",$" + offset); + } + sql.append(")"); + return sql.toString(); + } + + public SqlClientInternal rawConnection() { + return connection; + } + } +} \ No newline at end of file diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java new file mode 100644 index 00000000000..3095137ae5e --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/repository/WorldRepository.java @@ -0,0 +1,187 @@ +package io.quarkus.benchmark.repository; + +import io.quarkus.benchmark.model.World; +import io.vertx.core.AsyncResult; +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonArray; +import io.vertx.core.json.JsonObject; +import io.vertx.sqlclient.PreparedQuery; +import io.vertx.sqlclient.Row; +import io.vertx.sqlclient.RowIterator; +import io.vertx.sqlclient.RowSet; +import io.vertx.sqlclient.Tuple; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ThreadLocalRandom; +import java.util.stream.IntStream; + +@Singleton +public class WorldRepository { + + @Inject + private PgConnectionPool connectionPool; + + private static final Integer[] BOXED_RND = IntStream.range(1, 10001).boxed().toArray(Integer[]::new); + + private static Integer boxedRandomWorldNumber() { + final int rndValue = ThreadLocalRandom.current().nextInt(1, 10001); + final var boxedRnd = BOXED_RND[rndValue - 1]; + assert boxedRnd.intValue() == rndValue; + return boxedRnd; + } + + public void loadRandomJsonWorld(final Handler> worldHandler) { + connectionPool.pgConnection().selectWorldQuery().execute(Tuple.of(boxedRandomWorldNumber()), randomWorldRow -> { + if (randomWorldRow.succeeded()) { + final RowIterator resultSet = randomWorldRow.result().iterator(); + if (!resultSet.hasNext()) { + worldHandler.handle(Future.succeededFuture()); + return; + } + final Row row = resultSet.next(); + worldHandler.handle(Future.succeededFuture(new JsonWorld(row.getInteger(0), row.getInteger(1)))); + } else { + worldHandler.handle(Future.failedFuture(randomWorldRow.cause())); + } + }); + } + + public void loadNJsonWorlds(final int count, final Handler> worldsHandler) { + FindRandomWorldsCommand.execute(connectionPool, count, worldsHandler); + } + + public void updateNJsonWorlds(final int count, final Handler> worldsHandler) { + UpdateWorldsCommand.execute(connectionPool, count, worldsHandler); + } + + public static class JsonWorlds extends JsonArray { + private JsonWorlds(final int capacity) { + super(new ArrayList(capacity)); + } + + private JsonWorlds(final World[] worlds) { + this(worlds.length); + for (final World world : worlds) { + add(new JsonWorld(world.getId(), world.getRandomNumber())); + } + } + } + + public static class JsonWorld extends JsonObject { + private JsonWorld(final Integer id, final Integer random) { + super(Map.of("id", id, "randomNumber", random)); + } + } + + private static final class UpdateWorldsCommand { + private final PgConnectionPool.PgClientConnection connection; + private final World[] worldsToUpdate; + private final Handler> resultHandler; + private boolean failed; + private int selectWorldCompletedCount; + + private UpdateWorldsCommand(final PgConnectionPool.PgClientConnection connection, final int queries, final Handler> resultHandler) { + this.connection = connection; + this.worldsToUpdate = new World[queries]; + this.resultHandler = resultHandler; + } + + // execute + public static void execute(final PgConnectionPool connectionPool, final int count, final Handler> resultHandler) { + new UpdateWorldsCommand(connectionPool.pgConnection(), count, resultHandler).run(); + } + + private void run() { + connection.rawConnection().group(c -> { + final PreparedQuery> preparedQuery = c.preparedQuery(PgConnectionPool.SELECT_WORLD); + for (int i = 0; i < worldsToUpdate.length; i++) { + final Integer id = boxedRandomWorldNumber(); + final int index = i; + preparedQuery.execute(Tuple.of(id), worldId -> { + if (!failed) { + if (worldId.failed()) { + failed = true; + resultHandler.handle(Future.failedFuture(worldId.cause())); + return; + } + worldsToUpdate[index] = new World(worldId.result().iterator().next().getInteger(0), boxedRandomWorldNumber()); + if (++selectWorldCompletedCount == worldsToUpdate.length) { + randomWorldsQueryCompleted(); + } + } + }); + } + }); + } + + private void randomWorldsQueryCompleted() { + Arrays.sort(worldsToUpdate); + final List params = new ArrayList<>(worldsToUpdate.length * 2); + for (int i = 0, count = worldsToUpdate.length; i < count; i++) { + var world = worldsToUpdate[i]; + params.add(world.getId()); + params.add(world.getRandomNumber()); + } + connection.updateWorldQuery(worldsToUpdate.length).execute(Tuple.wrap(params), updateResult -> { + if (updateResult.failed()) { + resultHandler.handle(Future.failedFuture(updateResult.cause())); + return; + } + resultHandler.handle(Future.succeededFuture(new JsonWorlds(worldsToUpdate))); + }); + } + } + + private static final class FindRandomWorldsCommand implements Handler>> { + private final Handler> resultHandler; + private final int count; + private final JsonWorlds jsonWorlds; + private final PgConnectionPool.PgClientConnection connection; + private boolean failed; + + private FindRandomWorldsCommand(final PgConnectionPool.PgClientConnection connection, final int count, final Handler> resultHandler) { + this.connection = connection; + this.count = count; + this.jsonWorlds = new JsonWorlds(count); + this.resultHandler = resultHandler; + } + + public static void execute(final PgConnectionPool connectionPool, final int queries, final Handler> resultHandler) { + new FindRandomWorldsCommand(connectionPool.pgConnection(), queries, resultHandler).run(); + } + + private void run() { + connection.rawConnection().group(c -> { + for (int i = 0; i < count; i++) { + c.preparedQuery(PgConnectionPool.SELECT_WORLD).execute(Tuple.of(boxedRandomWorldNumber()), this); + } + }); + } + + @Override + public void handle(final AsyncResult> ar) { + if (!failed) { + if (ar.failed()) { + failed = true; + resultHandler.handle(Future.failedFuture(ar.cause())); + return; + } + + final Tuple row = ar.result().iterator().next(); + jsonWorlds.add(new JsonWorld(row.getInteger(0), row.getInteger(1))); + + // stop condition + if (jsonWorlds.size() == count) { + resultHandler.handle(Future.succeededFuture(jsonWorlds)); + } + } + } + } + +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/DbHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/DbHttpHandler.java new file mode 100644 index 00000000000..01f5b1253ca --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/DbHttpHandler.java @@ -0,0 +1,30 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.quarkus.benchmark.repository.WorldRepository; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +@Singleton +public class DbHttpHandler { + + @Inject + WorldRepository worldRepository; + + // write handle + public void handle(final HttpServerRequest request) { + worldRepository.loadRandomJsonWorld(jsonWorld -> { + if (jsonWorld.succeeded()) { + var res = request.response(); + res.headers().add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + res.end(jsonWorld.result().toBuffer(), null); + } else { + request.response().setStatusCode(500).end(); + } + }); + } + + +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/FortunesHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/FortunesHttpHandler.java new file mode 100644 index 00000000000..4735a3729bd --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/FortunesHttpHandler.java @@ -0,0 +1,34 @@ +package io.quarkus.benchmark.resource; + +import io.quarkus.benchmark.repository.FortuneRepository; +import io.quarkus.benchmark.rocker.VertxRawRockerOutputFactories; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import views.Fortunes; + +@Singleton +public class FortunesHttpHandler { + + private static final CharSequence HTML_UTF8_CONTENT_TYPE = HttpHeaders.createOptimized("text/html; charset=UTF-8"); + + @Inject + VertxRawRockerOutputFactories factories; + + @Inject + FortuneRepository fortuneRepository; + + public void handle(final HttpServerRequest request) { + fortuneRepository.findAllSortedFortunes(fortunes -> { + if (fortunes.succeeded()) { + final var vertxRockerOutput = Fortunes.template(fortunes.result()).render(factories.ioFactory()); + var res = request.response(); + res.headers().add(HttpHeaders.CONTENT_TYPE, HTML_UTF8_CONTENT_TYPE); + res.end(vertxRockerOutput.buffer(), null); + } else { + request.response().setStatusCode(500).end(fortunes.cause().getMessage()); + } + }); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpQueryParameterUtils.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpQueryParameterUtils.java new file mode 100644 index 00000000000..dbebbcb7e6a --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpQueryParameterUtils.java @@ -0,0 +1,20 @@ +package io.quarkus.benchmark.resource; + +import io.vertx.core.http.HttpServerRequest; + +public class HttpQueryParameterUtils { + + public static int queriesFrom(final HttpServerRequest request) { + final String param = request.getParam("queries"); + + if (param == null) { + return 1; + } + try { + final int parsedValue = Integer.parseInt(param); + return Math.min(500, Math.max(1, parsedValue)); + } catch (final NumberFormatException e) { + return 1; + } + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpRoutes.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpRoutes.java new file mode 100644 index 00000000000..8ab91bf7648 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/HttpRoutes.java @@ -0,0 +1,109 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpResponseStatus; +import io.netty.util.concurrent.EventExecutor; +import io.quarkus.benchmark.filter.HttpResponseDecorator; +import io.quarkus.runtime.StartupEvent; +import io.vertx.core.Future; +import io.vertx.core.Handler; +import io.vertx.core.Promise; +import io.vertx.core.Vertx; +import io.vertx.core.http.HttpServer; +import io.vertx.core.http.HttpServerOptions; +import io.vertx.core.http.HttpServerRequest; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +import java.util.ArrayList; +import java.util.List; + +@Singleton +public class HttpRoutes { + private static final int PORT = 8080; + private static final String PATH_PLAINTEXT = "/plaintext"; + private static final String PATH_JSON = "/json"; + private static final String PATH_DB = "/db"; + private static final String PATH_QUERIES = "/queries"; + private static final String PATH_UPDATES = "/updates"; + private static final String PATH_FORTUNES = "/fortunes"; + private HttpServer[] servers; + @Inject + private HttpResponseDecorator responseDecorator; + @Inject + private PlaintextHttpHandler plaintextHttpHandler; + @Inject + private JsonHttpHandler jsonHandler; + @Inject + private DbHttpHandler dbHandler; + @Inject + private UpdateHttpHandler updateHandler; + @Inject + private QueriesHttpHandler queriesHandler; + @Inject + private FortunesHttpHandler fortunesHandler; + + private static HttpServer[] createAndStartHttpServers(final Vertx vertx, final Handler requestHandler) { + final var executors = new ArrayList(Runtime.getRuntime().availableProcessors()); + vertx.nettyEventLoopGroup().forEach(executors::add); + final HttpServer[] servers = new HttpServer[executors.size()]; + final List> allHttpServerListening = new ArrayList<>(servers.length); + for (int i = 0; i < servers.length; i++) { + final int executorId = i; + final var done = Promise.promise(); + allHttpServerListening.add(done.future()); + executors.get(executorId).execute(() -> { + servers[executorId] = vertx.createHttpServer(new HttpServerOptions()); + servers[executorId] + .requestHandler(requestHandler) + .listen(PORT); + done.complete(); + }); + } + Future.join(allHttpServerListening).toCompletionStage().toCompletableFuture().join(); + return servers; + } + + public void init(@Observes final StartupEvent startupEvent, final Vertx vertx) { + servers = createAndStartHttpServers(vertx, this::handle); + } + + @PreDestroy + public void shutdown() { + for (final HttpServer server : servers) { + server.close(); + } + } + + private void handle(final HttpServerRequest request) { + try { + responseDecorator.decorate(request.response()); + switch (request.path()) { + case PATH_PLAINTEXT: + plaintextHttpHandler.handle(request); + break; + case PATH_JSON: + jsonHandler.handle(request); + break; + case PATH_DB: + dbHandler.handle(request); + break; + case PATH_QUERIES: + queriesHandler.handle(request); + break; + case PATH_UPDATES: + updateHandler.handle(request); + break; + case PATH_FORTUNES: + fortunesHandler.handle(request); + break; + default: + request.response().setStatusCode(HttpResponseStatus.NOT_FOUND.code()).end(); + break; + } + } catch (final Exception e) { + request.response().setStatusCode(HttpResponseStatus.INTERNAL_SERVER_ERROR.code()).end(); + } + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/JsonHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/JsonHttpHandler.java new file mode 100644 index 00000000000..23f686d6850 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/JsonHttpHandler.java @@ -0,0 +1,21 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.quarkus.benchmark.model.JsonMessage; +import io.vertx.core.MultiMap; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import jakarta.inject.Singleton; + +@Singleton +public class JsonHttpHandler { + + public void handle(final HttpServerRequest request) { + final HttpServerResponse response = request.response(); + final MultiMap headers = response.headers(); + headers.add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + response.end(new JsonMessage("Hello, World!").toBuffer(), null); + } + +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/PlaintextHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/PlaintextHttpHandler.java new file mode 100644 index 00000000000..52f23fc9d18 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/PlaintextHttpHandler.java @@ -0,0 +1,24 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import jakarta.inject.Singleton; + +@Singleton +public class PlaintextHttpHandler { + private static final String HELLO_WORLD = "Hello, world!"; + private static final Buffer HELLO_WORLD_BUFFER = Buffer.buffer(HELLO_WORLD, "UTF-8"); + private static final CharSequence HELLO_WORLD_LENGTH = HttpHeaders.createOptimized("" + HELLO_WORLD.length()); + + public void handle(final HttpServerRequest request) { + final HttpServerResponse response = request.response(); + final MultiMap headers = response.headers(); + headers.add(HttpHeaders.CONTENT_LENGTH, HELLO_WORLD_LENGTH); + headers.add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.TEXT_PLAIN); + response.end(HELLO_WORLD_BUFFER, null); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/QueriesHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/QueriesHttpHandler.java new file mode 100644 index 00000000000..5e1ec023fac --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/QueriesHttpHandler.java @@ -0,0 +1,28 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.quarkus.benchmark.repository.WorldRepository; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +import static io.quarkus.benchmark.resource.HttpQueryParameterUtils.queriesFrom; + +@Singleton +public class QueriesHttpHandler { + @Inject + WorldRepository worldRepository; + + public void handle(final HttpServerRequest request) { + worldRepository.loadNJsonWorlds(queriesFrom(request), jsonWorlds -> { + if (jsonWorlds.succeeded()) { + var res = request.response(); + res.headers().add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + res.end(jsonWorlds.result().toBuffer(), null); + } else { + request.response().setStatusCode(500).end(); + } + }); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/UpdateHttpHandler.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/UpdateHttpHandler.java new file mode 100644 index 00000000000..789accc48f0 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/resource/UpdateHttpHandler.java @@ -0,0 +1,29 @@ +package io.quarkus.benchmark.resource; + +import io.netty.handler.codec.http.HttpHeaderValues; +import io.quarkus.benchmark.repository.WorldRepository; +import io.vertx.core.http.HttpHeaders; +import io.vertx.core.http.HttpServerRequest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; + +import static io.quarkus.benchmark.resource.HttpQueryParameterUtils.queriesFrom; + +@Singleton +public class UpdateHttpHandler { + + @Inject + WorldRepository worldRepository; + + public void handle(final HttpServerRequest request) { + worldRepository.updateNJsonWorlds(queriesFrom(request), jsonWorlds -> { + if (jsonWorlds.succeeded()) { + var res = request.response(); + res.headers().add(HttpHeaders.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + res.end(jsonWorlds.result().toBuffer(), null); + } else { + request.response().setStatusCode(500).end(); + } + }); + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java new file mode 100644 index 00000000000..8dd5bec161b --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/RawRockerOutput.java @@ -0,0 +1,65 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.ContentType; +import com.fizzed.rocker.RockerOutputFactory; +import io.netty.buffer.ByteBuf; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.buffer.impl.PartialPooledByteBufAllocator; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +final class RawRockerOutput implements VertxRawRockerOutput { + + private final ByteBuf buff = PartialPooledByteBufAllocator.INSTANCE.directBuffer(); + private final Buffer buffer = Buffer.buffer(buff); + + RawRockerOutput() { + } + + public static RockerOutputFactory raw() { + final RawRockerOutput output = new RawRockerOutput(); + return (_contentType, charsetName) -> { + output.reset(); + return output; + }; + } + + private void reset() { + buff.resetReaderIndex(); + buff.resetWriterIndex(); + } + + @Override + public RawRockerOutput w(final byte[] bytes) throws IOException { + buffer.appendBytes(bytes); + return this; + } + + @Override + public RawRockerOutput w(final String s) throws IOException { + buffer.appendString(s); + return this; + } + + @Override + public ContentType getContentType() { + return ContentType.RAW; + } + + @Override + public Charset getCharset() { + return StandardCharsets.UTF_8; + } + + @Override + public int getByteLength() { + return buffer.length(); + } + + @Override + public Buffer buffer() { + return buffer; + } +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java new file mode 100644 index 00000000000..ada27e4e4bf --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutput.java @@ -0,0 +1,15 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.RockerOutputFactory; +import io.vertx.core.buffer.Buffer; + +public interface VertxRawRockerOutput extends com.fizzed.rocker.RockerOutput { + + // factory + static RockerOutputFactory factory() { + return RawRockerOutput.raw(); + } + + Buffer buffer(); + +} diff --git a/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java new file mode 100644 index 00000000000..faf834738c4 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/java/io/quarkus/benchmark/rocker/VertxRawRockerOutputFactories.java @@ -0,0 +1,29 @@ +package io.quarkus.benchmark.rocker; + +import com.fizzed.rocker.RockerOutputFactory; +import io.netty.util.concurrent.FastThreadLocal; +import io.vertx.core.Context; +import jakarta.inject.Singleton; + +@Singleton +public class VertxRawRockerOutputFactories { + + private final FastThreadLocal> ioPool; + + VertxRawRockerOutputFactories() { + ioPool = new FastThreadLocal<>() { + @Override + protected RockerOutputFactory initialValue() { + if (!Context.isOnEventLoopThread()) { + return null; + } + return VertxRawRockerOutput.factory(); + } + }; + } + + public RockerOutputFactory ioFactory() { + return ioPool.get(); + } + +} diff --git a/frameworks/Java/quarkus/vertx/src/main/resources/application.properties b/frameworks/Java/quarkus/vertx/src/main/resources/application.properties new file mode 100644 index 00000000000..a439fe7208a --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/resources/application.properties @@ -0,0 +1,10 @@ +quarkus.datasource.url=vertx-reactive:postgresql://tfb-database:5432/hello_world +%dev.quarkus.datasource.url=vertx-reactive:postgresql://localhost:5432/hello_world +quarkus.datasource.username=benchmarkdbuser +quarkus.datasource.password=benchmarkdbpass + +quarkus.log.console.enable=true +quarkus.log.console.level=INFO +quarkus.log.file.enable=false +quarkus.log.level=INFO + diff --git a/frameworks/Java/quarkus/vertx/src/main/resources/import.sql b/frameworks/Java/quarkus/vertx/src/main/resources/import.sql new file mode 100644 index 00000000000..f76881b4287 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/resources/import.sql @@ -0,0 +1 @@ +INSERT INTO Fortune(id, message) VALUES (1, 'Test value One'); \ No newline at end of file diff --git a/frameworks/Java/quarkus/vertx/src/main/resources/views/Fortunes.rocker.html b/frameworks/Java/quarkus/vertx/src/main/resources/views/Fortunes.rocker.html new file mode 100644 index 00000000000..cfa4f8341e2 --- /dev/null +++ b/frameworks/Java/quarkus/vertx/src/main/resources/views/Fortunes.rocker.html @@ -0,0 +1,8 @@ +@import java.util.* +@import io.quarkus.benchmark.model.* +@args(List fortunes) +Fortunes +@for ((ForIterator i, Fortune fortune) : fortunes) { + +} +
idmessage
@fortune.getId()@fortune.getMessage()
\ No newline at end of file diff --git a/frameworks/Java/rapidoid/pom.xml b/frameworks/Java/rapidoid/pom.xml index 0a016c06467..e9d05ef289a 100644 --- a/frameworks/Java/rapidoid/pom.xml +++ b/frameworks/Java/rapidoid/pom.xml @@ -28,7 +28,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 com.zaxxer diff --git a/frameworks/Java/redkale/BenchmarkService.java b/frameworks/Java/redkale/BenchmarkService.java new file mode 100644 index 00000000000..06e760bf879 --- /dev/null +++ b/frameworks/Java/redkale/BenchmarkService.java @@ -0,0 +1,78 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.redkalex.benchmark; + +import java.util.*; +import java.util.concurrent.*; +import java.util.stream.Stream; +import org.redkale.annotation.*; +import org.redkale.net.http.*; +import org.redkale.service.AbstractService; +import org.redkale.source.DataSource; + +/** + * 测试redkale-jdbc, 需要覆盖到原BenchmarkService + * + * @author zhangjx + */ +@RestService(name = " ", repair = false) +public class BenchmarkService extends AbstractService { + + private static final byte[] helloBytes = "Hello, world!".getBytes(); + + @Resource + private DataSource source; + + @NonBlocking + @RestMapping(auth = false) + public byte[] plaintext() { + return helloBytes; + } + + @NonBlocking + @RestMapping(auth = false) + public Message json() { + return new Message("Hello, World!"); + } + + @RestMapping(auth = false) + public World db() { + return source.find(World.class, ThreadLocalRandom.current().nextInt(10000) + 1); + } + + @RestMapping(auth = false) + public List queries(int q) { + return source.findsList(World.class, random(q)); + } + + @RestMapping(auth = false) + public List updates(int q) { + int size = Math.min(500, Math.max(1, q)); + int[] newNumbers = ThreadLocalRandom.current().ints(size, 1, 10001).toArray(); + List words = source.findsList(World.class, random(q)); + source.update(World.updateNewNumbers(words, newNumbers)); + return words; + } + + @RestMapping(auth = false) + public HttpScope fortunes() { + List fortunes = source.queryList(Fortune.class); + fortunes.add(new Fortune(0, "Additional fortune added at request time.")); + Collections.sort(fortunes); + return HttpScope.refer("").referObj(fortunes); + } + + @NonBlocking + @RestMapping(name = "cached-worlds", auth = false) + public CachedWorld[] cachedWorlds(int q) { + return source.finds(CachedWorld.class, random(q)); + } + + private Stream random(int q) { + int size = Math.min(500, Math.max(1, q)); + return ThreadLocalRandom.current().ints(size, 1, 10001).boxed(); + } +} diff --git a/frameworks/Java/redkale/benchmark_config.json b/frameworks/Java/redkale/benchmark_config.json index 86b2fb08d30..eb9e8d92ba2 100644 --- a/frameworks/Java/redkale/benchmark_config.json +++ b/frameworks/Java/redkale/benchmark_config.json @@ -95,6 +95,27 @@ "notes": "", "versus": "Redkale" }, + "block": { + "db_url": "/db", + "query_url": "/queries?q=", + "fortune_url": "/fortunes", + "update_url": "/updates?q=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "Postgres", + "framework": "Redkale", + "language": "Java", + "flavor": "None", + "orm": "Raw", + "platform": "Redkale", + "webserver": "Redkale", + "os": "Linux", + "database_os": "Linux", + "display_name": "redkale-block", + "notes": "", + "versus": "Redkale" + }, "vertx": { "db_url": "/db", "query_url": "/queries?q=", diff --git a/frameworks/Java/redkale/conf/application.xml b/frameworks/Java/redkale/conf/application.xml index 3589ce9f086..d7157c9f8d3 100644 --- a/frameworks/Java/redkale/conf/application.xml +++ b/frameworks/Java/redkale/conf/application.xml @@ -3,8 +3,7 @@ - - + diff --git a/frameworks/Java/redkale/config.toml b/frameworks/Java/redkale/config.toml index 19eba869560..73c0a6678e3 100644 --- a/frameworks/Java/redkale/config.toml +++ b/frameworks/Java/redkale/config.toml @@ -70,6 +70,21 @@ platform = "Redkale" webserver = "Redkale" versus = "Redkale" +[block] +urls.db = "/db" +urls.fortune = "/fortunes" +urls.query = "/queries?q=" +urls.update = "/updates?q=" +approach = "Realistic" +classification = "Fullstack" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "Redkale" +webserver = "Redkale" +versus = "Redkale" + [vertx] urls.db = "/db" urls.fortune = "/fortunes" diff --git a/frameworks/Java/redkale/pom-vertx.xml b/frameworks/Java/redkale/pom-vertx.xml index 4d0ffa06212..9879cff1237 100644 --- a/frameworks/Java/redkale/pom-vertx.xml +++ b/frameworks/Java/redkale/pom-vertx.xml @@ -8,7 +8,7 @@ org.redkale.boot.Application 2.8.0-SNAPSHOT - 4.4.4 + 4.5.0 2.1 UTF-8 18 diff --git a/frameworks/Java/redkale/redkale-block.dockerfile b/frameworks/Java/redkale/redkale-block.dockerfile new file mode 100644 index 00000000000..67594021962 --- /dev/null +++ b/frameworks/Java/redkale/redkale-block.dockerfile @@ -0,0 +1,16 @@ +FROM maven:3.8.6-openjdk-18-slim as maven +WORKDIR /redkale +COPY src src +COPY conf conf +COPY pom.xml pom.xml +COPY BenchmarkService.java src/main/java/org/redkalex/benchmark/BenchmarkService.java +RUN mvn package -q + +FROM openjdk:21-jdk-slim +WORKDIR /redkale +COPY conf conf +COPY --from=maven /redkale/target/redkale-benchmark-1.0.0.jar redkale-benchmark.jar + +EXPOSE 8080 + +CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-DAPP_HOME=./", "-jar", "redkale-benchmark.jar"] \ No newline at end of file diff --git a/frameworks/Java/redkale/redkale-jdbc.dockerfile b/frameworks/Java/redkale/redkale-jdbc.dockerfile index 5b621e47179..c6549abfa03 100644 --- a/frameworks/Java/redkale/redkale-jdbc.dockerfile +++ b/frameworks/Java/redkale/redkale-jdbc.dockerfile @@ -3,6 +3,7 @@ WORKDIR /redkale COPY src src COPY conf conf COPY pom-jdbc.xml pom.xml +COPY BenchmarkService.java src/main/java/org/redkalex/benchmark/BenchmarkService.java RUN mvn package -q FROM openjdk:21-jdk-slim diff --git a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/BenchmarkService.java b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/BenchmarkService.java index 1e48ee8e9b9..20f816362d2 100644 --- a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/BenchmarkService.java +++ b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/BenchmarkService.java @@ -8,6 +8,7 @@ import java.util.*; import java.util.concurrent.*; import java.util.stream.IntStream; +import java.util.stream.Stream; import org.redkale.annotation.*; import org.redkale.net.http.*; import org.redkale.service.AbstractService; @@ -43,9 +44,7 @@ public CompletableFuture db() { @RestMapping(auth = false) public CompletableFuture> queries(int q) { - int size = Math.min(500, Math.max(1, q)); - IntStream ids = ThreadLocalRandom.current().ints(size, 1, 10001); - return source.findsListAsync(World.class, ids.boxed()); + return source.findsListAsync(World.class, random(q)); } @RestMapping(auth = false) @@ -69,8 +68,11 @@ public CompletableFuture fortunes() { @RestMapping(name = "cached-worlds", auth = false) public CachedWorld[] cachedWorlds(int q) { + return source.finds(CachedWorld.class, random(q)); + } + + private Stream random(int q) { int size = Math.min(500, Math.max(1, q)); - IntStream ids = ThreadLocalRandom.current().ints(size, 1, 10001); - return source.finds(CachedWorld.class, ids.boxed()); + return ThreadLocalRandom.current().ints(size, 1, 10001).boxed(); } } diff --git a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/CachedWorld.java b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/CachedWorld.java index 65dc5b8cf6d..ec2c0f1e0b2 100644 --- a/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/CachedWorld.java +++ b/frameworks/Java/redkale/src/main/java/org/redkalex/benchmark/CachedWorld.java @@ -10,9 +10,8 @@ * * @author zhangjx */ -@Entity @Table(name = "world") -@Cacheable(direct = true) +@Entity(cacheable = true, cacheDirect = true) public final class CachedWorld { @Id diff --git a/frameworks/Java/servlet/pom.xml b/frameworks/Java/servlet/pom.xml index b038c8549c2..052ca85e38e 100644 --- a/frameworks/Java/servlet/pom.xml +++ b/frameworks/Java/servlet/pom.xml @@ -108,7 +108,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 diff --git a/frameworks/Java/servlet3/pom.xml b/frameworks/Java/servlet3/pom.xml index e424796691b..d8db7acde68 100644 --- a/frameworks/Java/servlet3/pom.xml +++ b/frameworks/Java/servlet3/pom.xml @@ -93,7 +93,7 @@ ch.qos.logback logback-classic - 1.3.0-alpha4 + 1.3.12 org.slf4j diff --git a/frameworks/Java/smart-socket/pom.xml b/frameworks/Java/smart-socket/pom.xml index e4bbc87e873..b95e7d71c52 100644 --- a/frameworks/Java/smart-socket/pom.xml +++ b/frameworks/Java/smart-socket/pom.xml @@ -8,10 +8,10 @@ jar UTF-8 - 11 - 11 + 17 + 17 2.17.1 - 0.2.1-SNAPSHOT + 0.6-SNAPSHOT 5.0.0 0.9.23 @@ -56,7 +56,7 @@ org.postgresql postgresql - 42.4.3 + 42.7.2 diff --git a/frameworks/Java/smart-socket/smart-socket-smart-servlet.dockerfile b/frameworks/Java/smart-socket/smart-socket-smart-servlet.dockerfile index b6fa2e31680..8b1cbe79930 100644 --- a/frameworks/Java/smart-socket/smart-socket-smart-servlet.dockerfile +++ b/frameworks/Java/smart-socket/smart-socket-smart-servlet.dockerfile @@ -1,13 +1,13 @@ -FROM maven:3.6.1-jdk-11-slim as maven +FROM maven:3.8.6-openjdk-18-slim as maven WORKDIR /smart-socket COPY pom.xml pom.xml COPY src src RUN mvn compile assembly:single -q -FROM openjdk:11.0.3-jdk-slim +FROM openjdk:21-jdk-slim WORKDIR /smart-socket COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0-jar-with-dependencies.jar app.jar EXPOSE 8080 -CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AggressiveOpts", "-cp", "app.jar", "org.smartboot.servlet.Bootstrap"] +CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-cp", "app.jar", "org.smartboot.servlet.Bootstrap"] diff --git a/frameworks/Java/smart-socket/smart-socket.dockerfile b/frameworks/Java/smart-socket/smart-socket.dockerfile index f51ddcbd178..b40ad2c8d43 100644 --- a/frameworks/Java/smart-socket/smart-socket.dockerfile +++ b/frameworks/Java/smart-socket/smart-socket.dockerfile @@ -1,13 +1,13 @@ -FROM maven:3.6.1-jdk-11-slim as maven +FROM maven:3.8.6-openjdk-18-slim as maven WORKDIR /smart-socket COPY pom.xml pom.xml COPY src src RUN mvn compile assembly:single -q -FROM openjdk:11.0.3-jdk-slim +FROM openjdk:21-jdk-slim WORKDIR /smart-socket COPY --from=maven /smart-socket/target/smart-socket-benchmark-1.0-jar-with-dependencies.jar app.jar EXPOSE 8080 -CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AggressiveOpts", "-cp", "app.jar", "org.smartboot.http.Bootstrap"] +CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-cp", "app.jar", "org.smartboot.http.Bootstrap"] diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/JsonUtil.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/JsonUtil.java index 0aa0f44a2d1..b20525ec571 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/JsonUtil.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/JsonUtil.java @@ -1,11 +1,12 @@ package org.smartboot.http; +import com.jsoniter.output.JsonStream; +import com.jsoniter.output.JsonStreamPool; import com.jsoniter.spi.JsonException; -import io.edap.x.json.Eson; -import io.edap.x.json.JsonWriter; +import com.jsoniter.spi.Slice; +import jakarta.servlet.http.HttpServletResponse; import org.smartboot.http.server.HttpResponse; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** @@ -13,57 +14,56 @@ * @version V1.0 , 2020/6/16 */ public class JsonUtil { + // public static void writeJsonBytes(HttpResponse httpResponse, Object obj) { +// JsonWriter writer = Eson.THREAD_WRITER.get(); +// try { +// writer.reset(); +// Eson.serialize(obj, writer); +// httpResponse.setContentLength(writer.size()); +// writer.toStream(httpResponse.getOutputStream()); +// } catch (IOException e) { +// throw new JsonException(e); +// } +// } public static void writeJsonBytes(HttpResponse httpResponse, Object obj) { - JsonWriter writer = Eson.THREAD_WRITER.get(); + JsonStream stream = JsonStreamPool.borrowJsonStream(); try { - writer.reset(); - Eson.serialize(obj, writer); - httpResponse.setContentLength(writer.size()); - writer.toStream(httpResponse.getOutputStream()); + stream.reset(null); + stream.writeVal(obj.getClass(), obj); + Slice slice = stream.buffer(); + httpResponse.setContentLength(slice.tail()); + httpResponse.getOutputStream().write(slice.data(), 0, slice.tail()); } catch (IOException e) { throw new JsonException(e); + } finally { + JsonStreamPool.returnJsonStream(stream); } } -// public static void writeJsonBytes(HttpResponse httpResponse, Object obj) { -// JsonStream stream = JsonStreamPool.borrowJsonStream(); -// try { -// stream.reset(null); -// stream.writeVal(obj.getClass(), obj); -// Slice slice = stream.buffer(); -// httpResponse.setContentLength(slice.tail()); -// httpResponse.getOutputStream().write(slice.data(), 0, slice.tail()); -// } catch (IOException e) { -// throw new JsonException(e); -// } finally { -// JsonStreamPool.returnJsonStream(stream); -// } -// } + public static void writeJsonBytes(HttpServletResponse httpResponse, Object obj) { + JsonStream stream = JsonStreamPool.borrowJsonStream(); + try { + stream.reset(null); + stream.writeVal(obj.getClass(), obj); + Slice slice = stream.buffer(); + httpResponse.setContentLength(slice.tail()); + httpResponse.getOutputStream().write(slice.data(), 0, slice.tail()); + } catch (IOException e) { + throw new JsonException(e); + } finally { + JsonStreamPool.returnJsonStream(stream); + } + } // public static void writeJsonBytes(HttpServletResponse httpResponse, Object obj) { -// JsonStream stream = JsonStreamPool.borrowJsonStream(); +// JsonWriter writer = Eson.THREAD_WRITER.get(); // try { -// stream.reset(null); -// stream.writeVal(obj.getClass(), obj); -// Slice slice = stream.buffer(); -// httpResponse.setContentLength(slice.tail()); -// httpResponse.getOutputStream().write(slice.data(), 0, slice.tail()); +// writer.reset(); +// Eson.serialize(obj, writer); +// httpResponse.setContentLength(writer.size()); +// writer.toStream(httpResponse.getOutputStream()); // } catch (IOException e) { // throw new JsonException(e); -// } finally { -// JsonStreamPool.returnJsonStream(stream); // } // } - - public static void writeJsonBytes(HttpServletResponse httpResponse, Object obj) { - JsonWriter writer = Eson.THREAD_WRITER.get(); - try { - writer.reset(); - Eson.serialize(obj, writer); - httpResponse.setContentLength(writer.size()); - writer.toStream(httpResponse.getOutputStream()); - } catch (IOException e) { - throw new JsonException(e); - } - } } diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java index 23efbecbd3f..681ad1a7593 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/Bootstrap.java @@ -4,13 +4,9 @@ import org.smartboot.http.server.HttpRequest; import org.smartboot.http.server.HttpResponse; import org.smartboot.http.server.HttpServerHandler; -import org.smartboot.http.server.impl.Request; import org.smartboot.servlet.conf.ServletInfo; -import org.smartboot.socket.StateMachineEnum; -import org.smartboot.socket.extension.processor.AbstractMessageProcessor; -import org.smartboot.socket.transport.AioSession; -import java.io.IOException; +import java.util.concurrent.CompletableFuture; /** * @author 三刀(zhengjunweimail@163.com) @@ -18,7 +14,7 @@ */ public class Bootstrap { - public static void main(String[] args) { + public static void main(String[] args) throws Throwable { ContainerRuntime containerRuntime = new ContainerRuntime(); // plaintext ServletContextRuntime applicationRuntime = new ServletContextRuntime("/"); @@ -50,8 +46,8 @@ public static void main(String[] args) { bootstrap.setPort(8080) .httpHandler(new HttpServerHandler() { @Override - public void handle(HttpRequest request, HttpResponse response) throws IOException { - containerRuntime.doHandle(request, response); + public void handle(HttpRequest request, HttpResponse response, CompletableFuture completableFuture) throws Throwable { + containerRuntime.doHandle(request, response, completableFuture); } }) .start(); diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/HelloWorldServlet.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/HelloWorldServlet.java index f5c2ca710c6..c3900de716c 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/HelloWorldServlet.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/HelloWorldServlet.java @@ -1,9 +1,10 @@ package org.smartboot.servlet; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; /** @@ -16,7 +17,7 @@ public class HelloWorldServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentLength(BODY.length); - resp.setContentType("text/plain; charset=UTF-8"); + resp.setContentType("text/plain;charset=UTF-8"); resp.setBufferSize(0); resp.getOutputStream().write(BODY); } diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/JsonServlet.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/JsonServlet.java index 1c0081d7f23..064bc80556d 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/JsonServlet.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/servlet/JsonServlet.java @@ -1,12 +1,12 @@ package org.smartboot.servlet; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.smartboot.Message; import org.smartboot.http.JsonUtil; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** @@ -16,7 +16,7 @@ public class JsonServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("application/json"); + resp.setContentType("application/json;charset=UTF-8"); resp.setBufferSize(0); JsonUtil.writeJsonBytes(resp, new Message("Hello, World!")); } diff --git a/frameworks/Java/spring-webflux/pom.xml b/frameworks/Java/spring-webflux/pom.xml index 701d1348d47..01d32c261c0 100644 --- a/frameworks/Java/spring-webflux/pom.xml +++ b/frameworks/Java/spring-webflux/pom.xml @@ -21,7 +21,7 @@ 11 UTF-8 1.0.0.M2 - 42.4.3 + 42.7.2 0.11.4 0.2.4 1.0.0.M7 @@ -103,7 +103,7 @@ org.springframework spring-context - 5.2.0.M2 + 5.2.22.BUILD-SNAPSHOT org.springframework @@ -113,7 +113,7 @@ org.springframework spring-beans - 5.2.21.BUILD-SNAPSHOT + 5.2.22.BUILD-SNAPSHOT diff --git a/frameworks/Java/spring/src/main/java/hello/App.java b/frameworks/Java/spring/src/main/java/hello/App.java index 435bbcf0dd4..e8e93b65902 100644 --- a/frameworks/Java/spring/src/main/java/hello/App.java +++ b/frameworks/Java/spring/src/main/java/hello/App.java @@ -7,8 +7,10 @@ import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Profile; +import org.springframework.context.event.EventListener; import com.zaxxer.hikari.HikariDataSource; @@ -19,6 +21,11 @@ public static void main(String[] args) { SpringApplication.run(App.class, args); } + @EventListener(ApplicationReadyEvent.class) + public void runAfterStartup() { + System.out.println("Application is ready"); + } + @Bean @Profile({ "jdbc", "jpa" }) public DataSource datasource(DataSourceProperties dataSourceProperties) { diff --git a/frameworks/Java/undertow/pom.xml b/frameworks/Java/undertow/pom.xml index 524d4273c74..5ff7009c963 100644 --- a/frameworks/Java/undertow/pom.xml +++ b/frameworks/Java/undertow/pom.xml @@ -19,7 +19,7 @@ 3.3.0 3.2.2 0.9.10 - 42.4.1 + 42.7.2 2.3.5.Final diff --git a/frameworks/Java/vertx/pom.xml b/frameworks/Java/vertx/pom.xml index 80b21f4422e..12ef914a5c5 100644 --- a/frameworks/Java/vertx/pom.xml +++ b/frameworks/Java/vertx/pom.xml @@ -10,7 +10,7 @@ 17 vertx.App - 4.4.2 + 4.5.3 2.15.0 4.1.92.Final 0.0.21.Final diff --git a/frameworks/JavaScript/express/benchmark_config.json b/frameworks/JavaScript/express/benchmark_config.json index 658e5b378e6..0c8a91678cc 100644 --- a/frameworks/JavaScript/express/benchmark_config.json +++ b/frameworks/JavaScript/express/benchmark_config.json @@ -71,7 +71,7 @@ "orm": "Full", "os": "Linux", "database_os": "Linux", - "display_name": "express", + "display_name": "express[mysql-sequelize]", "notes": "", "versus": "nodejs" }, @@ -92,7 +92,30 @@ "orm": "Full", "os": "Linux", "database_os": "Linux", - "display_name": "express", + "display_name": "express[postgres-sequelize]", + "notes": "", + "versus": "nodejs" + }, + "postgresjs": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "express", + "language": "JavaScript", + "flavor": "NodeJS", + "platform": "nodejs", + "webserver": "None", + "orm": "Full", + "os": "Linux", + "database_os": "Linux", + "display_name": "express[postgres.js]", "notes": "", "versus": "nodejs" } diff --git a/frameworks/JavaScript/express/express-postgresjs.dockerfile b/frameworks/JavaScript/express/express-postgresjs.dockerfile new file mode 100644 index 00000000000..d9a5e1b35ba --- /dev/null +++ b/frameworks/JavaScript/express/express-postgresjs.dockerfile @@ -0,0 +1,12 @@ +FROM node:21.1.0-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV DATABASE postgres + +EXPOSE 8080 + +CMD ["node", "src/clustered.mjs"] diff --git a/frameworks/JavaScript/express/package.json b/frameworks/JavaScript/express/package.json index 0b955c658a9..60c1f6a6b32 100644 --- a/frameworks/JavaScript/express/package.json +++ b/frameworks/JavaScript/express/package.json @@ -6,12 +6,14 @@ "body-parser": "1.19.0", "dateformat": "3.0.3", "escape-html": "1.0.3", - "express": "4.17.3", + "express": "4.18.2", "mongoose": "5.13.20", "mysql2": "2.2.5", "pg": "8.5.0", "pg-promise": "10.7.3", "pug": "2.0.1", + "postgres": "^3.4.3", + "slow-json-stringify": "^2.0.1", "sequelize": "6.29.0" } } diff --git a/frameworks/JavaScript/express/src/clustered.mjs b/frameworks/JavaScript/express/src/clustered.mjs new file mode 100644 index 00000000000..07ebbfbc330 --- /dev/null +++ b/frameworks/JavaScript/express/src/clustered.mjs @@ -0,0 +1,25 @@ +import cluster from "node:cluster"; +import os from "node:os"; +import process from "node:process"; + +process.env.DATABASE = "postgres"; + +if (cluster.isPrimary) { + // Master Node + console.log(`Primary ${process.pid} is running`); + + // Fork workers + const numCPUs = os.availableParallelism(); + for (let i = 0; i < numCPUs; i++) { + cluster.fork(); + } + + cluster.on("exit", (worker) => { + console.log(`worker ${worker.process.pid} died`); + process.exit(1); + }); +} else { + // Cluster Node + await import("./server.mjs"); + console.log(`Worker ${process.pid} started`); +} diff --git a/frameworks/JavaScript/express/src/database/postgres.mjs b/frameworks/JavaScript/express/src/database/postgres.mjs new file mode 100644 index 00000000000..5f22801d234 --- /dev/null +++ b/frameworks/JavaScript/express/src/database/postgres.mjs @@ -0,0 +1,27 @@ +import postgres from "postgres"; + +const sql = postgres({ + host: "tfb-database", + user: "benchmarkdbuser", + password: "benchmarkdbpass", + database: "hello_world", + max: 1, +}); + +export const fortunes = async () => await sql`SELECT id, message FROM fortune`; + +export const find = async (id) => + await sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( + (arr) => arr[0] + ); + +export const bulkUpdate = async (worlds) => { + const sorted = sql( + worlds + .map((world) => [world.id, world.randomNumber]) + .sort((a, b) => (a[0] < b[0] ? -1 : 1)) + ); + await sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int + FROM (VALUES ${sorted}) AS update_data (id, randomNumber) + WHERE world.id = (update_data.id)::int`; +}; diff --git a/frameworks/JavaScript/express/src/server.mjs b/frameworks/JavaScript/express/src/server.mjs new file mode 100644 index 00000000000..0de81c196cb --- /dev/null +++ b/frameworks/JavaScript/express/src/server.mjs @@ -0,0 +1,105 @@ +import express from "express"; +import { + generateRandomNumber, + getQueriesCount, + handleError, + escape, + jsonSerializer, + worldObjectSerializer, + sortByMessage, + writeResponse, + headerTypes, + GREETING, +} from "./utils.mjs"; + +let db; +const { DATABASE } = process.env; +if (DATABASE) db = await import(`./database/${DATABASE}.mjs`); + +const extra = { id: 0, message: "Additional fortune added at request time." }; + +const app = express(); + +app.get("/plaintext", (req, res) => { + writeResponse(res, GREETING, headerTypes["plain"]); +}); + +app.get("/json", (req, res) => { + writeResponse(res, jsonSerializer({ message: GREETING })); +}); + +if (db) { + app.get("/db", async (req, res) => { + try { + const row = await db.find(generateRandomNumber()); + writeResponse(res, worldObjectSerializer(row)); + } catch (error) { + handleError(error, res); + } + }); + + app.get("/queries", async (req, res) => { + try { + const queriesCount = getQueriesCount(req); + const databaseJobs = new Array(queriesCount) + .fill() + .map(() => db.find(generateRandomNumber())); + const worldObjects = await Promise.all(databaseJobs); + writeResponse(res, JSON.stringify(worldObjects)); + } catch (error) { + handleError(error, res); + } + }); + + app.get("/fortunes", async (req, res) => { + try { + const rows = [extra, ...(await db.fortunes())]; + sortByMessage(rows); + const n = rows.length; + let html = "", + i = 0; + for (; i < n; i++) { + html += `${rows[i].id}${escape( + rows[i].message + )}`; + } + + writeResponse( + res, + `Fortunes${html}
idmessage
`, + headerTypes["html"] + ); + } catch (error) { + handleError(error, res); + } + }); + + app.get("/updates", async (req, res) => { + try { + const queriesCount = getQueriesCount(req); + const databaseJobs = new Array(queriesCount); + for (let i = 0; i < queriesCount; i++) { + databaseJobs[i] = db.find(generateRandomNumber()); + } + const worldObjects = await Promise.all(databaseJobs); + + for (let i = 0; i < queriesCount; i++) { + worldObjects[i].randomNumber = generateRandomNumber(); + } + await db.bulkUpdate(worldObjects); + writeResponse(res, JSON.stringify(worldObjects)); + } catch (error) { + handleError(error, res); + } + }); +} + +app.all("*", (req, res) => { + res.status(404).send("Not Found"); +}); + +const host = process.env.HOST || "0.0.0.0"; +const port = parseInt(process.env.PORT || "8080"); +app.listen(port, host, () => { + console.log(`Server running at http://${host}:${port}/`); +}); diff --git a/frameworks/JavaScript/express/src/utils.mjs b/frameworks/JavaScript/express/src/utils.mjs new file mode 100644 index 00000000000..1acf96b0d51 --- /dev/null +++ b/frameworks/JavaScript/express/src/utils.mjs @@ -0,0 +1,68 @@ +import { sjs, attr } from "slow-json-stringify"; + +export const GREETING = "Hello, World!"; + +export const headerTypes = { + plain: "text/plain", + json: "application/json", + html: "text/html; charset=UTF-8", +}; + +export function writeResponse(res, text, type = headerTypes["json"]) { + res.writeHead(200, { + "content-type": type, + server: "Express", + }); + res.end(text); +} + +export function handleError(error, response) { + console.error(error); + response.end("Internal Server Error"); +} + +export function getQueriesCount(request) { + return Math.min(parseInt(request.query["queries"]) || 1, 500); +} + +export function generateRandomNumber() { + return Math.ceil(Math.random() * 10000); +} + +const escapeHTMLRules = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/", +}; + +const unsafeHTMLMatcher = /[&<>"'\/]/g; + +export function escape(text) { + if (unsafeHTMLMatcher.test(text) === false) return text; + return text.replace(unsafeHTMLMatcher, function (m) { + return escapeHTMLRules[m] || m; + }); +} + +export const jsonSerializer = sjs({ message: attr("string") }); +export const worldObjectSerializer = sjs({ + id: attr("number"), + randomnumber: attr("number"), +}); + +export function sortByMessage(arr) { + const n = arr.length; + for (let i = 1; i < n; i++) { + const c = arr[i]; + let j = i - 1; + while (j > -1 && c.message < arr[j].message) { + arr[j + 1] = arr[j]; + j--; + } + arr[j + 1] = c; + } + return arr; +} diff --git a/frameworks/JavaScript/hono/README.md b/frameworks/JavaScript/hono/README.md new file mode 100644 index 00000000000..34d9f271d37 --- /dev/null +++ b/frameworks/JavaScript/hono/README.md @@ -0,0 +1,50 @@ +# Hono Benchmarking Test + +Hono - [炎] means flame🔥 in Japanese - is a small, simple, and ultrafast web framework for the Edges. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Lagon, AWS Lambda, Lambda@Edge, and Node.js. https://github.com/honojs/hono + +## Important Libraries + +The tests were run with: + +- [Hono](https://github.com/honojs/hono) +- [Postgres.js](https://github.com/porsager/postgres/) + +## Database + +There are individual handlers for each DB approach. The logic for each of them are found here: + +- [PostgreSQL](database/postgres.js) + +There are **no database endpoints** or drivers attached by default. + +To initialize the application with one of these, run any _one_ of the following commands: + +```sh +$ DATABASE=postgres npm start +``` + +## Test Endpoints + +> Visit the test requirements [here](https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview) + +```sh +$ curl localhost:8080/json +$ curl localhost:8080/plaintext + +# The following are only available with the DATABASE env var + +$ curl localhost:8080/db +$ curl localhost:8080/fortunes + +$ curl localhost:8080/updates?queries= +$ curl localhost:8080/updates?queries=2 +$ curl localhost:8080/updates?queries=1000 +$ curl localhost:8080/updates?queries=foo +$ curl localhost:8080/updates?queries=0 + +$ curl localhost:8080/queries?queries= +$ curl localhost:8080/queries?queries=2 +$ curl localhost:8080/queries?queries=1000 +$ curl localhost:8080/queries?queries=foo +$ curl localhost:8080/queries?queries=0 +``` diff --git a/frameworks/JavaScript/hono/benchmark_config.json b/frameworks/JavaScript/hono/benchmark_config.json new file mode 100644 index 00000000000..116064254e5 --- /dev/null +++ b/frameworks/JavaScript/hono/benchmark_config.json @@ -0,0 +1,47 @@ +{ + "framework": "hono", + "tests": [ + { + "default": { + "approach": "Realistic", + "classification": "Micro", + "database": "None", + "database_os": "Linux", + "display_name": "Hono", + "flavor": "NodeJS", + "framework": "Hono", + "json_url": "/json", + "language": "JavaScript", + "notes": "", + "orm": "Raw", + "os": "Linux", + "plaintext_url": "/plaintext", + "platform": "nodejs", + "port": 8080, + "versus": "nodejs", + "webserver": "None" + }, + "postgres": { + "approach": "Realistic", + "classification": "Platform", + "database": "Postgres", + "database_os": "Linux", + "db_url": "/db", + "display_name": "Hono", + "flavor": "NodeJS", + "fortune_url": "/fortunes", + "framework": "Hono", + "language": "JavaScript", + "notes": "", + "orm": "Raw", + "os": "Linux", + "platform": "None", + "port": 8080, + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "versus": "nodejs", + "webserver": "None" + } + } + ] +} diff --git a/frameworks/JavaScript/hono/hono-postgres.dockerfile b/frameworks/JavaScript/hono/hono-postgres.dockerfile new file mode 100644 index 00000000000..ba7d0eee5f6 --- /dev/null +++ b/frameworks/JavaScript/hono/hono-postgres.dockerfile @@ -0,0 +1,12 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV DATABASE postgres + +EXPOSE 8080 + +CMD ["npm", "start"] diff --git a/frameworks/JavaScript/hono/hono.dockerfile b/frameworks/JavaScript/hono/hono.dockerfile new file mode 100644 index 00000000000..4262ad19953 --- /dev/null +++ b/frameworks/JavaScript/hono/hono.dockerfile @@ -0,0 +1,11 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production + +EXPOSE 8080 + +CMD ["npm", "start"] diff --git a/frameworks/JavaScript/hono/package-lock.json b/frameworks/JavaScript/hono/package-lock.json new file mode 100644 index 00000000000..173cf4dc47e --- /dev/null +++ b/frameworks/JavaScript/hono/package-lock.json @@ -0,0 +1,46 @@ +{ + "name": "hono", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "hono", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.4.1", + "hono": "^3.10.4", + "postgres": "^3.4.3" + } + }, + "node_modules/@hono/node-server": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.4.1.tgz", + "integrity": "sha512-7jB8iMs6T2FhREs4Ugk+7rzn7d5aC6wEX3FAy67ZafzcQqqBVggcLkFPCMauaFJJyjc+bFvMOdFxJXKYsBM6MQ==", + "engines": { + "node": ">=18.14.1" + } + }, + "node_modules/hono": { + "version": "3.11.7", + "resolved": "https://registry.npmjs.org/hono/-/hono-3.11.7.tgz", + "integrity": "sha512-TcfAq7IdipF+9coxnuzYlSSBXbm9mTyWjjagLCv/2ampboNcKJdi+XCK5G48mHQtpI5+9Rj3J4FfcGgw9vzIww==", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/postgres": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.3.tgz", + "integrity": "sha512-iHJn4+M9vbTdHSdDzNkC0crHq+1CUdFhx+YqCE+SqWxPjm+Zu63jq7yZborOBF64c8pc58O5uMudyL1FQcHacA==", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + } + } +} diff --git a/frameworks/JavaScript/hono/package.json b/frameworks/JavaScript/hono/package.json new file mode 100644 index 00000000000..62b18bb58bf --- /dev/null +++ b/frameworks/JavaScript/hono/package.json @@ -0,0 +1,17 @@ +{ + "dependencies": { + "@hono/node-server": "^1.4.1", + "hono": "^3.10.4", + "postgres": "^3.4.3" + }, + "license": "MIT", + "main": "src/server.js", + "name": "hono", + "private": true, + "scripts": { + "dev": "node src/server.js", + "start": "node src/clustered.js" + }, + "type": "module", + "version": "0.0.1" +} diff --git a/frameworks/JavaScript/hono/src/clustered.js b/frameworks/JavaScript/hono/src/clustered.js new file mode 100644 index 00000000000..95a57ec77f3 --- /dev/null +++ b/frameworks/JavaScript/hono/src/clustered.js @@ -0,0 +1,23 @@ +import cluster from "node:cluster"; +import os from "node:os"; +import process from "node:process"; + +if (cluster.isPrimary) { + // Master Node + console.log(`Primary ${process.pid} is running`); + + // Fork workers + const numCPUs = os.availableParallelism(); + for (let i = 0; i < numCPUs; i++) { + cluster.fork(); + } + + cluster.on("exit", (worker) => { + console.log(`worker ${worker.process.pid} died`); + process.exit(1); + }); +} else { + // Cluster Node + await import("./server.js"); + console.log(`Worker ${process.pid} started`); +} diff --git a/frameworks/JavaScript/hono/src/database/postgres.js b/frameworks/JavaScript/hono/src/database/postgres.js new file mode 100644 index 00000000000..54ef83e4da9 --- /dev/null +++ b/frameworks/JavaScript/hono/src/database/postgres.js @@ -0,0 +1,25 @@ +import postgres from "postgres"; + +const sql = postgres({ + host: "tfb-database", + user: "benchmarkdbuser", + password: "benchmarkdbpass", + database: "hello_world", + max: 1, +}); + +export const fortunes = async () => await sql`SELECT id, message FROM fortune`; + +export const find = async (id) => + await sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( + (arr) => arr[0] + ); + +export const bulkUpdate = async (worlds) => + await sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int + FROM (VALUES ${sql( + worlds + .map((world) => [world.id, world.randomNumber]) + .sort((a, b) => (a[0] < b[0] ? -1 : 1)) + )}) AS update_data (id, randomNumber) + WHERE world.id = (update_data.id)::int`; diff --git a/frameworks/JavaScript/hono/src/server.js b/frameworks/JavaScript/hono/src/server.js new file mode 100644 index 00000000000..43364616d55 --- /dev/null +++ b/frameworks/JavaScript/hono/src/server.js @@ -0,0 +1,108 @@ +import { serve } from "@hono/node-server"; +import { Hono } from "hono"; +import { + addBenchmarkHeaders, + escape, + generateRandomNumber, + getQueriesCount, + handleError, + sortByMessage, +} from "./utils.js"; + +let db; +const { DATABASE } = process.env; +if (DATABASE) db = await import(`./database/${DATABASE}.js`); + +const app = new Hono(); + +app + .get("/plaintext", (c) => { + addBenchmarkHeaders(c); + return c.text("Hello, World!"); + }) + .get("/json", (c) => { + addBenchmarkHeaders(c); + return c.json({ message: "Hello, World!" }); + }); + +if (db) { + const extra = { id: 0, message: "Additional fortune added at request time." }; + + app + .get("/db", async (c) => { + const randomNumber = await db.find(generateRandomNumber()); + addBenchmarkHeaders(c); + return c.json(randomNumber); + }) + .get("/queries", async (c) => { + const queriesCount = getQueriesCount(c); + + const databaseJobs = new Array(queriesCount); + + for (let i = 0; i < queriesCount; i++) { + databaseJobs[i] = db.find(generateRandomNumber()); + } + + const worldObjects = await Promise.all(databaseJobs); + + addBenchmarkHeaders(c); + return c.json(worldObjects); + }) + .get("/fortunes", async (c) => { + const rows = [extra, ...(await db.fortunes())]; + + sortByMessage(rows); + + const n = rows.length; + + let html = "", + i = 0; + for (; i < n; i++) { + html += `${rows[i].id}${escape( + rows[i].message + )}`; + } + + addBenchmarkHeaders(c); + return c.html( + `Fortunes${html}
idmessage
` + ); + }) + .get("/updates", async (c) => { + const queriesCount = getQueriesCount(c); + + const databaseJobs = new Array(queriesCount); + + for (let i = 0; i < queriesCount; i++) { + databaseJobs[i] = db.find(generateRandomNumber()); + } + + const worldObjects = await Promise.all(databaseJobs); + + for (let i = 0; i < queriesCount; i++) { + worldObjects[i].randomNumber = generateRandomNumber(); + } + + await db.bulkUpdate(worldObjects); + + addBenchmarkHeaders(c); + return c.json(worldObjects); + }); +} + +app + .all("/*", (c) => { + addBenchmarkHeaders(c); + return c.text("Not Found", 404); + }) + .onError(handleError); + +const port = parseInt(process.env.PORT || "8080"); +const hostname = process.env.HOST || "0.0.0.0"; +serve({ fetch: app.fetch, hostname, port }, (info) => { + if (!info) { + console.error(`Couldn't bind to http://${hostname}:${port}!`); + process.exit(1); + } + console.log(`Successfully bound to http://${hostname}:${port}.`); +}); diff --git a/frameworks/JavaScript/hono/src/utils.js b/frameworks/JavaScript/hono/src/utils.js new file mode 100644 index 00000000000..7c17c12f1a6 --- /dev/null +++ b/frameworks/JavaScript/hono/src/utils.js @@ -0,0 +1,81 @@ +/** + * Add Benchmark HTTP response headers. + * + * Add HTTP response headers `Server` and `Date` which is required by the test suite. + * + * https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview + * + * @param {import('hono').Context} c + */ +export function addBenchmarkHeaders(c) { + c.header("Server", "Hono"); +} + +/** + * Handle error for response + * + * @param {Error} err + * @param {import('hono').Context} c + */ +export function handleError(err, c) { + console.error(err); + addBenchmarkHeaders(c); + c.text("Internal Server Error"); +} + +/** + * Get queries count + * + * @param {import('hono').Context} c + */ +export function getQueriesCount(c) { + return Math.min(parseInt(c.req.query("queries")) || 1, 500); +} + +/** + * Generate random number + * + */ +export function generateRandomNumber() { + return Math.ceil(Math.random() * 10000); +} + +/** + * Escape unsafe HTML Code + * + */ +const escapeHTMLRules = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/", +}; + +const unsafeHTMLMatcher = /[&<>"'\/]/g; + +export function escape(text) { + if (unsafeHTMLMatcher.test(text) === false) return text; + return text.replace(unsafeHTMLMatcher, function (m) { + return escapeHTMLRules[m] || m; + }); +} + +/** + * Using Sort method which is performant for the test scenario + * @returns + */ +export function sortByMessage(arr) { + const n = arr.length; + for (let i = 1; i < n; i++) { + const c = arr[i]; + let j = i - 1; + while (j > -1 && c.message < arr[j].message) { + arr[j + 1] = arr[j]; + j--; + } + arr[j + 1] = c; + } + return arr; +} diff --git a/frameworks/JavaScript/mesh/README.md b/frameworks/JavaScript/mesh/README.md new file mode 100644 index 00000000000..cf161c498e7 --- /dev/null +++ b/frameworks/JavaScript/mesh/README.md @@ -0,0 +1,48 @@ +# Mesh Benchmarking Test + +This is the [`Mesh`](https://github.com/ionited/mesh) portion of a [benchmarking test suite](../) comparing a variety of web development platforms. + +Information about Mesh can be found at https://github.com/ionited/mesh + +## Database Drivers + +There are individual handlers for each DB approach. The logic for each of them are found here: + +* [MySQL](drivers/mysql.js) +* [MongoDB](drivers/mongodb.js) +* [PostgreSQL](drivers/postgres.js) + +There are **no database endpoints** or drivers attached by default.
+To initialize the application with one of these, run any _one_ of the following commands: + +```sh +$ DATABASE=mysql node app.js +$ DATABASE=mongodb node app.js +$ DATABASE=postgres node app.js +``` + +## Test Endpoints + +> Visit the test requirements [here](https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview) + +```sh +$ curl localhost:8080/json +$ curl localhost:8080/plaintext + +# The following are only available w/ DATABASE + +$ curl localhost:8080/db +$ curl localhost:8080/fortunes + +$ curl localhost:8080/updates?queries= +$ curl localhost:8080/updates?queries=2 +$ curl localhost:8080/updates?queries=1000 +$ curl localhost:8080/updates?queries=foo +$ curl localhost:8080/updates?queries=0 + +$ curl localhost:8080/queries?queries= +$ curl localhost:8080/queries?queries=2 +$ curl localhost:8080/queries?queries=1000 +$ curl localhost:8080/queries?queries=foo +$ curl localhost:8080/queries?queries=0 +``` diff --git a/frameworks/JavaScript/mesh/app.js b/frameworks/JavaScript/mesh/app.js new file mode 100644 index 00000000000..20d9145ebab --- /dev/null +++ b/frameworks/JavaScript/mesh/app.js @@ -0,0 +1,18 @@ +const cluster = require("cluster"); +const numCPUs = require("os").cpus().length; + +if (cluster.isPrimary) { + console.log(`Primary ${process.pid} is running`); + + // Fork workers. + for (let i = 0; i < numCPUs; i++) { + cluster.fork(); + } + + cluster.on('exit', (worker, code, signal) => { + console.log(`worker ${worker.process.pid} died`); + }); +} else { + // worker task + require("./server"); +} diff --git a/frameworks/JavaScript/mesh/benchmark_config.json b/frameworks/JavaScript/mesh/benchmark_config.json new file mode 100644 index 00000000000..bf91e85e86f --- /dev/null +++ b/frameworks/JavaScript/mesh/benchmark_config.json @@ -0,0 +1,92 @@ +{ + "framework": "mesh", + "tests": [ + { + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "None", + "framework": "mesh", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "nodejs", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Mesh", + "notes": "", + "versus": "nodejs" + }, + "mysql": { + "dockerfile": "mesh-mysql.dockerfile", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "MySQL", + "framework": "mesh", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "nodejs", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Mesh", + "notes": "", + "versus": "nodejs" + }, + "postgres": { + "dockerfile": "mesh-postgres.dockerfile", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "Postgres", + "framework": "mesh", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Mesh", + "notes": "", + "versus": "nodejs" + }, + "mongodb": { + "dockerfile": "mesh-mongodb.dockerfile", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "MongoDB", + "framework": "mesh", + "language": "JavaScript", + "flavor": "NodeJS", + "orm": "Raw", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Mesh", + "notes": "", + "versus": "nodejs" + } + } + ] +} diff --git a/frameworks/JavaScript/mesh/drivers/mongodb.js b/frameworks/JavaScript/mesh/drivers/mongodb.js new file mode 100644 index 00000000000..6d12fabc90e --- /dev/null +++ b/frameworks/JavaScript/mesh/drivers/mongodb.js @@ -0,0 +1,16 @@ +const { MongoClient } = require('mongodb'); + +let World, Fortune; +const projection = { _id:0 }; + +MongoClient.connect('mongodb://tfb-database:27017', { useNewUrlParser:true }, (err, ctx) => { + const DB = ctx.db('hello_world'); + Fortune = DB.collection('fortune'); + World = DB.collection('world'); +}); + +exports.fortunes = () => Fortune.find({}, { projection }).toArray(); + +exports.find = id => World.findOne({ id }, { projection }); + +exports.update = obj => World.replaceOne({ id:obj.id }, obj); diff --git a/frameworks/JavaScript/mesh/drivers/mysql.js b/frameworks/JavaScript/mesh/drivers/mysql.js new file mode 100644 index 00000000000..24ce23bf247 --- /dev/null +++ b/frameworks/JavaScript/mesh/drivers/mysql.js @@ -0,0 +1,24 @@ +const { createConnection } = require('mysql'); + +const connection = createConnection({ + host: 'tfb-database', + user: 'benchmarkdbuser', + password: 'benchmarkdbpass', + database: 'hello_world' +}); + +connection.connect(); + +function query(text, values) { + return new Promise((res, rej) => { + connection.query(text, values || [], (err, results) => { + return err ? rej(err) : res(results); + }); + }); +} + +exports.fortunes = () => query('SELECT * FROM fortune'); + +exports.find = id => query('SELECT * FROM world WHERE id = ?', [id]).then(arr => arr[0]); + +exports.update = obj => query('UPDATE world SET randomNumber = ? WHERE id = ?', [obj.randomNumber, obj.id]); diff --git a/frameworks/JavaScript/mesh/drivers/postgres.js b/frameworks/JavaScript/mesh/drivers/postgres.js new file mode 100644 index 00000000000..2c8388823a6 --- /dev/null +++ b/frameworks/JavaScript/mesh/drivers/postgres.js @@ -0,0 +1,20 @@ +const { Client } = require('pg'); + +const client = new Client({ + host: 'tfb-database', + user: 'benchmarkdbuser', + password: 'benchmarkdbpass', + database: 'hello_world' +}); + +client.connect(); + +function query(text, values) { + return client.query(text, values || []).then(r => r.rows); +} + +exports.fortunes = () => query('SELECT * FROM fortune'); + +exports.find = id => query('SELECT * FROM world WHERE id = $1', [id]).then(arr => arr[0]); + +exports.update = obj => query('UPDATE world SET randomNumber = $1 WHERE id = $2', [obj.randomNumber, obj.id]); diff --git a/frameworks/JavaScript/mesh/mesh-mongodb.dockerfile b/frameworks/JavaScript/mesh/mesh-mongodb.dockerfile new file mode 100644 index 00000000000..ed44c5dce07 --- /dev/null +++ b/frameworks/JavaScript/mesh/mesh-mongodb.dockerfile @@ -0,0 +1,12 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV DATABASE mongodb + +EXPOSE 8080 + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/mesh/mesh-mysql.dockerfile b/frameworks/JavaScript/mesh/mesh-mysql.dockerfile new file mode 100644 index 00000000000..4eb47cce4aa --- /dev/null +++ b/frameworks/JavaScript/mesh/mesh-mysql.dockerfile @@ -0,0 +1,12 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV DATABASE mysql + +EXPOSE 8080 + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/mesh/mesh-postgres.dockerfile b/frameworks/JavaScript/mesh/mesh-postgres.dockerfile new file mode 100644 index 00000000000..4b948d766d3 --- /dev/null +++ b/frameworks/JavaScript/mesh/mesh-postgres.dockerfile @@ -0,0 +1,12 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production +ENV DATABASE postgres + +EXPOSE 8080 + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/mesh/mesh.dockerfile b/frameworks/JavaScript/mesh/mesh.dockerfile new file mode 100644 index 00000000000..e479cd4a1e2 --- /dev/null +++ b/frameworks/JavaScript/mesh/mesh.dockerfile @@ -0,0 +1,11 @@ +FROM node:20-slim + +COPY ./ ./ + +RUN npm install + +ENV NODE_ENV production + +EXPOSE 8080 + +CMD ["node", "app.js"] diff --git a/frameworks/JavaScript/mesh/package-lock.json b/frameworks/JavaScript/mesh/package-lock.json new file mode 100644 index 00000000000..a4aa12eb197 --- /dev/null +++ b/frameworks/JavaScript/mesh/package-lock.json @@ -0,0 +1,369 @@ +{ + "name": "mesh", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "mesh", + "version": "0.0.1", + "dependencies": { + "@ionited/mesh": "^0.6.0", + "mongodb": "^3.7.4", + "mysql": "^2.18.1", + "pg": "^8.11.3" + } + }, + "node_modules/@ionited/mesh": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@ionited/mesh/-/mesh-0.6.0.tgz", + "integrity": "sha512-SnRY0JML4Sa7WZ3J6hFibti/euRONuagTOE0QnEbwsMTzPFzVDl1fdQTO4NZKcDPVyBC74XdEUTw9+AEz+ZFlA==", + "dependencies": { + "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.43.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/denque": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", + "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "node_modules/mongodb": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.4.tgz", + "integrity": "sha512-K5q8aBqEXMwWdVNh94UQTwZ6BejVbFhh1uB6c5FKtPE9eUMZPUO3sRZdgIEcHSrAWmxzpG/FeODDKL388sqRmw==", + "dependencies": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "optional-require": "^1.1.8", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4" + }, + "optionalDependencies": { + "saslprep": "^1.0.0" + }, + "peerDependenciesMeta": { + "aws4": { + "optional": true + }, + "bson-ext": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "mongodb-extjson": { + "optional": true + }, + "snappy": { + "optional": true + } + } + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/optional-require": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz", + "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==", + "dependencies": { + "require-at": "^1.0.6" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, + "node_modules/pg": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", + "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.6.2", + "pg-pool": "^3.6.1", + "pg-protocol": "^1.6.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", + "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", + "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/require-at": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", + "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "dependencies": { + "sparse-bitfield": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "optional": true, + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uWebSockets.js": { + "version": "20.43.0", + "resolved": "git+ssh://git@github.com/uNetworking/uWebSockets.js.git#1977b5039938ad863d42fc4958d48c17e5a1fa06", + "license": "Apache-2.0" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + } + } +} diff --git a/frameworks/JavaScript/mesh/package.json b/frameworks/JavaScript/mesh/package.json new file mode 100644 index 00000000000..2f65506f61e --- /dev/null +++ b/frameworks/JavaScript/mesh/package.json @@ -0,0 +1,13 @@ +{ + "name": "mesh", + "version": "0.0.1", + "description": "Mesh tests for TechEmpower Framework Benchmarks.", + "main": "app.js", + "private": true, + "dependencies": { + "@ionited/mesh": "^0.6.0", + "mongodb": "^3.7.4", + "mysql": "^2.18.1", + "pg": "^8.11.3" + } +} diff --git a/frameworks/JavaScript/mesh/server.js b/frameworks/JavaScript/mesh/server.js new file mode 100644 index 00000000000..a606c8abed3 --- /dev/null +++ b/frameworks/JavaScript/mesh/server.js @@ -0,0 +1,104 @@ +const db = process.env.DATABASE; + +const { App } = require('@ionited/mesh'); + +const addHeaders = (res, contentType) => res.header('Content-Type', contentType).header('Server', 'Mesh'); + +const escapeHTMLRules = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/", +}; + +const unsafeHTMLMatcher = /[&<>"'\/]/g; + +const escape = text => { + if (unsafeHTMLMatcher.test(text) === false) return text; + return text.replace(unsafeHTMLMatcher, m => escapeHTMLRules[m] || m); +} + +const random = () => Math.floor(Math.random() * 1e4) + 1; + +const app = new App(); + +app + +.get('/json', (_, res) => { + addHeaders(res, 'application/json'); + + res.json({ message: 'Hello, World!' }); +}) + +.get('/plaintext', (_, res) => { + addHeaders(res, 'text/plain'); + + res.send('Hello, World!'); +}); + +if (db) { + const DRIVER = require(`./drivers/${db}`); + + app + + .get('/db', async (_, res) => { + addHeaders(res, 'application/json'); + + res.json(await DRIVER.find(random())); + }) + + .get('/queries', async (req, res) => { + const { queries } = req.query(); + + const count = Math.min(parseInt(queries) || 1, 500); + + const arr = []; + + for (let i = 0; i < count; i++) arr.push(await DRIVER.find(random())); + + addHeaders(res, 'application/json'); + + res.json(arr); + }) + + .get('/fortunes', async (_, res) => { + const items = [{ + id: 0, + message: 'Additional fortune added at request time.' + }, ...await DRIVER.fortunes()].sort((a, b) => a.message.localeCompare(b.message)); + + let html = 'Fortunes'; + + for (let i = 0; i < items.length; i++) html += ``; + + html += '
idmessage
${items[i].id}${escape(items[i].message)}
'; + + addHeaders(res, 'text/html; charset=utf-8'); + + res.send(html); + }) + + .get('/updates', async (req, res) => { + const { queries } = req.query(); + + const count = Math.min(parseInt(queries) || 1, 500); + + const arr = []; + + for (let i = 0; i < count; i++) arr.push(await DRIVER.find(random())); + + for (let i = 0; i < count; i++) { + arr[i].randomNumber = random(); + + await DRIVER.update(arr[i]); + } + + addHeaders(res, 'application/json'); + + res.json(arr); + }); +} + +app.listen(8080); diff --git a/frameworks/JavaScript/spliffy/package-lock.json b/frameworks/JavaScript/spliffy/package-lock.json index 22f2726af09..f0c6a55ff5b 100644 --- a/frameworks/JavaScript/spliffy/package-lock.json +++ b/frameworks/JavaScript/spliffy/package-lock.json @@ -1128,9 +1128,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", + "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==" }, "is-property": { "version": "1.0.2", diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index 06489534605..9279d3b38fd 100644 --- a/frameworks/Kotlin/hexagon/build.gradle +++ b/frameworks/Kotlin/hexagon/build.gradle @@ -1,7 +1,7 @@ plugins { - id "org.jetbrains.kotlin.jvm" version "1.9.20" apply false - id "org.graalvm.buildtools.native" version "0.9.28" apply false + id "org.jetbrains.kotlin.jvm" version "1.9.23" apply false + id "org.graalvm.buildtools.native" version "0.10.1" apply false } version = "1.0.0" @@ -9,13 +9,13 @@ description = "TFB benchmark" group = "com.hexagonkt" ext { - hexagonVersion = "3.4.3" - jettyVersion = "12.0.3" - nettyVersion = "4.1.100.Final" + hexagonVersion = "3.5.1" + jettyVersion = "12.0.7" + nettyVersion = "4.1.107.Final" hikariVersion = "5.1.0" - postgresqlVersion = "42.6.0" - vertxVersion = "4.4.6" + postgresqlVersion = "42.7.3" + vertxVersion = "4.5.5" cache2kVersion = "2.6.1.Final" applicationClass = "com.hexagonkt.BenchmarkKt" @@ -30,5 +30,5 @@ subprojects { } tasks.wrapper { - gradleVersion = "8.4" + gradleVersion = "8.6" } diff --git a/frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties b/frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties index 4dac65fae39..3c802071a99 100644 --- a/frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties +++ b/frameworks/Kotlin/hexagon/core/src/main/resources/META-INF/native-image/com.hexagonkt.benchmark/core/native-image.properties @@ -2,4 +2,5 @@ Args= \ -march=native \ --static \ --libc=musl \ - --initialize-at-build-time=org.slf4j.LoggerFactory + --gc=G1 \ + --enable-sbom diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar index 7f93135c49b..d64cd491770 100644 Binary files a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar and b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar differ diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties index 3fa8f862f75..a80b22ce5cf 100644 --- a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/frameworks/Kotlin/hexagon/gradlew.bat b/frameworks/Kotlin/hexagon/gradlew.bat index 93e3f59f135..25da30dbdee 100644 --- a/frameworks/Kotlin/hexagon/gradlew.bat +++ b/frameworks/Kotlin/hexagon/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon-native.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon-native.dockerfile index 54ddbfc48c4..c402f0ee792 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon-native.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon-native.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM ghcr.io/graalvm/native-image-community:21-muslib-ol9 as build +FROM container-registry.oracle.com/graalvm/native-image:21-muslib-ol9 as build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile index 0ecb7488d43..d87e78307b0 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile index 5c790a00c72..913a9459a06 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile index 3e9f700ba25..2919fdba8b7 100644 --- a/frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-jetty-native.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM ghcr.io/graalvm/native-image-community:21-muslib-ol9 as build +FROM container-registry.oracle.com/graalvm/native-image:21-muslib-ol9 as build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile index 10f40528c0a..90d51b0b30b 100644 --- a/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-jettyloom-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile b/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile index ce807d1c2fe..93b0e22a963 100644 --- a/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-jettyloom.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile index d07a610bcd8..ba9b55020b9 100644 --- a/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-nettyepoll-pgclient.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile b/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile index c813f85bf27..a7c28730e03 100644 --- a/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-nettyepoll.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile index c28cb74d5d4..abd537c0dd3 100644 --- a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/hexagon/hexagon.dockerfile b/frameworks/Kotlin/hexagon/hexagon.dockerfile index 7723b0cae2d..a8eec2e6809 100644 --- a/frameworks/Kotlin/hexagon/hexagon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/gradle:8.4-jdk21-alpine AS build +FROM docker.io/gradle:8.6-jdk21-alpine AS build USER root WORKDIR /hexagon diff --git a/frameworks/Kotlin/http4k/README.md b/frameworks/Kotlin/http4k/README.md index 58f7c5ea3c3..cf06bf0c995 100644 --- a/frameworks/Kotlin/http4k/README.md +++ b/frameworks/Kotlin/http4k/README.md @@ -3,7 +3,7 @@ ## Infrastructure Software Versions The tests were run with: -* JDK 11 +* JDK 21 * [http4k](https://http4k.org) ## Test URLs @@ -16,13 +16,14 @@ The tests were run with: - Plaintext: http://localhost:9000/plaintext ## Supported backends (w/ Postgres client) -- SunHttp/SunHttpLoom (default - bundled with core module - zero dependencies) +- SunHttp/SunHttpLoom (default - bundled with core module - zero dependencies) (+ SunHttpLoom w/GraalVM) - Apache (5) -- Apache4 -- Helidon +- Apache4 (+ w/GraalVM) +- Helidon (+ w/GraalVM) - KtorCIO - KtorNetty - Jetty/JettyLoom +- Jetty/JettyLoom (v11) - Netty - Ratpack - Undertow diff --git a/frameworks/Kotlin/http4k/benchmark_config.json b/frameworks/Kotlin/http4k/benchmark_config.json index 60fbe075918..81dd97b4b47 100755 --- a/frameworks/Kotlin/http4k/benchmark_config.json +++ b/frameworks/Kotlin/http4k/benchmark_config.json @@ -264,6 +264,72 @@ "notes": "https://http4k.org", "versus": "jetty" }, + "jetty11": { + "orm": "Raw", + "database_os": "Linux", + "cached_query_url": "/cached?queries=", + "db_url": "/db", + "json_url": "/json", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "database": "Postgres", + "port": 9000, + "approach": "Realistic", + "classification": "Micro", + "framework": "http4k", + "language": "Kotlin", + "platform": "jetty11", + "webserver": "None", + "os": "Linux", + "notes": "https://http4k.org", + "versus": "jetty" + }, + "jetty11loom-jdbc": { + "orm": "Raw", + "database_os": "Linux", + "cached_query_url": "/cached?queries=", + "db_url": "/db", + "json_url": "/json", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "database": "Postgres", + "port": 9000, + "approach": "Realistic", + "classification": "Micro", + "framework": "http4k", + "language": "Kotlin", + "platform": "jetty11-loom-jdbc", + "webserver": "None", + "os": "Linux", + "notes": "https://http4k.org", + "versus": "jetty11" + }, + "jetty11loom-pgclient": { + "orm": "Raw", + "database_os": "Linux", + "cached_query_url": "/cached?queries=", + "db_url": "/db", + "json_url": "/json", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "database": "Postgres", + "port": 9000, + "approach": "Realistic", + "classification": "Micro", + "framework": "http4k", + "language": "Kotlin", + "platform": "jetty11-loom-pgclient", + "webserver": "None", + "os": "Linux", + "notes": "https://http4k.org", + "versus": "jetty11" + }, "ktorcio": { "orm": "Raw", "database_os": "Linux", diff --git a/frameworks/Kotlin/http4k/build.gradle.kts b/frameworks/Kotlin/http4k/build.gradle.kts index 3e2cebabc3c..954b08a5fbc 100644 --- a/frameworks/Kotlin/http4k/build.gradle.kts +++ b/frameworks/Kotlin/http4k/build.gradle.kts @@ -1,9 +1,10 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.gradle.api.JavaVersion.* import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.js.translate.context.Namer.kotlin plugins { - kotlin("jvm") version "1.9.20" + kotlin("jvm") version "1.9.22" application } diff --git a/frameworks/Kotlin/http4k/config.toml b/frameworks/Kotlin/http4k/config.toml index 3033ee189fa..4f3a6f6e614 100644 --- a/frameworks/Kotlin/http4k/config.toml +++ b/frameworks/Kotlin/http4k/config.toml @@ -161,6 +161,60 @@ platform = "jetty-loom-pgclient" webserver = "None" versus = "jetty" +[jetty11] +urls.cached_query = "/cached?queries=" +urls.db = "/db" +urls.fortune = "/fortunes" +urls.json = "/json" +urls.plaintext = "/plaintext" +urls.query = "/queries?queries=" +urls.update = "/updates?queries=" +approach = "Realistic" +classification = "Micro" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "jetty11" +webserver = "None" +versus = "jetty" + +[jetty11loom-jdbc] +urls.cached_query = "/cached?queries=" +urls.db = "/db" +urls.fortune = "/fortunes" +urls.json = "/json" +urls.plaintext = "/plaintext" +urls.query = "/queries?queries=" +urls.update = "/updates?queries=" +approach = "Realistic" +classification = "Micro" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "jetty-loom11-jdbc" +webserver = "None" +versus = "jetty11" + +[jetty11loom-pgclient] +urls.cached_query = "/cached?queries=" +urls.db = "/db" +urls.fortune = "/fortunes" +urls.json = "/json" +urls.plaintext = "/plaintext" +urls.query = "/queries?queries=" +urls.update = "/updates?queries=" +approach = "Realistic" +classification = "Micro" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "jetty11-loom-pgclient" +webserver = "None" +versus = "jetty11" + [helidon-jdbc] urls.cached_query = "/cached?queries=" urls.db = "/db" diff --git a/frameworks/Kotlin/http4k/core/build.gradle.kts b/frameworks/Kotlin/http4k/core/build.gradle.kts index f205c09bc25..3780e39df97 100644 --- a/frameworks/Kotlin/http4k/core/build.gradle.kts +++ b/frameworks/Kotlin/http4k/core/build.gradle.kts @@ -4,16 +4,16 @@ plugins { } dependencies { - api(platform("org.http4k:http4k-bom:5.10.2.0")) - api("org.jetbrains.kotlin:kotlin-stdlib:1.9.20") - api("org.jetbrains.kotlin:kotlin-reflect:1.9.20") + api(platform("org.http4k:http4k-bom:5.12.0.0")) + api("org.jetbrains.kotlin:kotlin-stdlib:1.9.22") + api("org.jetbrains.kotlin:kotlin-reflect:1.9.22") api("org.http4k:http4k-core") api("org.http4k:http4k-format-argo") api("org.http4k:http4k-template-rocker") api("org.apache.commons:commons-lang3:3.12.0") api("org.cache2k:cache2k-core:2.6.1.Final") - compileOnly("com.fizzed:rocker-compiler:1.3.0") + compileOnly("com.fizzed:rocker-compiler:1.4.0") } rocker { diff --git a/frameworks/Kotlin/http4k/graalvm/src/main/kotlin/http4k/Http4kGraalVMBenchmarkServer.kt b/frameworks/Kotlin/http4k/graalvm/src/main/kotlin/http4k/Http4kGraalVMBenchmarkServer.kt index 20a8d1eb566..a94b241d3f0 100644 --- a/frameworks/Kotlin/http4k/graalvm/src/main/kotlin/http4k/Http4kGraalVMBenchmarkServer.kt +++ b/frameworks/Kotlin/http4k/graalvm/src/main/kotlin/http4k/Http4kGraalVMBenchmarkServer.kt @@ -1,5 +1,5 @@ -import org.http4k.server.SunHttp +import org.http4k.server.SunHttpLoom fun main() { - Http4kBenchmarkServer(PostgresDatabase()).start(SunHttp(9000)) + Http4kBenchmarkServer(PostgresDatabase()).start(SunHttpLoom(9000)) } diff --git a/frameworks/Kotlin/http4k/http4k-apache-graalvm.dockerfile b/frameworks/Kotlin/http4k/http4k-apache-graalvm.dockerfile index a8fa54b4fcc..c6815f305cc 100644 --- a/frameworks/Kotlin/http4k/http4k-apache-graalvm.dockerfile +++ b/frameworks/Kotlin/http4k/http4k-apache-graalvm.dockerfile @@ -10,16 +10,21 @@ COPY core-pgclient core-pgclient COPY apache-graalvm apache-graalvm RUN gradle --quiet --no-daemon apache-graalvm:shadowJar -FROM ghcr.io/graalvm/graalvm-community:21.0.0-ol9-20230919 as graalvm + +FROM ghcr.io/graalvm/native-image-community:21 as graalvm COPY --from=gradle /http4k/core/src/main/resources/* /home/app/http4k-apache-graalvm/ COPY --from=gradle /http4k/apache-graalvm/build/libs/http4k-benchmark.jar /home/app/http4k-apache-graalvm/ COPY --from=gradle /http4k/apache-graalvm/config/*.json /home/app/http4k-apache-graalvm/ -WORKDIR /home/app/http4k-apache-graalvm + RUN native-image \ - -H:ReflectionConfigurationFiles=reflect-config.json \ - -H:ResourceConfigurationFiles=resource-config.json \ + --static --no-fallback \ + -H:+UnlockExperimentalVMOptions \ + -H:ReflectionConfigurationFiles=/home/app/http4k-apache-graalvm/reflect-config.json \ + -H:ResourceConfigurationFiles=/home/app/http4k-apache-graalvm/resource-config.json \ --initialize-at-build-time="org.slf4j.LoggerFactory,org.slf4j.simple.SimpleLogger,org.slf4j.impl.StaticLoggerBinder" \ - --no-fallback -cp http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt + -cp /home/app/http4k-apache-graalvm/http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt +FROM frolvlad/alpine-glibc +COPY --from=graalvm /app/http4kgraalvmbenchmarkserverkt /http4kgraalvmbenchmarkserverkt EXPOSE 9000 -ENTRYPOINT ["/home/app/http4k-apache-graalvm/http4kgraalvmbenchmarkserverkt"] \ No newline at end of file +ENTRYPOINT ["/http4kgraalvmbenchmarkserverkt"] \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/http4k-graalvm.dockerfile b/frameworks/Kotlin/http4k/http4k-graalvm.dockerfile index b59cae84fd3..667932c0441 100644 --- a/frameworks/Kotlin/http4k/http4k-graalvm.dockerfile +++ b/frameworks/Kotlin/http4k/http4k-graalvm.dockerfile @@ -7,19 +7,23 @@ COPY core core COPY core-jdbc core-jdbc COPY core-pgclient core-pgclient COPY graalvm graalvm -COPY sunhttp sunhttp RUN gradle --quiet --no-daemon graalvm:shadowJar -FROM ghcr.io/graalvm/graalvm-community:21.0.0-ol9-20230919 as graalvm + +FROM ghcr.io/graalvm/native-image-community:21 as graalvm COPY --from=gradle /http4k/core/src/main/resources/* /home/app/http4k-graalvm/ COPY --from=gradle /http4k/graalvm/build/libs/http4k-benchmark.jar /home/app/http4k-graalvm/ COPY --from=gradle /http4k/graalvm/config/*.json /home/app/http4k-graalvm/ -WORKDIR /home/app/http4k-graalvm + RUN native-image \ - -H:ReflectionConfigurationFiles=reflect-config.json \ - -H:ResourceConfigurationFiles=resource-config.json \ + --static --no-fallback \ + -H:+UnlockExperimentalVMOptions \ + -H:ReflectionConfigurationFiles=/home/app/http4k-graalvm/reflect-config.json \ + -H:ResourceConfigurationFiles=/home/app/http4k-graalvm/resource-config.json \ --initialize-at-build-time="org.slf4j.LoggerFactory,org.slf4j.simple.SimpleLogger,org.slf4j.impl.StaticLoggerBinder" \ - --no-fallback -cp http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt + -cp /home/app/http4k-graalvm/http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt +FROM frolvlad/alpine-glibc +COPY --from=graalvm /app/http4kgraalvmbenchmarkserverkt /http4kgraalvmbenchmarkserverkt EXPOSE 9000 -ENTRYPOINT ["/home/app/http4k-graalvm/http4kgraalvmbenchmarkserverkt"] +ENTRYPOINT ["/http4kgraalvmbenchmarkserverkt"] \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/http4k-helidon-graalvm.dockerfile b/frameworks/Kotlin/http4k/http4k-helidon-graalvm.dockerfile index 833b73497c1..0dd8a12cd2b 100644 --- a/frameworks/Kotlin/http4k/http4k-helidon-graalvm.dockerfile +++ b/frameworks/Kotlin/http4k/http4k-helidon-graalvm.dockerfile @@ -10,16 +10,21 @@ COPY helidon-jdbc helidon-jdbc COPY helidon-graalvm helidon-graalvm RUN gradle --quiet --no-daemon helidon-graalvm:shadowJar -FROM ghcr.io/graalvm/graalvm-community:21.0.0-ol9-20230919 as graalvm + +FROM ghcr.io/graalvm/native-image-community:21 as graalvm COPY --from=gradle /http4k/core/src/main/resources/* /home/app/http4k-helidon-graalvm/ COPY --from=gradle /http4k/helidon-graalvm/build/libs/http4k-benchmark.jar /home/app/http4k-helidon-graalvm/ COPY --from=gradle /http4k/helidon-graalvm/config/*.json /home/app/http4k-helidon-graalvm/ -WORKDIR /home/app/http4k-helidon-graalvm + RUN native-image \ - -H:ReflectionConfigurationFiles=reflect-config.json \ - -H:ResourceConfigurationFiles=resource-config.json \ + --static --no-fallback \ + -H:+UnlockExperimentalVMOptions \ + -H:ReflectionConfigurationFiles=/home/app/http4k-helidon-graalvm/reflect-config.json \ + -H:ResourceConfigurationFiles=/home/app/http4k-helidon-graalvm/resource-config.json \ --initialize-at-build-time="org.slf4j.LoggerFactory,org.slf4j.simple.SimpleLogger,org.slf4j.impl.StaticLoggerBinder" \ - --no-fallback -cp http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt + -cp /home/app/http4k-helidon-graalvm/http4k-benchmark.jar Http4kGraalVMBenchmarkServerKt +FROM frolvlad/alpine-glibc +COPY --from=graalvm /app/http4kgraalvmbenchmarkserverkt /http4kgraalvmbenchmarkserverkt EXPOSE 9000 -ENTRYPOINT ["/home/app/http4k-helidon-graalvm/http4kgraalvmbenchmarkserverkt"] \ No newline at end of file +ENTRYPOINT ["/http4kgraalvmbenchmarkserverkt"] \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/http4k-jetty11.dockerfile b/frameworks/Kotlin/http4k/http4k-jetty11.dockerfile new file mode 100644 index 00000000000..de416c28a3d --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-jetty11.dockerfile @@ -0,0 +1,14 @@ +FROM gradle:8.4.0-jdk21 +USER root +WORKDIR /http4k +COPY build.gradle.kts build.gradle.kts +COPY settings.gradle.kts settings.gradle.kts +COPY core core +COPY core-jdbc core-jdbc +COPY core-pgclient core-pgclient +COPY jetty11 jetty11 +RUN gradle --quiet --no-daemon jetty11:shadowJar + +EXPOSE 9000 + +CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "jetty11/build/libs/http4k-benchmark.jar"] diff --git a/frameworks/Kotlin/http4k/http4k-jetty11loom-jdbc.dockerfile b/frameworks/Kotlin/http4k/http4k-jetty11loom-jdbc.dockerfile new file mode 100644 index 00000000000..729ef447464 --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-jetty11loom-jdbc.dockerfile @@ -0,0 +1,13 @@ +FROM gradle:8.4.0-jdk21 +USER root +WORKDIR /http4k +COPY build.gradle.kts build.gradle.kts +COPY settings.gradle.kts settings.gradle.kts +COPY core core +COPY core-jdbc core-jdbc +COPY jetty11loom-jdbc jetty11loom-jdbc +RUN gradle --quiet --no-daemon jetty11loom-jdbc:shadowJar + +EXPOSE 9000 + +CMD ["java", "-server", "-XX:+UseNUMA", "--enable-preview", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "jetty11loom-jdbc/build/libs/http4k-benchmark.jar"] diff --git a/frameworks/Kotlin/http4k/http4k-jetty11loom-pgclient.dockerfile b/frameworks/Kotlin/http4k/http4k-jetty11loom-pgclient.dockerfile new file mode 100644 index 00000000000..0560643c10e --- /dev/null +++ b/frameworks/Kotlin/http4k/http4k-jetty11loom-pgclient.dockerfile @@ -0,0 +1,13 @@ +FROM gradle:8.4.0-jdk21 +USER root +WORKDIR /http4k +COPY build.gradle.kts build.gradle.kts +COPY settings.gradle.kts settings.gradle.kts +COPY core core +COPY core-pgclient core-pgclient +COPY jetty11loom-pgclient jetty11loom-pgclient +RUN gradle --quiet --no-daemon jetty11loom-pgclient:shadowJar + +EXPOSE 9000 + +CMD ["java", "-server", "-XX:+UseNUMA", "--enable-preview", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "jetty11loom-pgclient/build/libs/http4k-benchmark.jar"] diff --git a/frameworks/Kotlin/http4k/jetty11/build.gradle.kts b/frameworks/Kotlin/http4k/jetty11/build.gradle.kts new file mode 100644 index 00000000000..c01bec2dafa --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11/build.gradle.kts @@ -0,0 +1,6 @@ +application.mainClass.set("Http4kJettyServerKt") + +dependencies { + api(project(":core-jdbc")) + api("org.http4k:http4k-server-jetty11") +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/jetty11/src/main/kotlin/Http4kJettyServer.kt b/frameworks/Kotlin/http4k/jetty11/src/main/kotlin/Http4kJettyServer.kt new file mode 100644 index 00000000000..e157e9033d8 --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11/src/main/kotlin/Http4kJettyServer.kt @@ -0,0 +1,5 @@ +import org.http4k.server.Jetty11 + +fun main() { + Http4kBenchmarkServer(PostgresDatabase(), false).start(Jetty11(9000)) +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/jetty11loom-jdbc/build.gradle.kts b/frameworks/Kotlin/http4k/jetty11loom-jdbc/build.gradle.kts new file mode 100644 index 00000000000..e367717c6ef --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11loom-jdbc/build.gradle.kts @@ -0,0 +1,6 @@ +application.mainClass.set("Http4kJettyLoomServerKt") + +dependencies { + api(project(":core-jdbc")) + api("org.http4k:http4k-server-jetty11") +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/jetty11loom-jdbc/src/main/kotlin/Http4kJettyLoomServer.kt b/frameworks/Kotlin/http4k/jetty11loom-jdbc/src/main/kotlin/Http4kJettyLoomServer.kt new file mode 100644 index 00000000000..d23f47c4ef9 --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11loom-jdbc/src/main/kotlin/Http4kJettyLoomServer.kt @@ -0,0 +1,5 @@ +import org.http4k.server.Jetty11Loom + +fun main() { + Http4kBenchmarkServer(PostgresDatabase(), false).start(Jetty11Loom(9000)) +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/jetty11loom-pgclient/build.gradle.kts b/frameworks/Kotlin/http4k/jetty11loom-pgclient/build.gradle.kts new file mode 100644 index 00000000000..3c555b12ac4 --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11loom-pgclient/build.gradle.kts @@ -0,0 +1,6 @@ +application.mainClass.set("Http4kJettyLoomServerKt") + +dependencies { + api(project(":core-pgclient")) + api("org.http4k:http4k-server-jetty11") +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/jetty11loom-pgclient/src/main/kotlin/Http4kJettyLoomServer.kt b/frameworks/Kotlin/http4k/jetty11loom-pgclient/src/main/kotlin/Http4kJettyLoomServer.kt new file mode 100644 index 00000000000..d23f47c4ef9 --- /dev/null +++ b/frameworks/Kotlin/http4k/jetty11loom-pgclient/src/main/kotlin/Http4kJettyLoomServer.kt @@ -0,0 +1,5 @@ +import org.http4k.server.Jetty11Loom + +fun main() { + Http4kBenchmarkServer(PostgresDatabase(), false).start(Jetty11Loom(9000)) +} \ No newline at end of file diff --git a/frameworks/Kotlin/http4k/settings.gradle.kts b/frameworks/Kotlin/http4k/settings.gradle.kts index 61d5ec3c132..bc46ef57f0e 100644 --- a/frameworks/Kotlin/http4k/settings.gradle.kts +++ b/frameworks/Kotlin/http4k/settings.gradle.kts @@ -30,6 +30,9 @@ include("graalvm") include("jetty") include("jettyloom-jdbc") include("jettyloom-pgclient") +include("jetty11") +include("jetty11loom-jdbc") +include("jetty11loom-pgclient") include("helidon-jdbc") include("helidon-pgclient") include("helidon-graalvm") diff --git a/frameworks/Kotlin/kooby/pom.xml b/frameworks/Kotlin/kooby/pom.xml index b5396de42a9..44397e8f522 100644 --- a/frameworks/Kotlin/kooby/pom.xml +++ b/frameworks/Kotlin/kooby/pom.xml @@ -13,7 +13,7 @@ 3.0.5 - 42.6.0 + 42.7.2 UTF-8 17 17 diff --git a/frameworks/Kotlin/ktor/ktor/pom.xml b/frameworks/Kotlin/ktor/ktor/pom.xml index 07db44a67ed..35ad4547a16 100644 --- a/frameworks/Kotlin/ktor/ktor/pom.xml +++ b/frameworks/Kotlin/ktor/ktor/pom.xml @@ -18,9 +18,9 @@ 0.7.3 UTF-8 5.0.0 - 1.2.4 + 1.2.13 8.0.28 - 42.4.3 + 42.7.2 diff --git a/frameworks/Kotlin/pellet/pellet.dockerfile b/frameworks/Kotlin/pellet/pellet.dockerfile index cb96c1079c5..f57e433dcd6 100644 --- a/frameworks/Kotlin/pellet/pellet.dockerfile +++ b/frameworks/Kotlin/pellet/pellet.dockerfile @@ -1,10 +1,10 @@ -FROM gradle:jdk18 as gradle +FROM gradle:jdk21 as gradle WORKDIR /sample COPY sample/build.gradle.kts build.gradle.kts COPY sample/src src RUN gradle clean shadowJar --no-daemon -FROM openjdk:18-jdk-buster +FROM openjdk:21-jdk-buster WORKDIR /sample COPY --from=gradle /sample/build/libs/sample-1.0.0-all.jar app.jar diff --git a/frameworks/Kotlin/pellet/sample/build.gradle.kts b/frameworks/Kotlin/pellet/sample/build.gradle.kts index a41736ca3a7..f12dad8adbd 100644 --- a/frameworks/Kotlin/pellet/sample/build.gradle.kts +++ b/frameworks/Kotlin/pellet/sample/build.gradle.kts @@ -1,8 +1,8 @@ plugins { application id("com.github.johnrengelman.shadow") version "7.1.0" - kotlin("jvm") version "1.7.10" - kotlin("plugin.serialization") version "1.7.10" + kotlin("jvm") version "1.9.23" + kotlin("plugin.serialization") version "1.9.23" id("nu.studer.rocker") version "3.0.4" } @@ -25,31 +25,27 @@ rocker { } dependencies { - implementation(platform("dev.pellet:pellet-bom:0.0.15")) + implementation(platform("dev.pellet:pellet-bom:0.0.16")) implementation("dev.pellet:pellet-server") implementation("dev.pellet:pellet-logging") implementation("org.slf4j:slf4j-api:1.7.36") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0-RC") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") implementation(platform(kotlin("bom"))) implementation(kotlin("stdlib-jdk8")) - implementation(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4")) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8") - implementation("io.vertx:vertx-pg-client:4.3.2") + implementation("io.vertx:vertx-pg-client:4.5.5") + implementation("io.vertx:vertx-lang-kotlin:4.5.5") implementation("com.ongres.scram:client:2.1") - implementation("io.vertx:vertx-lang-kotlin:4.3.2") - implementation("io.vertx:vertx-lang-kotlin-coroutines:4.3.2") } java { toolchain { - sourceCompatibility = JavaVersion.VERSION_18 - targetCompatibility = JavaVersion.VERSION_18 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } } tasks.withType { - kotlinOptions.jvmTarget = "18" + kotlinOptions.jvmTarget = "21" } application { diff --git a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/Benchmark.kt b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/Benchmark.kt index b756c01f476..51dd307d511 100644 --- a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/Benchmark.kt +++ b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/Benchmark.kt @@ -10,7 +10,6 @@ import dev.pellet.server.PelletConnector import dev.pellet.server.codec.mime.MediaType import dev.pellet.server.responder.http.PelletHTTPRouteContext import dev.pellet.server.routing.http.HTTPRouteResponse -import kotlinx.coroutines.runBlocking import kotlinx.serialization.json.Json import java.time.Instant import java.time.ZoneId @@ -25,7 +24,7 @@ val jsonEncoder = Json { prettyPrint = false } -fun main() = runBlocking { +fun main() { val sharedRouter = httpRouter { get("/plaintext", ::handlePlain) get("/json", ::handleJson) @@ -44,14 +43,14 @@ fun main() = runBlocking { router = sharedRouter } } - pellet.start().join() + pellet.start() } val dateFormatter = DateTimeFormatter .ofPattern("EEE, dd MMM yyyy HH:mm:ss z", Locale.ENGLISH) .withZone(ZoneId.of("GMT")) -private suspend fun handlePlain( +private fun handlePlain( context: PelletHTTPRouteContext ): HTTPRouteResponse { return HTTPRouteResponse.Builder() @@ -67,7 +66,7 @@ data class ResponseBody( val message: String ) -private suspend fun handleJson( +private fun handleJson( context: PelletHTTPRouteContext ): HTTPRouteResponse { val responseBody = ResponseBody(message = "Hello, World!") @@ -81,7 +80,7 @@ private suspend fun handleJson( private val repository = TFBRepository() -private suspend fun handleDb( +private fun handleDb( context: PelletHTTPRouteContext ): HTTPRouteResponse { val result = repository.fetchWorld() @@ -93,7 +92,7 @@ private suspend fun handleDb( .build() } -private suspend fun handleQuery( +private fun handleQuery( context: PelletHTTPRouteContext ): HTTPRouteResponse { val rawQueries = context.firstQueryParameter("queries").getOrNull() @@ -110,7 +109,7 @@ private suspend fun handleQuery( .build() } -private suspend fun handleUpdates( +private fun handleUpdates( context: PelletHTTPRouteContext ): HTTPRouteResponse { val rawQueries = context.firstQueryParameter("queries").getOrNull() @@ -133,7 +132,7 @@ private suspend fun handleUpdates( .build() } -private suspend fun handleFortunes( +private fun handleFortunes( context: PelletHTTPRouteContext ): HTTPRouteResponse { val newFortune = Fortune(0, "Additional fortune added at request time.") diff --git a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/FortuneDAO.kt b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/FortuneDAO.kt index 889c42ad809..2413066f829 100644 --- a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/FortuneDAO.kt +++ b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/FortuneDAO.kt @@ -2,5 +2,5 @@ package benchmark.data interface FortuneDAO { - suspend fun fetchFortunes(): List + fun fetchFortunes(): List } \ No newline at end of file diff --git a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/TFBRepository.kt b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/TFBRepository.kt index c73285c8df5..75357a462de 100644 --- a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/TFBRepository.kt +++ b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/TFBRepository.kt @@ -1,8 +1,7 @@ package benchmark.data -import io.vertx.kotlin.coroutines.await +import io.vertx.pgclient.PgBuilder import io.vertx.pgclient.PgConnectOptions -import io.vertx.pgclient.PgPool import io.vertx.sqlclient.PoolOptions import io.vertx.sqlclient.Tuple import java.util.concurrent.ThreadLocalRandom @@ -20,14 +19,19 @@ class TFBRepository: WorldDAO, FortuneDAO { } private val poolOptions = PoolOptions() - private val client = PgPool.client(connectOptions, poolOptions) + private val client = PgBuilder.client() + .with(poolOptions) + .connectingTo(connectOptions) + .build() - override suspend fun fetchWorld(): WorldDTO { + override fun fetchWorld(): WorldDTO { val worldId = ThreadLocalRandom.current().nextInt(1, 10001) val result = client .preparedQuery("select id, randomNumber from world where id = $1") .execute(Tuple.of(worldId)) - .await() + .toCompletionStage() + .toCompletableFuture() + .get() val row = result.first() return WorldDTO( row.getInteger(0), @@ -35,20 +39,24 @@ class TFBRepository: WorldDAO, FortuneDAO { ) } - override suspend fun updateWorlds(worlds: List) { + override fun updateWorlds(worlds: List) { val batch = worlds.map { Tuple.of(it.id, it.randomNumber) } client .preparedQuery("update world set randomNumber = $1 where id = $2") .executeBatch(batch) - .await() + .toCompletionStage() + .toCompletableFuture() + .get() } - override suspend fun fetchFortunes(): List { + override fun fetchFortunes(): List { val results = client.preparedQuery("select id, message from fortune") .execute() - .await() + .toCompletionStage() + .toCompletableFuture() + .get() return results.map { Fortune( it.getInteger(0), diff --git a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/WorldDAO.kt b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/WorldDAO.kt index 20324a49fb2..fd91eb40d1a 100644 --- a/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/WorldDAO.kt +++ b/frameworks/Kotlin/pellet/sample/src/main/kotlin/benchmark/data/WorldDAO.kt @@ -2,6 +2,6 @@ package benchmark.data interface WorldDAO { - suspend fun fetchWorld(): WorldDTO - suspend fun updateWorlds(worlds: List) + fun fetchWorld(): WorldDTO + fun updateWorlds(worlds: List) } \ No newline at end of file diff --git a/frameworks/Nim/basolato/.gitignore b/frameworks/Nim/basolato/.gitignore deleted file mode 100644 index 80fd75dc186..00000000000 --- a/frameworks/Nim/basolato/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Binaries -* -!*.* -!*/ - -# Test coverage -coverage/* -lcov.info - -logs/* -# config.nims -*.sqlite3 -*.db -*.db.bak diff --git a/frameworks/Nim/basolato/README.md b/frameworks/Nim/basolato/README.md index 3f8bc7ed7df..ab9292e0893 100755 --- a/frameworks/Nim/basolato/README.md +++ b/frameworks/Nim/basolato/README.md @@ -2,17 +2,16 @@ ### Test Type Implementation Source Code -* [JSON](./app/controllers/benchmark_controller.nim) -* [PLAINTEXT](./app/controllers/benchmark_controller.nim) -* [DB](./app/controllers/benchmark_controller.nim) -* [QUERY](./app/controllers/benchmark_controller.nim) -* [UPDATE](./app/controllers/benchmark_controller.nim) -* [FORTUNES](./app/controllers/benchmark_controller.nim) +* [JSON](./app/http/controllers/benchmark_controller.nim) +* [PLAINTEXT](./app/http/controllers/benchmark_controller.nim) +* [DB](./app/http/controllers/benchmark_controller.nim) +* [QUERY](./app/http/controllers/benchmark_controller.nim) +* [UPDATE](./app/http/controllers/benchmark_controller.nim) +* [FORTUNES](./app/http/controllers/benchmark_controller.nim) ## Important Libraries The tests were run with: * [Software](https://github.com/itsumura-h/nim-basolato) -* [Example](https://github.com/itsumura-h/nim-basolato/tree/master/examples) ## Test URLs ### JSON @@ -29,11 +28,11 @@ http://localhost:8080/db ### QUERY -http://localhost:8080/query?queries= +http://localhost:8080/queries?queries=1 ### UPDATE -http://localhost:8080/update?queries= +http://localhost:8080/updates?queries=1 ### FORTUNES diff --git a/frameworks/Nim/basolato/app/controllers/benchmark_controller.nim b/frameworks/Nim/basolato/app/controllers/benchmark_controller.nim deleted file mode 100644 index 2221c9ddc3f..00000000000 --- a/frameworks/Nim/basolato/app/controllers/benchmark_controller.nim +++ /dev/null @@ -1,81 +0,0 @@ -import json, random, algorithm, cgi, sugar, sequtils -from strutils import parseInt -# framework -import basolato/controller -import allographer/query_builder -# view -import ../../resources/pages/fortune_view - -type BenchmarkController* = ref object of Controller - -proc newBenchmarkController*(request:Request):BenchmarkController = - randomize() - return BenchmarkController.newController(request) - - -proc json*(this:BenchmarkController):Response = - return render(%*{"message":"Hello, World!"}) - -proc plainText*(this:BenchmarkController):Response = - var headers = newHeaders() - headers.set("Content-Type", "text/plain; charset=UTF-8") - return render("Hello, World!").setHeader(headers) - -proc db*(this:BenchmarkController):Response = - let i = rand(1..10000) - let response = RDB().table("world").find(i) - return render(%*response) - -proc query*(this:BenchmarkController):Response = - var countNum:int - try: - countNum = this.request.params["queries"].parseInt() - except: - countNum = 1 - - if countNum < 1: - countNum = 1 - elif countNum > 500: - countNum = 500 - - var response = newJArray() - for _ in 1..countNum: - let i = rand(1..10000) - let data = RDB().table("world").find(i) - response.add(data) - return render(%*response) - -proc fortune*(this:BenchmarkController):Response = - var rows = RDB().table("Fortune").orderBy("message", Asc).get() - rows = rows.mapIt(%*{ - "id": it["id"], - "message": xmlEncode(it["message"].getStr) - }) - rows.add(%*{ - "id": 0, - "message": "Additional fortune added at request time."} - ) - rows = rows.sortedByIt(it["message"].getStr) - return render(this.view.fortuneView(rows)) - -proc update*(this:BenchmarkController):Response = - var countNum:int - try: - countNum = this.request.params["queries"].parseInt() - except: - countNum = 1 - - if countNum < 1: - countNum = 1 - elif countNum > 500: - countNum = 500 - - var response = newJArray() - transaction: - for _ in 1..countNum: - let i = rand(1..10000) - let newRandomNumber = rand(1..10000) - discard RDB().table("world").find(i) - RDB().table("world").where("id", "=", i).update(%*{"randomNumber": newRandomNumber}) - response.add(%*{"id":i, "randomNumber": newRandomNumber}) - return render(response) diff --git a/frameworks/Nim/basolato/app/http/controllers/benchmark_controller.nim b/frameworks/Nim/basolato/app/http/controllers/benchmark_controller.nim new file mode 100644 index 00000000000..fefbc0644dd --- /dev/null +++ b/frameworks/Nim/basolato/app/http/controllers/benchmark_controller.nim @@ -0,0 +1,102 @@ +import std/algorithm +import std/json +import std/random +import std/strutils +import std/sequtils +# framework +import basolato/controller +# databse +import db_connector/db_postgres +import allographer/query_builder +import ../../../config/database +# model +import ../../models/fortune +# view +import ../views/pages/fortune_scf_view + + +const range1_10000 = 1..10000 +let getFirstPrepare = stdRdb.prepare("getFirst", sql""" SELECT * FROM "World" WHERE id = $1 LIMIT 1 """, 1) +let getFortunePrepare = stdRdb.prepare("getFortunes", sql""" SELECT * FROM "Fortune" ORDER BY message ASC """, 0) + + +proc plaintext*(context:Context, params:Params):Future[Response] {.async.} = + let headers = newHttpHeaders() + headers.add("Content-Type", "text/plain; charset=UTF-8") + return render("Hello, World!", headers) + + +proc json*(context:Context, params:Params):Future[Response] {.async.} = + return render(%*{"message":"Hello, World!"}) + + +proc db*(context:Context, params:Params):Future[Response] {.async.} = + let i = rand(1..10000) + let res = stdRdb.getRow(getFirstPrepare, i) + return render(%*{"id": res[0].parseInt, "randomNumber": res[1].parseInt}) + + +proc query*(context:Context, params:Params):Future[Response] {.async.} = + var countNum = + try: + params.getInt("queries") + except: + 1 + if countNum < 1: + countNum = 1 + elif countNum > 500: + countNum = 500 + + var resp:seq[Row] + for i in 1..countNum: + let n = rand(range1_10000) + resp.add(stdRdb.getRow(getFirstPrepare, n)) + + let response = resp.map( + proc(x:Row):JsonNode = + %*{"id": x[0].parseInt, "randomNumber": x[1].parseInt} + ) + return render(%response) + + +proc fortune*(context:Context, params:Params):Future[Response] {.async.} = + let results = stdRdb.getAllRows(getFortunePrepare) + var rows = results.map( + proc(x:seq[string]):Fortune = + return Fortune(id: x[0].parseInt, message: x[1]) + ) + rows.add( + Fortune( + id: 0, + message: "Additional fortune added at request time." + ) + ) + rows = rows.sortedByIt(it.message) + return render(fortuneScfView(rows).await) + + +proc update*(context:Context, params:Params):Future[Response] {.async.} = + var countNum = + try: + params.getInt("queries") + except: + 1 + if countNum < 1: + countNum = 1 + elif countNum > 500: + countNum = 500 + + var response = newSeq[JsonNode](countNum) + var futures = newSeq[Future[void]](countNum) + for i in 1..countNum: + let index = rand(range1_10000) + let number = rand(range1_10000) + response[i-1] = %*{"id": index, "randomNumber": number} + futures[i-1] = ( + proc():Future[void] {.async.} = + discard stdRdb.getRow(getFirstPrepare, i) + rdb.raw(""" UPDATE "World" SET "randomnumber" = ? WHERE id = ? """, %*[number, index]).exec() + )() + all(futures).await + + return render(%response) diff --git a/frameworks/Nim/basolato/app/http/views/pages/fortune_scf_view.nim b/frameworks/Nim/basolato/app/http/views/pages/fortune_scf_view.nim new file mode 100644 index 00000000000..7f4dc2b4552 --- /dev/null +++ b/frameworks/Nim/basolato/app/http/views/pages/fortune_scf_view.nim @@ -0,0 +1,29 @@ +#? stdtmpl(toString="toString") | standard +#import std/asyncdispatch +#import basolato/view +#import ../../../models/fortune +#proc fortuneScfView*(rows:seq[Fortune]):Future[Component] {.async.} = +# result = Component.new() + + + + + Fortunes + + + + + + + + + #for row in rows: + + + + + #end for +
idmessage
${row.id}${row.message}
+ + + diff --git a/frameworks/Nim/basolato/app/middlewares/framework_middleware.nim b/frameworks/Nim/basolato/app/middlewares/framework_middleware.nim deleted file mode 100644 index 9d6c527fc3c..00000000000 --- a/frameworks/Nim/basolato/app/middlewares/framework_middleware.nim +++ /dev/null @@ -1,11 +0,0 @@ -import re -import basolato/middleware -import basolato/routing -from custom_headers_middleware import corsHeader - -template framework*() = - if request.path.match(re"^(?!.*\.).*$"): - checkCsrfToken(request).catch() - checkAuthToken(request).catch(ErrorAuthRedirect, "/login") - if request.reqMethod == HttpOptions: - route(render(""), [corsHeader()]) diff --git a/frameworks/Nim/basolato/app/models/fortune.nim b/frameworks/Nim/basolato/app/models/fortune.nim new file mode 100644 index 00000000000..33cb0950a31 --- /dev/null +++ b/frameworks/Nim/basolato/app/models/fortune.nim @@ -0,0 +1,3 @@ +type Fortune* = object + id*:int + message*:string diff --git a/frameworks/Nim/basolato/basolato.dockerfile b/frameworks/Nim/basolato/basolato.dockerfile index 495c1766dbc..1e2baf2a0c9 100644 --- a/frameworks/Nim/basolato/basolato.dockerfile +++ b/frameworks/Nim/basolato/basolato.dockerfile @@ -1,27 +1,73 @@ -FROM nimlang/nim:alpine +FROM ubuntu:22.04 AS build -ENV PATH $PATH:/root/.nimble/bin +# prevent timezone dialogue +ENV DEBIAN_FRONTEND=noninteractive -RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories -RUN apk update && \ - apk upgrade --no-cache && \ - apk add --no-cache \ - openssh-client \ +RUN apt update && \ + apt upgrade -y +RUN apt install -y --fix-missing \ + gcc \ + xz-utils \ ca-certificates \ - openssl \ - pcre \ - bsd-compat-headers \ - lcov \ - sqlite mariadb-dev libpq && \ - rm /usr/lib/mysqld* -fr && rm /usr/bin/mysql* -fr && \ - update-ca-certificates + curl \ + git + +ARG VERSION="2.0.2" +WORKDIR /root +RUN curl https://nim-lang.org/choosenim/init.sh -o init.sh +RUN sh init.sh -y +RUN rm -f init.sh +ENV PATH $PATH:/root/.nimble/bin +RUN choosenim ${VERSION} + +ENV PATH $PATH:/root/.nimble/bin ADD ./ /basolato WORKDIR /basolato RUN nimble install -y -RUN ducere build +RUN ducere build -p:8080 -o:speed + + +FROM ubuntu:22.04 AS runtime + +# prevent timezone dialogue +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && \ + apt upgrade -y +RUN apt install -y --fix-missing \ + xz-utils \ + ca-certificates \ + libpq-dev + +WORKDIR /basolato +COPY --from=build /basolato/main . +RUN chmod 111 main +COPY --from=build /basolato/startServer.sh . +RUN chmod 111 startServer.sh + + +# Secret +ENV SECRET_KEY="pZWEVzA7h2FcKLgVM3ec5Eiik7eU9Ehpf0uLdYOZDgr0uZKIo5LdQE9sjIub3IDkUTrf3X2Jsh1Uw8b02GtAfWRn4C9NptfdSyoK" +# DB Connection +ENV DB_DATABASE="hello_world" +ENV DB_USER="benchmarkdbuser" +ENV DB_PASSWORD="benchmarkdbpass" +ENV DB_HOST="tfb-database" +ENV DB_PORT=5432 +ENV DB_MAX_CONNECTION=2000 +ENV DB_TIMEOUT=30 +# Logging +ENV LOG_IS_DISPLAY=false +ENV LOG_IS_FILE=false +ENV LOG_IS_ERROR_FILE=false +# Session db +# Session type, file or redis, is defined in config.nims +ENV SESSION_TIME=20160 +ENV LOCALE=en + EXPOSE 8080 -CMD ./main +CMD ./startServer.sh diff --git a/frameworks/Nim/basolato/basolato.nimble b/frameworks/Nim/basolato/basolato.nimble new file mode 100644 index 00000000000..34274ee7b07 --- /dev/null +++ b/frameworks/Nim/basolato/basolato.nimble @@ -0,0 +1,22 @@ +# Package +version = "0.1.0" +author = "Anonymous" +description = "A new awesome basolato package" +license = "MIT" +srcDir = "." +bin = @["main"] +backend = "c" + +# Dependencies +requires "nim >= 2.0.0" +requires "https://github.com/itsumura-h/nim-basolato == 0.15.0" +requires "allographer == 0.29.1" +requires "interface_implements >= 0.2.2" +requires "bcrypt >= 0.2.1" +requires "cligen >= 1.5.9" +requires "redis >= 0.3.0" +requires "sass >= 0.1.0" + +task test, "run testament": + echo staticExec("testament p \"./tests/test_*.nim\"") + discard staticExec("find tests/ -type f ! -name \"*.*\" -delete 2> /dev/null") diff --git a/frameworks/Nim/basolato/benchmark_config.json b/frameworks/Nim/basolato/benchmark_config.json index 76b42b1c2dd..1bb2d11484e 100755 --- a/frameworks/Nim/basolato/benchmark_config.json +++ b/frameworks/Nim/basolato/benchmark_config.json @@ -7,8 +7,8 @@ "plaintext_url": "/plaintext", "db_url": "/db", "query_url": "/queries?queries=", - "fortune_url": "/fortunes", "update_url": "/updates?queries=", + "fortune_url": "/fortunes", "port": 8080, "approach": "Realistic", "classification": "Fullstack", @@ -17,14 +17,13 @@ "language": "Nim", "flavor": "None", "orm": "Full", - "platform": "httpbeast", + "platform": "asynchttpserver", "webserver": "None", "os": "Linux", "database_os": "Linux", "display_name": "Basolato", "notes": "", - "versus": "jester", - "tags": ["broken"] + "versus": "httpbeast, prologue" } } ] diff --git a/frameworks/Nim/basolato/config.nims b/frameworks/Nim/basolato/config.nims index 1df9e31ff0d..17fb53724ab 100644 --- a/frameworks/Nim/basolato/config.nims +++ b/frameworks/Nim/basolato/config.nims @@ -1,20 +1,9 @@ -import os - -# DB Connection -putEnv("DB_DRIVER", "postgres") -putEnv("DB_CONNECTION", "tfb-database:5432") -putEnv("DB_USER", "benchmarkdbuser") -putEnv("DB_PASSWORD", "benchmarkdbpass") -putEnv("DB_DATABASE", "hello_world") - -# Logging -putEnv("LOG_IS_DISPLAY", "false") -putEnv("LOG_IS_FILE", "false") -putEnv("LOG_DIR", "/basolato/logs") - -# Security -putEnv("SECRET_KEY", "1p>G= 1.2.4" -requires "https://github.com/itsumura-h/nim-basolato >= 0.5.5" -requires "httpbeast >= 0.2.2" -requires "cligen >= 0.9.41" -requires "templates >= 0.5" -requires "bcrypt >= 0.2.1" -requires "nimAES >= 0.1.2" -requires "flatdb >= 0.2.4" -requires "allographer >= 0.9.0" -requires "faker >= 0.12.1" diff --git a/frameworks/Nim/basolato/resources/pages/fortune_view.nim b/frameworks/Nim/basolato/resources/pages/fortune_view.nim deleted file mode 100644 index 0e1c3b3df2b..00000000000 --- a/frameworks/Nim/basolato/resources/pages/fortune_view.nim +++ /dev/null @@ -1,32 +0,0 @@ -import json -import basolato/view - -proc impl(title:string, data:seq[JsonNode]):string = tmpli html""" - - - - - $title - - - - - - - - - $for row in data{ - - - - - } -
idmessage
$(row["id"].get)$(row["message"].get)
- - - -""" - -proc fortuneView*(this:View, data=newSeq[JsonNode]()):string = - let title = "Fortunes" - return impl(title, data) diff --git a/frameworks/OCaml/httpaf/dune b/frameworks/OCaml/httpaf/dune index cf1034755fc..53113e9c4fa 100644 --- a/frameworks/OCaml/httpaf/dune +++ b/frameworks/OCaml/httpaf/dune @@ -1,3 +1,3 @@ (executable (name httpaf_unix) - (libraries httpaf httpaf-lwt-unix lwt lwt.unix yojson)) + (libraries httpaf httpaf-lwt-unix lwt lwt.unix yojson unix)) diff --git a/frameworks/OCaml/httpaf/dune-project b/frameworks/OCaml/httpaf/dune-project index 45acd3f0884..f8af889136b 100644 --- a/frameworks/OCaml/httpaf/dune-project +++ b/frameworks/OCaml/httpaf/dune-project @@ -1 +1 @@ -(lang dune 2.7) +(lang dune 3.9) diff --git a/frameworks/OCaml/httpaf/httpaf.dockerfile b/frameworks/OCaml/httpaf/httpaf.dockerfile index 6ed2757d48a..4921ba7d828 100644 --- a/frameworks/OCaml/httpaf/httpaf.dockerfile +++ b/frameworks/OCaml/httpaf/httpaf.dockerfile @@ -2,7 +2,7 @@ # https://github.com/rbjorklin/techempower-ocaml-image # Use pre-built image with all dependencies for faster test times -FROM rbjorklin/techempower-ocaml-image:4.14.1-4bf86567 +FROM rbjorklin/techempower-ocaml-image:5.1.1-b58c72ee # https://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html # https://linux.die.net/man/1/ocamlrun diff --git a/frameworks/OCaml/httpaf/httpaf_unix.ml b/frameworks/OCaml/httpaf/httpaf_unix.ml index 44aa15693d0..9fba87e2f61 100644 --- a/frameworks/OCaml/httpaf/httpaf_unix.ml +++ b/frameworks/OCaml/httpaf/httpaf_unix.ml @@ -170,7 +170,7 @@ let main () = accept_loop socket handler); let forever, _ = Lwt.wait () in Lwt_main.run forever; - exit 0 ) + exit 0) done; while true do diff --git a/frameworks/OCaml/webmachine/src/dune-project b/frameworks/OCaml/webmachine/src/dune-project index 661d1e52345..51333bb4e2c 100644 --- a/frameworks/OCaml/webmachine/src/dune-project +++ b/frameworks/OCaml/webmachine/src/dune-project @@ -1,4 +1,4 @@ -(lang dune 2.7) +(lang dune 3.9) (name webmachine-tfb) (generate_opam_files true) diff --git a/frameworks/OCaml/webmachine/src/lib.opam b/frameworks/OCaml/webmachine/src/lib.opam index 33e1ae6314d..30749f8a281 100644 --- a/frameworks/OCaml/webmachine/src/lib.opam +++ b/frameworks/OCaml/webmachine/src/lib.opam @@ -6,7 +6,7 @@ license: "MIT" homepage: "https://github.com/TechEmpower/FrameworkBenchmarks" bug-reports: "https://github.com/TechEmpower/FrameworkBenchmarks/issues" depends: [ - "dune" {>= "2.7" & >= "2.8.5"} + "dune" {>= "3.9" & >= "2.8.5"} "biniou" {>= "1.2.1"} "yojson" {>= "1.7.0"} "atd" {>= "2.2.1"} diff --git a/frameworks/OCaml/webmachine/src/src/bin/dune b/frameworks/OCaml/webmachine/src/src/bin/dune index ccf1f4dfeea..bd8333f4c19 100644 --- a/frameworks/OCaml/webmachine/src/src/bin/dune +++ b/frameworks/OCaml/webmachine/src/src/bin/dune @@ -1,5 +1,5 @@ (executable - (libraries webmachine lwt cohttp-lwt-unix caqti caqti-lwt caqti-driver-postgresql yojson atdgen-runtime lib) + (libraries webmachine lwt cohttp-lwt-unix caqti caqti-lwt caqti-driver-postgresql yojson atdgen-runtime lib unix) (preprocess (pps lwt_ppx)) (public_name tfb) (package tfb) diff --git a/frameworks/OCaml/webmachine/src/src/bin/tfb.ml b/frameworks/OCaml/webmachine/src/src/bin/tfb.ml index 4cdd891a077..62ec6626ff1 100644 --- a/frameworks/OCaml/webmachine/src/src/bin/tfb.ml +++ b/frameworks/OCaml/webmachine/src/src/bin/tfb.ml @@ -39,14 +39,13 @@ let or_error m = Error (Database_error (Caqti_error.show err)) |> Lwt.return let select_random = - Caqti_request.find Caqti_type.int - Caqti_type.(tup2 int int) + let open Caqti_request.Infix in + Caqti_type.(int ->! tup2 int int) "SELECT id, randomNumber FROM World WHERE id = $1" class hello = object (self) inherit [Cohttp_lwt.Body.t] Wm.resource - method! allowed_methods rd = Wm.continue [ `GET ] rd method content_types_provided rd = @@ -68,7 +67,6 @@ class hello = class db = object (self) inherit [Cohttp_lwt.Body.t] Wm.resource - method! allowed_methods rd = Wm.continue [ `GET ] rd method content_types_provided rd = @@ -228,7 +226,7 @@ let main () = Lwt.async (fun () -> Server.create ~mode:(`TCP (`Socket socket)) config); let forever, _ = Lwt.wait () in Lwt_main.run forever; - exit 0 ) + exit 0) done; while true do Unix.pause () diff --git a/frameworks/OCaml/webmachine/src/src/lib/dune b/frameworks/OCaml/webmachine/src/src/lib/dune index b67e786ee29..a9ced8d93a2 100644 --- a/frameworks/OCaml/webmachine/src/src/lib/dune +++ b/frameworks/OCaml/webmachine/src/src/lib/dune @@ -1,7 +1,7 @@ (library (name lib) (public_name lib) - (libraries yojson atdgen-runtime) + (libraries yojson atdgen-runtime unix) (preprocess (pps lwt_ppx))) (rule diff --git a/frameworks/OCaml/webmachine/src/tfb.opam b/frameworks/OCaml/webmachine/src/tfb.opam index d587a0d7eba..ebbb400201e 100644 --- a/frameworks/OCaml/webmachine/src/tfb.opam +++ b/frameworks/OCaml/webmachine/src/tfb.opam @@ -6,7 +6,7 @@ license: "MIT" homepage: "https://github.com/TechEmpower/FrameworkBenchmarks" bug-reports: "https://github.com/TechEmpower/FrameworkBenchmarks/issues" depends: [ - "dune" {>= "2.7" & >= "2.8.5"} + "dune" {>= "3.9" & >= "2.8.5"} "webmachine" {>= "0.7.0"} "lwt" {>= "5.4.1"} "conf-libev" {>= "4-12"} diff --git a/frameworks/OCaml/webmachine/webmachine.dockerfile b/frameworks/OCaml/webmachine/webmachine.dockerfile index b0059706392..ab3f373c8c4 100644 --- a/frameworks/OCaml/webmachine/webmachine.dockerfile +++ b/frameworks/OCaml/webmachine/webmachine.dockerfile @@ -1,6 +1,6 @@ # https://github.com/rbjorklin/techempower-ocaml-image # Use pre-built image with all dependencies for faster test times -FROM rbjorklin/techempower-ocaml-image:4.14.1-4bf86567 +FROM rbjorklin/techempower-ocaml-image:5.1.1-b58c72ee ENV DIR project diff --git a/frameworks/PHP/amp/amp.dockerfile b/frameworks/PHP/amp/amp.dockerfile index 08058b50d22..1c164b024cf 100644 --- a/frameworks/PHP/amp/amp.dockerfile +++ b/frameworks/PHP/amp/amp.dockerfile @@ -6,24 +6,24 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq git unzip wget curl build-essential \ - php8.2-cli php8.2-mbstring php8.2-dev php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-mbstring php8.3-dev php8.3-xml php8.3-curl > /dev/null # An extension is required! # We deal with concurrencies over 1k, which stream_select doesn't support. RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar #RUN apt-get install -y libuv1-dev > /dev/null RUN apt-get install -y libevent-dev > /dev/null -#RUN pecl install uv-0.2.4 > /dev/null && echo "extension=uv.so" > /etc/php/8.2/cli/conf.d/uv.ini -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +#RUN pecl install uv-0.2.4 > /dev/null && echo "extension=uv.so" > /etc/php/8.3/cli/conf.d/uv.ini +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini ADD ./ /amp WORKDIR /amp -COPY deploy/conf/* /etc/php/8.2/cli/conf.d/ +COPY deploy/conf/* /etc/php/8.3/cli/conf.d/ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet +RUN composer install --prefer-dist --optimize-autoloader --no-dev EXPOSE 8080 diff --git a/frameworks/PHP/cakephp/cakephp-workerman.dockerfile b/frameworks/PHP/cakephp/cakephp-workerman.dockerfile index 2495405d240..0339af783c9 100644 --- a/frameworks/PHP/cakephp/cakephp-workerman.dockerfile +++ b/frameworks/PHP/cakephp/cakephp-workerman.dockerfile @@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq git unzip \ - php8.2-cli php8.2-mysql php8.2-mbstring php8.2-intl php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-mysql php8.3-mbstring php8.3-intl php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini EXPOSE 8080 @@ -24,7 +24,9 @@ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev -- RUN chmod -R 777 /cakephp -#COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +#ENV XDEBUG_CONFIG="remote_host=$(ipconfig getifaddr en0)" +ENV XDEBUG_SESSION=xdebug_is_great +#COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini CMD php -c deploy/conf/cli-php.ini \ server.php start diff --git a/frameworks/PHP/cakephp/cakephp.dockerfile b/frameworks/PHP/cakephp/cakephp.dockerfile index 80251987428..438d467b820 100644 --- a/frameworks/PHP/cakephp/cakephp.dockerfile +++ b/frameworks/PHP/cakephp/cakephp.dockerfile @@ -7,22 +7,22 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2-fpm php8.2-mysql php8.2-xml php8.2-mbstring php8.2-intl php8.2-dev php8.2-curl > /dev/null + php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-intl php8.3-dev php8.3-curl php-xdebug > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ -COPY deploy/conf/* /etc/php/8.2/cli/ +COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.3/cli/ ADD ./ /cakephp WORKDIR /cakephp -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; -RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet +RUN composer install --optimize-autoloader --classmap-authoritative --no-dev RUN chmod -R 777 /cakephp -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /cakephp/deploy/nginx.conf diff --git a/frameworks/PHP/codeigniter/codeigniter.dockerfile b/frameworks/PHP/codeigniter/codeigniter.dockerfile index ace1114fc92..e04cf572ab6 100644 --- a/frameworks/PHP/codeigniter/codeigniter.dockerfile +++ b/frameworks/PHP/codeigniter/codeigniter.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get update > /dev/null && apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-intl php8.2-curl > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-intl php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /codeigniter WORKDIR /codeigniter -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev #--quiet @@ -25,5 +25,5 @@ RUN chmod -R 777 writable EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /codeigniter/deploy/nginx.conf diff --git a/frameworks/PHP/comet/comet-mysql.dockerfile b/frameworks/PHP/comet/comet-mysql.dockerfile index 324b2a7ba46..9d694c24d99 100644 --- a/frameworks/PHP/comet/comet-mysql.dockerfile +++ b/frameworks/PHP/comet/comet-mysql.dockerfile @@ -6,14 +6,14 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.1-cli php8.1-xml php8.1-mysql php8.1-mbstring > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-xml php8.3-mysql php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/8.1/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /comet WORKDIR /comet diff --git a/frameworks/PHP/comet/comet.dockerfile b/frameworks/PHP/comet/comet.dockerfile index 1eec2fdd414..545a4abcaba 100644 --- a/frameworks/PHP/comet/comet.dockerfile +++ b/frameworks/PHP/comet/comet.dockerfile @@ -6,14 +6,14 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.1-cli php8.1-pgsql php8.1-xml php8.1-mbstring > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/8.1/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /comet WORKDIR /comet diff --git a/frameworks/PHP/duckphp/duckphp.dockerfile b/frameworks/PHP/duckphp/duckphp.dockerfile index ee95b8e1e2b..f81fcdb546f 100644 --- a/frameworks/PHP/duckphp/duckphp.dockerfile +++ b/frameworks/PHP/duckphp/duckphp.dockerfile @@ -6,18 +6,18 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /duckphp WORKDIR /duckphp -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /duckphp/deploy/nginx.conf diff --git a/frameworks/PHP/fat-free/deploy/conf/php.ini b/frameworks/PHP/fat-free/deploy/conf/php.ini index d2e924cf326..82133535145 100644 --- a/frameworks/PHP/fat-free/deploy/conf/php.ini +++ b/frameworks/PHP/fat-free/deploy/conf/php.ini @@ -1909,6 +1909,9 @@ opcache.huge_code_pages=1 ; SSL stream context option. ;openssl.capath= +opcache.jit_buffer_size = 128M +opcache.jit = tracing + ; Local Variables: ; tab-width: 4 ; End: \ No newline at end of file diff --git a/frameworks/PHP/fat-free/fat-free-raw.dockerfile b/frameworks/PHP/fat-free/fat-free-raw.dockerfile index 29ae8ba95a3..799ab3ccf3c 100644 --- a/frameworks/PHP/fat-free/fat-free-raw.dockerfile +++ b/frameworks/PHP/fat-free/fat-free-raw.dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.1 php8.1-common php8.1-cli php8.1-fpm php8.1-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.1/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /fat-free WORKDIR /fat-free @@ -18,11 +18,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /fat-free EXPOSE 8080 -CMD service php8.1-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /fat-free/deploy/nginx.conf diff --git a/frameworks/PHP/fat-free/fat-free.dockerfile b/frameworks/PHP/fat-free/fat-free.dockerfile index 8d75cb82cf3..a6df3aca401 100644 --- a/frameworks/PHP/fat-free/fat-free.dockerfile +++ b/frameworks/PHP/fat-free/fat-free.dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.1 php8.1-common php8.1-cli php8.1-fpm php8.1-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.1/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /fat-free WORKDIR /fat-free @@ -18,13 +18,12 @@ ENV F3DIR="/fat-free/src" COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -#RUN git clone -b 3.7.2 --single-branch --depth 1 "https://github.com/bcosca/fatfree-core.git" src -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /fat-free EXPOSE 8080 -CMD service php8.1-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /fat-free/deploy/nginx.conf diff --git a/frameworks/PHP/flight/flight.dockerfile b/frameworks/PHP/flight/flight.dockerfile index 47a6e9ff6d1..07dbf7670c9 100644 --- a/frameworks/PHP/flight/flight.dockerfile +++ b/frameworks/PHP/flight/flight.dockerfile @@ -5,9 +5,9 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /flight WORKDIR /flight @@ -18,11 +18,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /flight EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /flight/deploy/nginx.conf diff --git a/frameworks/PHP/imi/composer.json b/frameworks/PHP/imi/composer.json index bc3795f0d07..c77718182cf 100644 --- a/frameworks/PHP/imi/composer.json +++ b/frameworks/PHP/imi/composer.json @@ -1,7 +1,7 @@ { "require": { - "imiphp/imi": "~2.1.0", - "imiphp/imi-pgsql": "~2.1.0" + "imiphp/imi": "~2.1", + "imiphp/imi-pgsql": "~2.1" }, "autoload": { "psr-4" : { diff --git a/frameworks/PHP/imi/imi-swoole.dockerfile b/frameworks/PHP/imi/imi-swoole.dockerfile index 11704d8ed3f..2cc80f2b982 100644 --- a/frameworks/PHP/imi/imi-swoole.dockerfile +++ b/frameworks/PHP/imi/imi-swoole.dockerfile @@ -1,6 +1,6 @@ -FROM php:8.2-cli +FROM php:8.3-cli -ENV SWOOLE_VERSION 5.1.0 +ENV SWOOLE_VERSION 5.1.1 ARG TFB_TEST_DATABASE ENV TFB_TEST_DATABASE=${TFB_TEST_DATABASE} @@ -22,7 +22,7 @@ RUN chmod -R ug+rwx /imi/.runtime WORKDIR /imi -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet RUN composer require imiphp/imi-swoole:~2.1.0 -W RUN composer dumpautoload -o diff --git a/frameworks/PHP/imi/imi-workerman.dockerfile b/frameworks/PHP/imi/imi-workerman.dockerfile index 55f5cbfa592..306a2512a82 100644 --- a/frameworks/PHP/imi/imi-workerman.dockerfile +++ b/frameworks/PHP/imi/imi-workerman.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli ARG TFB_TEST_DATABASE ENV TFB_TEST_DATABASE=${TFB_TEST_DATABASE} @@ -21,7 +21,7 @@ RUN chmod -R ug+rwx /imi/.runtime WORKDIR /imi -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet RUN composer require imiphp/imi-workerman:~2.1.0 -W RUN composer dumpautoload -o diff --git a/frameworks/PHP/kumbiaphp/bench/app/controllers/ku_controller.php b/frameworks/PHP/kumbiaphp/bench/app/controllers/ku_controller.php index 0c545d23794..d5b09ead00f 100644 --- a/frameworks/PHP/kumbiaphp/bench/app/controllers/ku_controller.php +++ b/frameworks/PHP/kumbiaphp/bench/app/controllers/ku_controller.php @@ -1,14 +1,12 @@ execute([mt_rand(1, 10000)]); - $worlds[] = KuRaw::$random->fetch(); + $random->execute([mt_rand(1, 10000)]); + $worlds[] = $random->fetch(); } echo json_encode($worlds); } @@ -31,11 +30,12 @@ public function query($count = 1) public function update($count = 1) { $count = min(max((int) $count, 1), 500); + $random = KuRaw::$random; while ($count--) { - KuRaw::$random->execute([mt_rand(1, 10000)]); - $row = KuRaw::$random->fetch(); + $random->execute([mt_rand(1, 10000)]); + $row = $random->fetch(); $row['randomNumber'] = mt_rand(1, 10000); $worlds[] = $row; diff --git a/frameworks/PHP/kumbiaphp/bench/app/models/fortune.php b/frameworks/PHP/kumbiaphp/bench/app/models/fortune.php index 32f718d75f8..3785ee53908 100644 --- a/frameworks/PHP/kumbiaphp/bench/app/models/fortune.php +++ b/frameworks/PHP/kumbiaphp/bench/app/models/fortune.php @@ -1,5 +1,6 @@ /dev/null -RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip \ - php8.1-fpm php8.1-mysql php8.1-dev > /dev/null +RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ + apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -COPY deploy/conf/* /etc/php/8.1/fpm/ +RUN apt-get install -yqq nginx git unzip \ + php8.3-fpm php8.3-mysql > /dev/null + +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /kumbiaphp WORKDIR /kumbiaphp RUN git clone -b v1.1.4 --single-branch --depth 1 -q https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; EXPOSE 8080 -CMD service php8.1-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /kumbiaphp/deploy/nginx.conf diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile index 7fe1f85d92d..47bb53f8086 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile @@ -1,26 +1,27 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null -RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-mysql php8.1-xml > /dev/null +RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ + apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null + +RUN apt-get install -yqq git php8.3-cli php8.3-mysql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cliphp.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/cliphp.ini /etc/php/8.3/cli/php.ini ADD ./ /kumbiaphp WORKDIR /kumbiaphp RUN git clone -b dev --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia -RUN git clone -b master --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord +RUN git clone -b dev --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord -RUN sed -i "s|header(|\\\Workerman\\\Protocols\\\Http::header(|g" bench/app/controllers/*.php +RUN sed -i "s|KuRaw::init(|//KuRaw::init(|g" server.php RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile index dde619cb90b..d5a8ffe7aac 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile @@ -1,29 +1,24 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-pgsql php8.1-xml > /dev/null + apt-get install -yqq git php8.3-cli php8.3-pgsql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cliphp.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/cliphp.ini /etc/php/8.3/cli/php.ini ADD ./ /kumbiaphp WORKDIR /kumbiaphp RUN git clone -b dev --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia -#RUN sed -i "s|header(|\\\Workerman\\\Protocols\\\Http::header(|g" bench/app/controllers/{index,json}_controller.php -RUN sed -i "s|header(|\\\Workerman\\\Protocols\\\Http::header(|g" bench/app/controllers/plaintext_controller.php -RUN sed -i "s|header(|\\\Workerman\\\Protocols\\\Http::header(|g" bench/app/controllers/json_controller.php -RUN sed -i "s|//KuRaw::init(|KuRaw::init(|g" server.php - RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile index 21c130ec0f5..fc54d6192a5 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile @@ -1,14 +1,15 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null -RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip \ - php8.1-fpm php8.1-mysql php8.1-dev > /dev/null +RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ + apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -COPY deploy/conf/* /etc/php/8.1/fpm/ +RUN apt-get install -yqq nginx git unzip \ + php8.3-fpm php8.3-mysql > /dev/null + +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /kumbiaphp WORKDIR /kumbiaphp @@ -16,9 +17,9 @@ WORKDIR /kumbiaphp RUN git clone -b v1.1.4 --single-branch --depth 1 https://github.com/KumbiaPHP/KumbiaPHP.git vendor/Kumbia RUN git clone -b dev --single-branch --depth 1 https://github.com/KumbiaPHP/ActiveRecord.git vendor/Kumbia/ActiveRecord -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; EXPOSE 8080 -CMD service php8.1-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /kumbiaphp/deploy/nginx.conf diff --git a/frameworks/PHP/kumbiaphp/server.php b/frameworks/PHP/kumbiaphp/server.php index 17413d0c7a1..3ec60d615fa 100644 --- a/frameworks/PHP/kumbiaphp/server.php +++ b/frameworks/PHP/kumbiaphp/server.php @@ -2,14 +2,18 @@ require_once __DIR__.'/vendor/autoload.php'; require_once __DIR__.'/bench/app/workerbootstrap.php'; +use Adapterman\Adapterman; use Workerman\Worker; -$http_worker = new Worker('http://0.0.0.0:8080'); -$http_worker->count = (int) shell_exec('nproc') * 4; -$http_worker->onWorkerStart = static function () { +Adapterman::init(); + +$http_worker = new Worker('http://0.0.0.0:8080'); +$http_worker->count = (int) shell_exec('nproc') * 4; +$http_worker->name = 'KumbiaPHP'; +$http_worker->onWorkerStart = static function () { kumbiaInit(); - //KuRaw::init(); + KuRaw::init(); }; $http_worker->onMessage = static function ($connection) { diff --git a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile index 4ff73d7911d..4cce4090f3d 100644 --- a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile +++ b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/laravel/laravel-roadrunner.dockerfile b/frameworks/PHP/laravel/laravel-roadrunner.dockerfile index 37e5c11b9d0..8aa87522504 100644 --- a/frameworks/PHP/laravel/laravel-roadrunner.dockerfile +++ b/frameworks/PHP/laravel/laravel-roadrunner.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN docker-php-ext-install pdo_mysql pcntl opcache sockets > /dev/null diff --git a/frameworks/PHP/laravel/laravel-swoole.dockerfile b/frameworks/PHP/laravel/laravel-swoole.dockerfile index 5cbef757cd0..77cfef19fe0 100644 --- a/frameworks/PHP/laravel/laravel-swoole.dockerfile +++ b/frameworks/PHP/laravel/laravel-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/laravel/laravel-workerman.dockerfile b/frameworks/PHP/laravel/laravel-workerman.dockerfile index 605d2a1afc2..016c3d0d9a7 100644 --- a/frameworks/PHP/laravel/laravel-workerman.dockerfile +++ b/frameworks/PHP/laravel/laravel-workerman.dockerfile @@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq git unzip \ - php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini ADD ./ /laravel WORKDIR /laravel @@ -26,6 +26,6 @@ COPY deploy/workerman/composer.json ./ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet RUN php artisan optimize -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini CMD php server-man.php start diff --git a/frameworks/PHP/laravel/laravel.dockerfile b/frameworks/PHP/laravel/laravel.dockerfile index 616f4dac552..c1858216a66 100644 --- a/frameworks/PHP/laravel/laravel.dockerfile +++ b/frameworks/PHP/laravel/laravel.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml php8.2-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /laravel WORKDIR /laravel -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN mkdir -p /laravel/bootstrap/cache /laravel/storage/logs /laravel/storage/framework/sessions /laravel/storage/framework/views /laravel/storage/framework/cache RUN chmod -R 777 /laravel @@ -27,8 +27,8 @@ RUN php artisan optimize EXPOSE 8080 # Uncomment next line for Laravel console error logging to be viewable in docker logs -# RUN echo "catch_workers_output = yes" >> /etc/php/8.2/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD /usr/sbin/php-fpm8.2 --fpm-config /etc/php/8.2/fpm/php-fpm.conf && \ +CMD /usr/sbin/php-fpm8.3 --fpm-config /etc/php/8.3/fpm/php-fpm.conf && \ nginx -c /laravel/deploy/nginx.conf diff --git a/frameworks/PHP/leaf/index.php b/frameworks/PHP/leaf/index.php index 9848de6bd73..197c6c82191 100644 --- a/frameworks/PHP/leaf/index.php +++ b/frameworks/PHP/leaf/index.php @@ -2,13 +2,10 @@ require __DIR__.'/vendor/autoload.php'; -app()->get("/plaintext", function () { - response()->plain('Hello, World!'); -}); +app()->get("/plaintext", fn() => response()->plain('Hello, World!')); + +app()->get('/json', fn() => response()->json(['message' => 'Hello, World!'])); -app()->get('/json', function () { - response()->json(['message' => 'Hello, World!']); -}); app()->run(); // commented with workerman diff --git a/frameworks/PHP/leaf/leaf-workerman.dockerfile b/frameworks/PHP/leaf/leaf-workerman.dockerfile index 12ac67bf00e..80f9248d07a 100644 --- a/frameworks/PHP/leaf/leaf-workerman.dockerfile +++ b/frameworks/PHP/leaf/leaf-workerman.dockerfile @@ -7,14 +7,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get update -yqq > /dev/null && apt-get install -yqq git \ - php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini ADD ./ /leaf WORKDIR /leaf diff --git a/frameworks/PHP/leaf/leaf.dockerfile b/frameworks/PHP/leaf/leaf.dockerfile index 679d4bb6004..167a5af7039 100644 --- a/frameworks/PHP/leaf/leaf.dockerfile +++ b/frameworks/PHP/leaf/leaf.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-xml php8.2-curl > /dev/null + php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /leaf WORKDIR /leaf -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -24,5 +24,5 @@ RUN chmod -R 777 /leaf EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /leaf/deploy/nginx.conf diff --git a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile index 814556e4f79..a8a0aebd68a 100644 --- a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile +++ b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/lumen/lumen-swoole.dockerfile b/frameworks/PHP/lumen/lumen-swoole.dockerfile index abf5e8b0815..3e4c866c031 100644 --- a/frameworks/PHP/lumen/lumen-swoole.dockerfile +++ b/frameworks/PHP/lumen/lumen-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/lumen/lumen-workerman.dockerfile b/frameworks/PHP/lumen/lumen-workerman.dockerfile index 721dbb2e32b..bc0f416c759 100644 --- a/frameworks/PHP/lumen/lumen-workerman.dockerfile +++ b/frameworks/PHP/lumen/lumen-workerman.dockerfile @@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml php8.2-dev > /dev/null + php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini ADD ./ /lumen WORKDIR /lumen diff --git a/frameworks/PHP/lumen/lumen.dockerfile b/frameworks/PHP/lumen/lumen.dockerfile index c8bbe761a44..1b5f8a76e62 100644 --- a/frameworks/PHP/lumen/lumen.dockerfile +++ b/frameworks/PHP/lumen/lumen.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml php8.2-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /lumen WORKDIR /lumen -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -29,5 +29,5 @@ RUN chmod -R 777 /lumen EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /lumen/deploy/nginx.conf diff --git a/frameworks/PHP/mako/mako.dockerfile b/frameworks/PHP/mako/mako.dockerfile index 8445c793103..07010604204 100644 --- a/frameworks/PHP/mako/mako.dockerfile +++ b/frameworks/PHP/mako/mako.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /mako WORKDIR /mako -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs --quiet @@ -24,5 +24,5 @@ RUN chmod -R 777 app EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /mako/deploy/nginx.conf diff --git a/frameworks/PHP/mark/mark.dockerfile b/frameworks/PHP/mark/mark.dockerfile index 865e95656ee..3b39a27ef56 100644 --- a/frameworks/PHP/mark/mark.dockerfile +++ b/frameworks/PHP/mark/mark.dockerfile @@ -5,20 +5,20 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq php8.2-cli php8.2-pgsql php8.2-xml > /dev/null + apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/8.2/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /mark WORKDIR /mark RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN sed -i "s|opcache.jit=off|opcache.jit=tracing|g" /etc/php/8.2/cli/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|opcache.jit=tracing|g" /etc/php/8.3/cli/conf.d/10-opcache.ini EXPOSE 8080 diff --git a/frameworks/PHP/mixphp/mixphp-swoole-mysql.dockerfile b/frameworks/PHP/mixphp/mixphp-swoole-mysql.dockerfile index f9ab771ee37..2001b9fde1d 100644 --- a/frameworks/PHP/mixphp/mixphp-swoole-mysql.dockerfile +++ b/frameworks/PHP/mixphp/mixphp-swoole-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && docker-php-ext-enable swoole @@ -18,7 +18,7 @@ RUN php -v && php -i | grep opcache WORKDIR /mixphp -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null RUN composer dumpautoload -o diff --git a/frameworks/PHP/mixphp/mixphp-workerman-mysql.dockerfile b/frameworks/PHP/mixphp/mixphp-workerman-mysql.dockerfile index d2a27876c01..0861a10948d 100644 --- a/frameworks/PHP/mixphp/mixphp-workerman-mysql.dockerfile +++ b/frameworks/PHP/mixphp/mixphp-workerman-mysql.dockerfile @@ -1,21 +1,21 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential php8.1-cli php8.1-mbstring php8.1-curl php8.1-xml php8.1-mysql > /dev/null +RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential php8.3-cli php8.3-mbstring php8.3-curl php8.3-xml php8.3-mysql > /dev/null -RUN apt-get install -y php8.1-dev libevent-dev > /dev/null +RUN apt-get install -y php8.3-dev libevent-dev > /dev/null RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php-jit.ini /etc/php/8.1/cli/php.ini +COPY php-jit.ini /etc/php/8.3/cli/php.ini ADD ./ /mixphp WORKDIR /mixphp -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null RUN composer dumpautoload -o diff --git a/frameworks/PHP/mixphp/mixphp-workerman-pgsql.dockerfile b/frameworks/PHP/mixphp/mixphp-workerman-pgsql.dockerfile index 91a6ef3361a..f469165bf97 100644 --- a/frameworks/PHP/mixphp/mixphp-workerman-pgsql.dockerfile +++ b/frameworks/PHP/mixphp/mixphp-workerman-pgsql.dockerfile @@ -4,20 +4,20 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential php8.2-cli php8.2-mbstring php8.2-curl php8.2-xml php8.2-pgsql > /dev/null +RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential php8.3-cli php8.3-mbstring php8.3-curl php8.3-xml php8.3-pgsql > /dev/null -RUN apt-get install -y php8.2-dev libevent-dev > /dev/null +RUN apt-get install -y php8.3-dev libevent-dev > /dev/null RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php-jit.ini /etc/php/8.2/cli/php.ini +COPY php-jit.ini /etc/php/8.3/cli/php.ini ADD ./ /mixphp WORKDIR /mixphp RUN sed -i "s|Benchmark();|BenchmarkRaw();|g" /mixphp/routes/index.php -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null RUN composer dumpautoload -o diff --git a/frameworks/PHP/mixphp/mixphp.dockerfile b/frameworks/PHP/mixphp/mixphp.dockerfile index 105fa01bc9e..bbc64fd8705 100644 --- a/frameworks/PHP/mixphp/mixphp.dockerfile +++ b/frameworks/PHP/mixphp/mixphp.dockerfile @@ -4,16 +4,16 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential nginx php8.2-fpm php8.2-mysql php8.2-dev > /dev/null +RUN apt-get update -yqq && apt-get install -yqq git unzip wget curl build-essential nginx php8.3-fpm php8.3-mysql php8.3-dev > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; ADD ./ /mixphp WORKDIR /mixphp -RUN curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --no-dev --classmap-authoritative --quiet > /dev/null RUN composer dumpautoload -o @@ -22,5 +22,5 @@ RUN chmod -R 777 /mixphp/runtime/logs EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /mixphp/deploy/nginx.conf diff --git a/frameworks/PHP/nette/nette.dockerfile b/frameworks/PHP/nette/nette.dockerfile index 0d89b8d3929..fc917b9ca49 100644 --- a/frameworks/PHP/nette/nette.dockerfile +++ b/frameworks/PHP/nette/nette.dockerfile @@ -5,9 +5,9 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get install -yqq nginx git unzip \ - php8.2-fpm php8.2-mysql php8.2-xml php8.2-mbstring php8.2-intl php8.2-dev php8.2-curl > /dev/null + php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-intl php8.3-dev php8.3-curl > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /nette WORKDIR /nette @@ -18,11 +18,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /nette EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /nette/deploy/nginx.conf 2>&1 > /dev/stderr diff --git a/frameworks/PHP/openswoole/openswoole-no-async.dockerfile b/frameworks/PHP/openswoole/openswoole-no-async.dockerfile index ddfa2d2da58..98b24e1c497 100644 --- a/frameworks/PHP/openswoole/openswoole-no-async.dockerfile +++ b/frameworks/PHP/openswoole/openswoole-no-async.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN apt-get update && apt-get install -y git > /dev/null diff --git a/frameworks/PHP/openswoole/openswoole-server-mysql.php b/frameworks/PHP/openswoole/openswoole-server-mysql.php index 8c921a3f184..e020600ce87 100644 --- a/frameworks/PHP/openswoole/openswoole-server-mysql.php +++ b/frameworks/PHP/openswoole/openswoole-server-mysql.php @@ -111,7 +111,7 @@ * * @return string */ -$updates_mysql = function (int $queries = 0, $pool): string { +$updates_mysql = function (int $queries, $pool): string { $db = $pool->get(); $query_count = 1; diff --git a/frameworks/PHP/openswoole/openswoole-server-postgres.php b/frameworks/PHP/openswoole/openswoole-server-postgres.php index 31a712ca9ce..107878f3343 100644 --- a/frameworks/PHP/openswoole/openswoole-server-postgres.php +++ b/frameworks/PHP/openswoole/openswoole-server-postgres.php @@ -40,7 +40,7 @@ * * @return string */ -$db_postgres = function (int $queries = 0, $pool): string { +$db_postgres = function (int $queries, $pool): string { $db = $pool->get(); // Read number of queries to run from URL parameter $query_count = 1; @@ -116,7 +116,7 @@ * * @return string */ -$updates_postgres = function (int $queries = 0, $pool): string { +$updates_postgres = function (int $queries, $pool): string { $db = $pool->get(); $query_count = 1; diff --git a/frameworks/PHP/openswoole/openswoole.dockerfile b/frameworks/PHP/openswoole/openswoole.dockerfile index 836b41c3169..f4f57e78a2d 100644 --- a/frameworks/PHP/openswoole/openswoole.dockerfile +++ b/frameworks/PHP/openswoole/openswoole.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN apt-get update && apt-get install -y git > /dev/null diff --git a/frameworks/PHP/peachpie/global.json b/frameworks/PHP/peachpie/global.json index 166cbe6e9b7..ea99fa32bb0 100644 --- a/frameworks/PHP/peachpie/global.json +++ b/frameworks/PHP/peachpie/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "Peachpie.NET.Sdk": "1.0.0-preview5" + "Peachpie.NET.Sdk": "1.0.25" } } \ No newline at end of file diff --git a/frameworks/PHP/peachpie/peachpie.dockerfile b/frameworks/PHP/peachpie/peachpie.dockerfile index d8bd752611f..33a85981245 100644 --- a/frameworks/PHP/peachpie/peachpie.dockerfile +++ b/frameworks/PHP/peachpie/peachpie.dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0.100 AS build +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /app COPY . . RUN dotnet publish -c Release -o out Server diff --git a/frameworks/PHP/phalcon/benchmark_config.json b/frameworks/PHP/phalcon/benchmark_config.json index 127bce79907..810c897643b 100644 --- a/frameworks/PHP/phalcon/benchmark_config.json +++ b/frameworks/PHP/phalcon/benchmark_config.json @@ -42,8 +42,7 @@ "database_os": "Linux", "display_name": "phalcon-mongodb", "notes": "", - "versus": "php", - "tags": ["broken"] + "versus": "php" }, "micro": { "plaintext_url": "/plaintext", diff --git a/frameworks/PHP/phalcon/composer.json b/frameworks/PHP/phalcon/composer.json index f42463f3153..a1ead267232 100644 --- a/frameworks/PHP/phalcon/composer.json +++ b/frameworks/PHP/phalcon/composer.json @@ -1,6 +1,6 @@ { "require": { "mongodb/mongodb": "^1.6", - "phalcon/incubator-mongodb": "^1.0" + "phalcon/incubator-mongodb": "^2.0" } } diff --git a/frameworks/PHP/phalcon/phalcon-micro.dockerfile b/frameworks/PHP/phalcon/phalcon-micro.dockerfile index b7e77e5dc63..31e405d1af6 100644 --- a/frameworks/PHP/phalcon/phalcon-micro.dockerfile +++ b/frameworks/PHP/phalcon/phalcon-micro.dockerfile @@ -6,21 +6,21 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -y php-pear php8.2-dev > /dev/null -RUN mkdir -p /etc/php/8.2/fpm/conf.d -RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.2/fpm/conf.d/phalcon.ini +RUN apt-get install -y php-pear php8.3-dev > /dev/null +RUN mkdir -p /etc/php/8.3/fpm/conf.d +RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /phalcon WORKDIR /phalcon -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs @@ -30,5 +30,5 @@ RUN chmod -R 777 app EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /phalcon/deploy/nginx.conf diff --git a/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile b/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile index 3b176037ba1..e545aa8a4ed 100644 --- a/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile +++ b/frameworks/PHP/phalcon/phalcon-mongodb.dockerfile @@ -6,21 +6,21 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -y php-pear php8.2-dev > /dev/null -RUN mkdir -p /etc/php/8.2/fpm/conf.d -RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.2/fpm/conf.d/phalcon.ini +RUN apt-get install -y php-pear php8.3-dev > /dev/null +RUN mkdir -p /etc/php/8.3/fpm/conf.d +RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mbstring php8.2-xml php8.2-mongodb > /dev/null + php8.3-cli php8.3-fpm php8.3-mbstring php8.3-xml php8.3-mongodb > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /phalcon WORKDIR /phalcon -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --ignore-platform-reqs @@ -30,5 +30,5 @@ RUN chmod -R 777 app EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /phalcon/deploy/nginx.conf diff --git a/frameworks/PHP/phalcon/phalcon.dockerfile b/frameworks/PHP/phalcon/phalcon.dockerfile index d5c07177aa3..b07d5433f5f 100644 --- a/frameworks/PHP/phalcon/phalcon.dockerfile +++ b/frameworks/PHP/phalcon/phalcon.dockerfile @@ -6,21 +6,21 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -y php-pear php8.2-dev > /dev/null -RUN mkdir -p /etc/php/8.2/fpm/conf.d -RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.2/fpm/conf.d/phalcon.ini +RUN apt-get install -y php-pear php8.3-dev > /dev/null +RUN mkdir -p /etc/php/8.3/fpm/conf.d +RUN pecl install phalcon > /dev/null && echo "extension=phalcon.so" > /etc/php/8.3/fpm/conf.d/phalcon.ini RUN apt-get install -yqq nginx git unzip \ - php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /phalcon WORKDIR /phalcon -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --ignore-platform-reqs @@ -28,5 +28,5 @@ RUN chmod -R 777 app EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /phalcon/deploy/nginx.conf diff --git a/frameworks/PHP/php-ngx/app-async.php b/frameworks/PHP/php-ngx/app-async.php index 80b78b39eb7..3d85d02aaed 100644 --- a/frameworks/PHP/php-ngx/app-async.php +++ b/frameworks/PHP/php-ngx/app-async.php @@ -1,5 +1,5 @@ /dev/null && \ RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git libxml2-dev systemtap-sdt-dev \ - zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.2-cli php8.2-dev libphp8.2-embed php8.2-mysql > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev libkrb5-dev \ + php8.3-cli php8.3-dev libphp8.3-embed php8.3-mysql > /dev/null ADD . . -ENV NGINX_VERSION 1.24.0 +ENV NGINX_VERSION 1.25.4 -RUN git clone -b v0.0.27 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ @@ -25,10 +25,10 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ ./configure --user=www --group=www \ --prefix=/nginx \ --with-ld-opt="-Wl,-rpath,$PHP_LIB" \ - --add-module=/ngx_php7/third_party/ngx_devel_kit \ - --add-module=/ngx_php7 > /dev/null && \ + --add-module=/ngx-php/third_party/ngx_devel_kit \ + --add-module=/ngx-php > /dev/null && \ make > /dev/null && make install > /dev/null -RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.2/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.3/embed/conf.d/10-opcache.ini EXPOSE 8080 diff --git a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile index 8a03f32516c..90d87b8523d 100644 --- a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,13 +9,13 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git libxml2-dev systemtap-sdt-dev \ - zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.2-cli php8.2-dev libphp8.2-embed php8.2-mysql > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev libkrb5-dev \ + php8.3-cli php8.3-dev libphp8.3-embed php8.3-mysql > /dev/null ADD . . -ENV NGINX_VERSION 1.24.0 +ENV NGINX_VERSION 1.25.4 -RUN git clone -b v0.0.27 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ diff --git a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile index 4b4452f3174..b7a157833fd 100644 --- a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,13 +9,13 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git libxml2-dev systemtap-sdt-dev \ - zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.2-cli php8.2-dev libphp8.2-embed php8.2-pgsql > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev libkrb5-dev \ + php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql > /dev/null ADD . . -ENV NGINX_VERSION 1.24.0 +ENV NGINX_VERSION 1.25.4 -RUN git clone -b v0.0.27 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ @@ -32,7 +32,7 @@ RUN sed -i "s|app.php|app-pg.php|g" /deploy/nginx.conf RUN export WORKERS=$(( 4 * $(nproc) )) && \ sed -i "s|worker_processes auto|worker_processes $WORKERS|g" /deploy/nginx.conf -RUN sed -i "s|opcache.jit=off|opcache.jit=function|g" /etc/php/8.2/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|opcache.jit=function|g" /etc/php/8.3/embed/conf.d/10-opcache.ini EXPOSE 8080 CMD /nginx/sbin/nginx -c /deploy/nginx.conf diff --git a/frameworks/PHP/php-ngx/php-ngx.dockerfile b/frameworks/PHP/php-ngx/php-ngx.dockerfile index d20a9e08f63..671a6312aef 100644 --- a/frameworks/PHP/php-ngx/php-ngx.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,13 +9,13 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git libxml2-dev systemtap-sdt-dev \ - zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.2-cli php8.2-dev libphp8.2-embed php8.2-mysql + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev libkrb5-dev \ + php8.3-cli php8.3-dev libphp8.3-embed php8.3-mysql > /dev/null ADD . . -ENV NGINX_VERSION 1.24.0 +ENV NGINX_VERSION 1.25.4 -RUN git clone -b v0.0.27 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ @@ -27,7 +27,7 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ --add-module=/ngx-php/third_party/ngx_devel_kit \ --add-module=/ngx-php > /dev/null && \ make > /dev/null && make install > /dev/null -RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.2/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.3/embed/conf.d/10-opcache.ini EXPOSE 8080 diff --git a/frameworks/PHP/php/php-caddy.dockerfile b/frameworks/PHP/php/php-caddy.dockerfile index dd3a2b37eee..e148b16570f 100644 --- a/frameworks/PHP/php/php-caddy.dockerfile +++ b/frameworks/PHP/php/php-caddy.dockerfile @@ -7,9 +7,9 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq RUN apt-get install -yqq git unzip curl \ - php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ # Install Caddyserver RUN apt-get install -y debian-keyring debian-archive-keyring apt-transport-https > /dev/null \ @@ -20,11 +20,11 @@ RUN apt-get install -y debian-keyring debian-archive-keyring apt-transport-https ADD ./ /php WORKDIR /php -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ caddy run --config deploy/caddy/Caddyfile diff --git a/frameworks/PHP/php/php-eloquent.dockerfile b/frameworks/PHP/php/php-eloquent.dockerfile index 0214c23a181..615f0a10072 100644 --- a/frameworks/PHP/php/php-eloquent.dockerfile +++ b/frameworks/PHP/php/php-eloquent.dockerfile @@ -5,16 +5,16 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-dev > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; COPY deploy/eloquent/composer* ./ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -23,6 +23,6 @@ RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-h2o.dockerfile b/frameworks/PHP/php/php-h2o.dockerfile index 26bf9f9d5c2..cd73427a08e 100644 --- a/frameworks/PHP/php/php-h2o.dockerfile +++ b/frameworks/PHP/php/php-h2o.dockerfile @@ -4,7 +4,7 @@ ARG H2O_PREFIX=/opt/h2o FROM "ubuntu:${UBUNTU_VERSION}" AS compile -ARG H2O_VERSION=13ba727ad12dfb2338165d2bcfb2136457e33c8a +ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc ARG DEBIAN_FRONTEND=noninteractive ARG H2O_PREFIX @@ -14,6 +14,7 @@ RUN apt-get -yqq update && \ cmake \ curl \ g++ \ + libbpfcc-dev \ libbrotli-dev \ libcap-dev \ libssl-dev \ @@ -23,6 +24,8 @@ RUN apt-get -yqq update && \ libz-dev \ ninja-build \ pkg-config \ + rsync \ + ruby \ systemtap-sdt-dev && \ curl -LSs "https://github.com/h2o/h2o/archive/${H2O_VERSION}.tar.gz" | \ tar --strip-components=1 -xz && \ @@ -32,6 +35,7 @@ RUN apt-get -yqq update && \ -DCMAKE_C_FLAGS="-flto -march=native -mtune=native" \ -DCMAKE_INSTALL_PREFIX="${H2O_PREFIX}" \ -DCMAKE_RANLIB=/usr/bin/gcc-ranlib \ + -DWITH_MRUBY=on \ -G Ninja \ -S . && \ cmake --build build -j && \ @@ -39,7 +43,7 @@ RUN apt-get -yqq update && \ FROM "ubuntu:${UBUNTU_VERSION}" -ARG PHP_VERSION=8.2 +ARG PHP_VERSION=8.3 ENV TZ=America/Los_Angeles @@ -70,5 +74,5 @@ ARG TFB_TEST_DATABASE ARG TFB_TEST_NAME CMD sed -i "s/num-threads: x/num-threads: $((2 * $(nproc)))/g" /opt/h2o/etc/h2o.conf && \ - service php8.2-fpm start && \ + service php8.3-fpm start && \ /opt/h2o/bin/h2o -c /opt/h2o/etc/h2o.conf diff --git a/frameworks/PHP/php/php-laravel-query-builder.dockerfile b/frameworks/PHP/php/php-laravel-query-builder.dockerfile index 73c4bb52244..2ca94a15881 100644 --- a/frameworks/PHP/php/php-laravel-query-builder.dockerfile +++ b/frameworks/PHP/php/php-laravel-query-builder.dockerfile @@ -5,16 +5,16 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-dev > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; COPY deploy/eloquent/composer* ./ RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -23,5 +23,5 @@ RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-pgsql-raw.dockerfile b/frameworks/PHP/php/php-pgsql-raw.dockerfile index b1630d5da95..374656d40b9 100644 --- a/frameworks/PHP/php/php-pgsql-raw.dockerfile +++ b/frameworks/PHP/php/php-pgsql-raw.dockerfile @@ -5,9 +5,9 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-pgsql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-pgsql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php @@ -17,11 +17,11 @@ RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" dbquery.php RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" fortune.php RUN sed -i "s|PDO('mysql:|PDO('pgsql:|g" updateraw.php -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-pools.dockerfile b/frameworks/PHP/php/php-pools.dockerfile index 8b69d016dd9..b62917e0ec3 100644 --- a/frameworks/PHP/php/php-pools.dockerfile +++ b/frameworks/PHP/php/php-pools.dockerfile @@ -5,19 +5,19 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php -COPY deploy/conf/php-fpm-pools.conf /etc/php/8.2/fpm/php-fpm.conf -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 512|pm.max_children = 256|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +COPY deploy/conf/php-fpm-pools.conf /etc/php/8.3/fpm/php-fpm.conf +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 512|pm.max_children = 256|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx-pools.conf -g "daemon off;" diff --git a/frameworks/PHP/php/php-raw7-tcp.dockerfile b/frameworks/PHP/php/php-raw7-tcp.dockerfile index 79fb1cdb013..c8cd5eb855c 100644 --- a/frameworks/PHP/php/php-raw7-tcp.dockerfile +++ b/frameworks/PHP/php/php-raw7-tcp.dockerfile @@ -5,21 +5,21 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php -RUN sed -i "s|listen = /run/php/php-fpm.sock|listen = 127.0.0.1:9001|g" /etc/php/8.2/fpm/php-fpm.conf +RUN sed -i "s|listen = /run/php/php-fpm.sock|listen = 127.0.0.1:9001|g" /etc/php/8.3/fpm/php-fpm.conf RUN sed -i "s|server unix:/var/run/php/php-fpm.sock;|server 127.0.0.1:9001;|g" deploy/nginx7.conf -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx7.conf -g "daemon off;" \ No newline at end of file diff --git a/frameworks/PHP/php/php-workerman.dockerfile b/frameworks/PHP/php/php-workerman.dockerfile index e7cc2f4633d..6f392702778 100644 --- a/frameworks/PHP/php/php-workerman.dockerfile +++ b/frameworks/PHP/php/php-workerman.dockerfile @@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq RUN apt-get install -yqq git unzip \ - php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev php8.3-xml libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/workerman/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/workerman/cli-php.ini /etc/php/8.3/cli/php.ini COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer diff --git a/frameworks/PHP/php/php.dockerfile b/frameworks/PHP/php/php.dockerfile index 9a3e0da9577..5ad4298427f 100644 --- a/frameworks/PHP/php/php.dockerfile +++ b/frameworks/PHP/php/php.dockerfile @@ -6,18 +6,19 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq RUN apt-get install -yqq nginx git unzip \ - php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql > /dev/null + php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /php WORKDIR /php -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.3/fpm/conf.d/10-opcache.ini RUN chmod -R 777 /php EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /php/deploy/nginx7.conf -g "daemon off;" diff --git a/frameworks/PHP/reactphp/.dockerignore b/frameworks/PHP/reactphp/.dockerignore new file mode 100644 index 00000000000..265ee153b77 --- /dev/null +++ b/frameworks/PHP/reactphp/.dockerignore @@ -0,0 +1,5 @@ +vendor +composer.lock +*.dockerfile +.dockerignore +.gitignore diff --git a/frameworks/PHP/reactphp/.gitignore b/frameworks/PHP/reactphp/.gitignore new file mode 100644 index 00000000000..987e2a253ca --- /dev/null +++ b/frameworks/PHP/reactphp/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor diff --git a/frameworks/PHP/reactphp/app.php b/frameworks/PHP/reactphp/app.php index 7c4e230e10f..4f9dd816652 100644 --- a/frameworks/PHP/reactphp/app.php +++ b/frameworks/PHP/reactphp/app.php @@ -1,134 +1,147 @@ PDO::FETCH_ASSOC, - PDO::ATTR_EMULATE_PREPARES => false - ] - ); - $world = $pdo->prepare('SELECT id,randomNumber FROM World WHERE id=?'); - $update = $pdo->prepare('UPDATE World SET randomNumber=? WHERE id=?'); - $fortune = $pdo->prepare('SELECT id,message FROM Fortune'); - $fortune->setFetchMode(PDO::FETCH_KEY_PAIR); -} +use function React\Promise\all; -function router(Request $request) +/** @return Closure(Request):ResponseInterface */ +function requestHandler(): Closure { - return match($request->getUri()->getPath()) { - '/plaintext' => text(), - '/json' => json(), - '/db' => db(), - '/fortunes' => fortune(), - '/query' => query($request), - '/update' => updateraw($request), - // '/info' => info(), - default => new Response(404, [], 'Error 404'), + $connection = establishDbConnection('benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world?idle=0.5'); + + $world = static function (int $id) use ($connection): PromiseInterface { + return $connection->query('SELECT id,randomNumber FROM World WHERE id=?', [$id]); }; -} -function text() -{ - return new Response(200, [ - 'Content-Type' => 'text/plain' - ], 'Hello, World!'); -} + $fortune = static function () use ($connection): PromiseInterface { + return $connection->query('SELECT id,message FROM Fortune'); + }; -function json() -{ - return new Response(200, [ - 'Content-Type' => 'application/json' - ], json_encode(['message' => 'Hello, World!'])); + $update = static function (int $id, int $randomNumber) use ($connection): PromiseInterface { + return $connection->query('UPDATE World SET randomNumber=? WHERE id=?', [$randomNumber, $id]); + }; + + return static function (Request $request) use ($world, $fortune, $update): ResponseInterface | PromiseInterface { + return match($request->getUri()->getPath()) { + '/plaintext' => Response::plaintext('Hello, World!'), + '/json' => Response::json(['message' => 'Hello, World!']), + '/db' => db($world), + '/fortunes' => fortune($fortune), + '/query' => query(queryCount($request), $world), + '/update' => updateraw(queryCount($request), $world, $update), + // '/info' => info(), + default => new Response(404, [], 'Error 404'), + }; + }; } -function db() -{ - global $world; +function establishDbConnection( + #[SensitiveParameter] + string $uri, +): DbConnection { + $connection = (new DbFactory())->createLazyConnection($uri); + + $interrupt = $connection->quit(...); - $world->execute([mt_rand(1, 10000)]); + $connection->on('close', static function () use (&$interrupt) { + Loop::removeSignal(SIGINT, $interrupt); + Loop::removeSignal(SIGTERM, $interrupt); + }); - return new Response(200, [ - 'Content-Type' => 'application/json' - ], json_encode($world->fetch())); + Loop::addSignal(SIGINT, $interrupt); + Loop::addSignal(SIGTERM, $interrupt); + + return $connection; } -function query($request) +/** @param Closure(int):PromiseInterface $world */ +function db(Closure $world): PromiseInterface { - global $world; + $id = mt_rand(1, 10000); - $query_count = 1; - $q = (int) $request->getQueryParams()['q']; - if ($q > 1) { - $query_count = min($q, 500); - } + return $world($id)->then( + static fn (QueryResult $result): ResponseInterface => Response::json($result->resultRows[0]), + ); +} - while ($query_count--) { - $world->execute([mt_rand(1, 10000)]); - $arr[] = $world->fetch(); +function queryCount(Request $request): int +{ + $count = (int) ($request->getQueryParams()['q'] ?? 1); + + if ($count > 1) { + return min($count, 500); } - return new Response(200, [ - 'Content-Type' => 'application/json' - ], json_encode($arr)); + return 1; } -function updateraw($request) +/** @param Closure(int):PromiseInterface $world */ +function query(int $queryCount, Closure $world): PromiseInterface { - global $world, $update; + $processQueries = static function (int $count) use ($world): iterable { + while ($count--) { + $id = mt_rand(1, 10000); - $query_count = 1; - $q = (int) $request->getQueryParams()['q']; - if ($q > 1) { - $query_count = min($q, 500); - } + yield $world($id)->then(static fn (QueryResult $result): array => $result->resultRows[0]); + } + }; - while ($query_count--) { - $id = mt_rand(1, 10000); - $world->execute([$id]); - $item = $world->fetch(); - $update->execute( - [$item['randomNumber'] = mt_rand(1, 10000), $id] - ); + return all($processQueries($queryCount)) + ->then(static fn (array $result): ResponseInterface => Response::json($result)); +} - $arr[] = $item; - } +/** + * @param Closure(int):PromiseInterface $world + * @param Closure(int, int):PromiseInterface $update + */ +function updateraw(int $queryCount, Closure $world, Closure $update): PromiseInterface +{ + $processQueries = static function (int $count) use ($world, $update): iterable { + while ($count--) { + $id = mt_rand(1, 10000); + + yield $world($id)->then( + static function (QueryResult $result) use ($update): PromiseInterface { + $updated = $result->resultRows[0]; + $updated['randomNumber'] = mt_rand(1, 10000); + + return $update($updated['id'], $updated['randomNumber']) + ->then(static fn (): array => $updated); + } + ); + } + }; - // $pdo->beginTransaction(); - // foreach($arr as $world) { - // $update->execute([$world['randomNumber'], $world['id']]); - // } - // $pdo->commit(); - return new Response(200, [ - 'Content-Type' => 'application/json' - ], json_encode($arr)); + return all($processQueries($queryCount)) + ->then(static fn (array $result): ResponseInterface => Response::json($result)); } -function fortune() +function fortune(Closure $fortune): PromiseInterface { - global $fortune; + $formatResult = static function (array $rows): string { + $rows[] = ['id' => 0, 'message' => 'Additional fortune added at request time.']; + usort($rows, static fn (array $one, array $other) => $one['message'] <=> $other['message']); - $fortune->execute(); + $html = ''; - $arr = $fortune->fetchAll(); - $arr[0] = 'Additional fortune added at request time.'; - asort($arr); + foreach ($rows as $row) { + $message = htmlspecialchars($row['message'], ENT_QUOTES, 'UTF-8'); - $html = ''; - foreach ($arr as $id => $message) { - $message = htmlspecialchars($message, ENT_QUOTES, 'UTF-8'); - $html .= "$id$message"; - } + $html .= "{$row['id']}{$message}"; + } + + return "Fortunes$html
idmessage
"; + }; - return new Response(200, [ - 'Content-Type' => 'text/html; charset=UTF-8', - ], "Fortunes$html
idmessage
" + return $fortune()->then( + static fn (QueryResult $result): ResponseInterface => Response::html($formatResult($result->resultRows)), ); } @@ -138,4 +151,4 @@ function fortune() phpinfo(); return new Response(200, ['Content-Type' => 'text/plain'], ob_get_clean()); } - */ \ No newline at end of file + */ diff --git a/frameworks/PHP/reactphp/composer.json b/frameworks/PHP/reactphp/composer.json index fdea490c2d2..c03159aaa54 100644 --- a/frameworks/PHP/reactphp/composer.json +++ b/frameworks/PHP/reactphp/composer.json @@ -1,9 +1,10 @@ { "require": { - "php": ">=5.3.0", + "php": ">=8.3.0", "psr/http-message": "^1.0", - "react/event-loop": "^1.2", - "react/http": "^1.6", - "react/socket": "^1.11" + "react/event-loop": "^1.5", + "react/http": "^1.9", + "react/socket": "^1.14", + "react/mysql": "^0.6" } } diff --git a/frameworks/PHP/reactphp/reactphp.dockerfile b/frameworks/PHP/reactphp/reactphp.dockerfile index eb5a070ba1c..05f9d138a16 100644 --- a/frameworks/PHP/reactphp/reactphp.dockerfile +++ b/frameworks/PHP/reactphp/reactphp.dockerfile @@ -6,25 +6,26 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq git unzip wget curl build-essential \ - php8.2-cli php8.2-mbstring php8.2-dev php8.2-xml php8.2-curl php8.2-mysql > /dev/null + php8.3-cli php8.3-mbstring php8.3-dev php8.3-xml > /dev/null # An extension is required! # We deal with concurrencies over 1k, which stream_select doesn't support. -RUN wget http://pear.php.net/go-pear.phar --quiet && php go-pear.phar -#RUN apt-get install -y libuv1-dev > /dev/null -RUN apt-get install -y libevent-dev > /dev/null -#RUN pecl install uv-0.2.4 > /dev/null && echo "extension=uv.so" > /etc/php/8.2/cli/conf.d/uv.ini -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -yqq libuv1-dev > /dev/null \ + && pecl install uv-beta > /dev/null \ + && echo "extension=uv.so" > /etc/php/8.3/cli/conf.d/uv.ini -ADD ./ /reactphp -WORKDIR /reactphp +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/cli/conf.d/ +COPY deploy/conf/* /etc/php/8.3/cli/conf.d/ -COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer +WORKDIR /reactphp +COPY composer.json . RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet +COPY . . + EXPOSE 8080 -CMD php server.php +ENTRYPOINT ["/usr/bin/php"] +CMD ["server.php"] diff --git a/frameworks/PHP/reactphp/server.php b/frameworks/PHP/reactphp/server.php index 107ee1b78bd..ddfb5a07145 100644 --- a/frameworks/PHP/reactphp/server.php +++ b/frameworks/PHP/reactphp/server.php @@ -1,20 +1,27 @@ listen($socket); -$loop = React\EventLoop\Loop::get(); +echo "React Server running at http://0.0.0.0:8080\n"; +echo "EventLoop: ", Loop::get()::class, "\n"; -$server = new React\Http\Server($loop, function (Psr\Http\Message\ServerRequestInterface $request) { - return router($request); -}); +$interrupt = static function () use ($server, $socket, &$interrupt): void { + echo 'Interrupting server', PHP_EOL; -$socket = new React\Socket\Server('0.0.0.0:8080', $loop); -$server->listen($socket); + $socket->close(); -echo "React Server running at http://0.0.0.0:8080\n"; -echo "EventLoop: ", $loop::class, "\n"; + Loop::removeSignal(SIGINT, $interrupt); + Loop::removeSignal(SIGTERM, $interrupt); +}; -$loop->run(); +Loop::addSignal(SIGINT, $interrupt); +Loop::addSignal(SIGTERM, $interrupt); diff --git a/frameworks/PHP/simps/simps-micro.dockerfile b/frameworks/PHP/simps/simps-micro.dockerfile index 59ddd35f1e7..baa74e103e1 100644 --- a/frameworks/PHP/simps/simps-micro.dockerfile +++ b/frameworks/PHP/simps/simps-micro.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/simps/simps.dockerfile b/frameworks/PHP/simps/simps.dockerfile index 59ddd35f1e7..baa74e103e1 100644 --- a/frameworks/PHP/simps/simps.dockerfile +++ b/frameworks/PHP/simps/simps.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/slim/composer.json b/frameworks/PHP/slim/composer.json index 26d8bd5b254..78202c96223 100644 --- a/frameworks/PHP/slim/composer.json +++ b/frameworks/PHP/slim/composer.json @@ -1,6 +1,6 @@ { "require": { - "slim/slim": "^4.10", + "slim/slim": "^4.12", "slim/php-view": "3.2.0", "slim/psr7": "1.*", "slim/http": "1.*", diff --git a/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile b/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile index 28a5e0c7357..4a40505c701 100644 --- a/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile +++ b/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile @@ -8,14 +8,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ RUN apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq git \ - php8.2-cli php8.2-pgsql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-pgsql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini ADD ./ /slim WORKDIR /slim diff --git a/frameworks/PHP/slim/slim-workerman.dockerfile b/frameworks/PHP/slim/slim-workerman.dockerfile index 80b69e0b0d9..fefb80f8106 100644 --- a/frameworks/PHP/slim/slim-workerman.dockerfile +++ b/frameworks/PHP/slim/slim-workerman.dockerfile @@ -7,14 +7,14 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get update -yqq > /dev/null && apt-get install -yqq git \ - php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini ADD ./ /slim WORKDIR /slim diff --git a/frameworks/PHP/slim/slim.dockerfile b/frameworks/PHP/slim/slim.dockerfile index c1eb0af9da3..90c81c6deb6 100644 --- a/frameworks/PHP/slim/slim.dockerfile +++ b/frameworks/PHP/slim/slim.dockerfile @@ -7,16 +7,16 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip \ - php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-xml php8.2-curl > /dev/null + php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /slim WORKDIR /slim -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -24,5 +24,5 @@ RUN chmod -R 777 /slim EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /slim/deploy/nginx.conf diff --git a/frameworks/PHP/spiral/spiral.dockerfile b/frameworks/PHP/spiral/spiral.dockerfile index 3b8656690de..ca9d98d9612 100644 --- a/frameworks/PHP/spiral/spiral.dockerfile +++ b/frameworks/PHP/spiral/spiral.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2.0-cli +FROM php:8.3-cli RUN docker-php-ext-install pdo_mysql > /dev/null diff --git a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile index 860a5811bce..9b9daf07c43 100644 --- a/frameworks/PHP/swoole/swoole-async-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-mysql.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -ENV SWOOLE_VERSION 5.1.0 +ENV SWOOLE_VERSION 5.1.1 ENV ENABLE_COROUTINE 1 ENV DATABASE_DRIVER mysql @@ -10,14 +10,14 @@ RUN apt update -yqq > /dev/null \ && apt install -yqq software-properties-common > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ - && apt install php8.2-cli php8.2-pdo-mysql php8.2-dev -y > /dev/null \ + && apt install php8.3-cli php8.3-pdo-mysql php8.3-dev -y > /dev/null \ && cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ && make -j8 > /dev/null \ && make install > /dev/null \ - && echo "extension=swoole.so" > /etc/php/8.2/cli/conf.d/50-swoole.ini + && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini WORKDIR /swoole @@ -25,7 +25,7 @@ ADD ./swoole-server.php /swoole ADD ./php.ini /swoole ADD ./database.php /swoole -RUN cat /swoole/php.ini >> /etc/php/8.2/cli/php.ini +RUN cat /swoole/php.ini >> /etc/php/8.3/cli/php.ini EXPOSE 8080 CMD php /swoole/swoole-server.php diff --git a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile index bf5f385a534..d75390c922e 100644 --- a/frameworks/PHP/swoole/swoole-async-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-async-postgres.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -ENV SWOOLE_VERSION 5.1.0 +ENV SWOOLE_VERSION 5.1.1 ENV ENABLE_COROUTINE 1 ENV DATABASE_DRIVER pgsql @@ -10,14 +10,14 @@ RUN apt update -yqq > /dev/null \ && apt install -yqq software-properties-common > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ - && apt install php8.2-cli php8.2-pdo-pgsql php8.2-dev libpq-dev -y > /dev/null \ + && apt install php8.3-cli php8.3-pdo-pgsql php8.3-dev libpq-dev -y > /dev/null \ && cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure --enable-swoole-pgsql > /dev/null \ && make -j8 > /dev/null \ && make install > /dev/null \ - && echo "extension=swoole.so" > /etc/php/8.2/cli/conf.d/50-swoole.ini + && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini WORKDIR /swoole @@ -25,7 +25,7 @@ ADD ./swoole-server.php /swoole ADD ./php.ini /swoole ADD ./database.php /swoole -RUN cat /swoole/php.ini >> /etc/php/8.2/cli/php.ini +RUN cat /swoole/php.ini >> /etc/php/8.3/cli/php.ini EXPOSE 8080 CMD php /swoole/swoole-server.php diff --git a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile index a6261b638f6..4893a1aad1a 100644 --- a/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-mysql.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -ENV SWOOLE_VERSION 5.1.0 +ENV SWOOLE_VERSION 5.1.1 ENV ENABLE_COROUTINE 0 ENV DATABASE_DRIVER mysql @@ -10,14 +10,14 @@ RUN apt update -yqq > /dev/null \ && apt install -yqq software-properties-common > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ - && apt install php8.2-cli php8.2-pdo-mysql php8.2-dev -y > /dev/null \ + && apt install php8.3-cli php8.3-pdo-mysql php8.3-dev -y > /dev/null \ && cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ && make -j8 > /dev/null \ && make install > /dev/null \ - && echo "extension=swoole.so" > /etc/php/8.2/cli/conf.d/50-swoole.ini + && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini WORKDIR /swoole @@ -25,7 +25,7 @@ ADD ./swoole-server.php /swoole ADD ./php.ini /swoole ADD ./database.php /swoole -RUN cat /swoole/php.ini >> /etc/php/8.2/cli/php.ini +RUN cat /swoole/php.ini >> /etc/php/8.3/cli/php.ini EXPOSE 8080 CMD php /swoole/swoole-server.php diff --git a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile index b70782fb998..9559267ce6c 100644 --- a/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile +++ b/frameworks/PHP/swoole/swoole-sync-postgres.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -ENV SWOOLE_VERSION 5.1.0 +ENV SWOOLE_VERSION 5.1.1 ENV ENABLE_COROUTINE 0 ENV DATABASE_DRIVER pgsql @@ -10,14 +10,14 @@ RUN apt update -yqq > /dev/null \ && apt install -yqq software-properties-common > /dev/null \ && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null \ && apt update -yqq > /dev/null \ - && apt install php8.2-cli php8.2-pdo-pgsql php8.2-dev libpq-dev -y > /dev/null \ + && apt install php8.3-cli php8.3-pdo-pgsql php8.3-dev libpq-dev -y > /dev/null \ && cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \ && cd /tmp/swoole-src-${SWOOLE_VERSION} \ && phpize > /dev/null \ && ./configure > /dev/null \ && make -j2 > /dev/null \ && make install > /dev/null \ - && echo "extension=swoole.so" > /etc/php/8.2/cli/conf.d/50-swoole.ini + && echo "extension=swoole.so" > /etc/php/8.3/cli/conf.d/50-swoole.ini WORKDIR /swoole @@ -25,7 +25,7 @@ ADD ./swoole-server.php /swoole ADD ./php.ini /swoole ADD ./database.php /swoole -RUN cat /swoole/php.ini >> /etc/php/8.2/cli/php.ini +RUN cat /swoole/php.ini >> /etc/php/8.3/cli/php.ini EXPOSE 8080 CMD php /swoole/swoole-server.php diff --git a/frameworks/PHP/symfony/composer.json b/frameworks/PHP/symfony/composer.json index 074ee8b8e1a..bfee2e6ed58 100644 --- a/frameworks/PHP/symfony/composer.json +++ b/frameworks/PHP/symfony/composer.json @@ -2,18 +2,18 @@ "type": "project", "license": "proprietary", "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-ctype": "*", "ext-iconv": "*", "ext-mbstring": "*", - "symfony/console": "^6", - "symfony/dotenv": "^6", + "symfony/console": "^7", + "symfony/dotenv": "^7", "symfony/flex": "^2", - "symfony/framework-bundle": "^6", + "symfony/framework-bundle": "^7", "symfony/orm-pack": "^2", - "symfony/twig-bundle": "^6", - "symfony/yaml": "^6.0", - "joanhey/adapterman": "^0.5" + "symfony/twig-bundle": "^7", + "symfony/yaml": "^7", + "joanhey/adapterman": "^0.6" }, "minimum-stability": "dev", "prefer-stable": true, @@ -65,7 +65,7 @@ "extra": { "symfony": { "allow-contrib": false, - "require": "^6", + "require": "^7", "docker": true } } diff --git a/frameworks/PHP/symfony/config/routes/annotations.yaml b/frameworks/PHP/symfony/config/routes/annotations.yaml deleted file mode 100644 index e92efc59693..00000000000 --- a/frameworks/PHP/symfony/config/routes/annotations.yaml +++ /dev/null @@ -1,7 +0,0 @@ -controllers: - resource: ../../src/Controller/ - type: annotation - -kernel: - resource: ../../src/Kernel.php - type: annotation diff --git a/frameworks/PHP/symfony/config/routes/attributes.yaml b/frameworks/PHP/symfony/config/routes/attributes.yaml new file mode 100644 index 00000000000..296cf15dacc --- /dev/null +++ b/frameworks/PHP/symfony/config/routes/attributes.yaml @@ -0,0 +1,9 @@ +controllers: + resource: + path: ../../src/Controller/ + namespace: App\Controller + type: attribute + +kernel: + resource: App\Kernel + type: attribute \ No newline at end of file diff --git a/frameworks/PHP/symfony/deploy/conf/cli-php.ini b/frameworks/PHP/symfony/deploy/conf/cli-php.ini index d3dfaa8270a..bcccffbc63b 100644 --- a/frameworks/PHP/symfony/deploy/conf/cli-php.ini +++ b/frameworks/PHP/symfony/deploy/conf/cli-php.ini @@ -13,4 +13,4 @@ memory_limit = 512M opcache.jit_buffer_size = 128M opcache.jit = tracing -disable_functions=header,header_remove,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,set_time_limit +disable_functions=header,header_remove,headers_sent,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,set_time_limit diff --git a/frameworks/PHP/symfony/server.php b/frameworks/PHP/symfony/server.php index 485c961785f..4b1691a91a4 100644 --- a/frameworks/PHP/symfony/server.php +++ b/frameworks/PHP/symfony/server.php @@ -12,7 +12,7 @@ $http_worker->count = (int) shell_exec('nproc') * 4; $http_worker->name = 'AdapterMan-Symfony'; -$http_worker->onWorkerStart = function () { +$http_worker->onWorkerStart = static function () { Header::$date = gmdate('D, d M Y H:i:s').' GMT'; Timer::add(1, function() { Header::$date = gmdate('D, d M Y H:i:s').' GMT'; diff --git a/frameworks/PHP/symfony/start.php b/frameworks/PHP/symfony/start.php index 58dc7be8368..9c1e9045a73 100644 --- a/frameworks/PHP/symfony/start.php +++ b/frameworks/PHP/symfony/start.php @@ -5,7 +5,7 @@ use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\HttpFoundation\Request; -require __DIR__.'/vendor/autoload.php'; +//require __DIR__.'/vendor/autoload.php'; (new Dotenv())->bootEnv(__DIR__.'/.env'); diff --git a/frameworks/PHP/symfony/symfony-mysql.dockerfile b/frameworks/PHP/symfony/symfony-mysql.dockerfile index cb81f390cee..c6361bcacd8 100644 --- a/frameworks/PHP/symfony/symfony-mysql.dockerfile +++ b/frameworks/PHP/symfony/symfony-mysql.dockerfile @@ -8,17 +8,17 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip curl \ - php8.2-cli php8.2-fpm php8.2-mysql \ - php8.2-mbstring php8.2-xml php8.2-curl php8.2-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-mysql \ + php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD . /symfony WORKDIR /symfony -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN mkdir -m 777 -p /symfony/var/cache/{dev,prod} /symfony/var/log @@ -26,14 +26,14 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --no-scripts RUN cp deploy/mysql/.env . && composer dump-env prod && bin/console cache:clear -RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.2/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini EXPOSE 8080 # Uncomment next line for Laravel console error logging to be viewable in docker logs -# RUN echo "catch_workers_output = yes" >> /etc/php/8.2/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD /usr/sbin/php-fpm8.2 --fpm-config /etc/php/8.2/fpm/php-fpm.conf && \ +CMD service php8.3-fpm start && \ nginx -c /symfony/deploy/nginx.conf \ No newline at end of file diff --git a/frameworks/PHP/symfony/symfony-raw.dockerfile b/frameworks/PHP/symfony/symfony-raw.dockerfile index a7df9628f12..2957d6246c2 100644 --- a/frameworks/PHP/symfony/symfony-raw.dockerfile +++ b/frameworks/PHP/symfony/symfony-raw.dockerfile @@ -7,17 +7,17 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip curl \ - php8.2-cli php8.2-fpm php8.2-pgsql \ - php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-fpm php8.3-pgsql \ + php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD . /symfony WORKDIR /symfony -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN mkdir -m 777 -p /symfony/var/cache/{dev,prod} /symfony/var/log @@ -25,13 +25,13 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --no-scripts RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear -RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.2/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini EXPOSE 8080 # Uncomment next line for Laravel console error logging to be viewable in docker logs -# RUN echo "catch_workers_output = yes" >> /etc/php/8.2/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD /usr/sbin/php-fpm8.2 --fpm-config /etc/php/8.2/fpm/php-fpm.conf && \ +CMD service php8.3-fpm start && \ nginx -c /symfony/deploy/nginx.conf diff --git a/frameworks/PHP/symfony/symfony-swoole.dockerfile b/frameworks/PHP/symfony/symfony-swoole.dockerfile index de288786aa2..b23c0e67b02 100644 --- a/frameworks/PHP/symfony/symfony-swoole.dockerfile +++ b/frameworks/PHP/symfony/symfony-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-cli +FROM php:8.3-cli RUN pecl install swoole > /dev/null && \ docker-php-ext-enable swoole diff --git a/frameworks/PHP/symfony/symfony-workerman.dockerfile b/frameworks/PHP/symfony/symfony-workerman.dockerfile index 9990cc5300b..b306f90710d 100644 --- a/frameworks/PHP/symfony/symfony-workerman.dockerfile +++ b/frameworks/PHP/symfony/symfony-workerman.dockerfile @@ -7,12 +7,12 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq git unzip \ - php8.2-cli php8.2-pgsql php8.2-mbstring php8.2-xml php8.2-curl > /dev/null + php8.3-cli php8.3-pgsql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini EXPOSE 8080 @@ -25,6 +25,6 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --no-scripts RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini CMD php server.php start diff --git a/frameworks/PHP/symfony/symfony.dockerfile b/frameworks/PHP/symfony/symfony.dockerfile index b3678a7a227..392f19e91b6 100644 --- a/frameworks/PHP/symfony/symfony.dockerfile +++ b/frameworks/PHP/symfony/symfony.dockerfile @@ -7,17 +7,17 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null RUN apt-get install -yqq nginx git unzip curl \ - php8.2-cli php8.2-fpm php8.2-pgsql \ - php8.2-mbstring php8.2-xml php8.2-curl php8.2-dev > /dev/null + php8.3-cli php8.3-fpm php8.3-pgsql \ + php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD . /symfony WORKDIR /symfony -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN mkdir -m 777 -p /symfony/var/cache/{dev,prod} /symfony/var/log @@ -25,13 +25,13 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet --no-scripts RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear -RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.2/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.3/fpm/php.ini EXPOSE 8080 # Uncomment next line for Laravel console error logging to be viewable in docker logs -# RUN echo "catch_workers_output = yes" >> /etc/php/8.2/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.3/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD /usr/sbin/php-fpm8.2 --fpm-config /etc/php/8.2/fpm/php-fpm.conf && \ +CMD service php8.3-fpm start && \ nginx -c /symfony/deploy/nginx.conf \ No newline at end of file diff --git a/frameworks/PHP/ubiquity/app/models/CachedWorld.php b/frameworks/PHP/ubiquity/app/models/CachedWorld.php index e438b1b513c..d23623bc8f9 100644 --- a/frameworks/PHP/ubiquity/app/models/CachedWorld.php +++ b/frameworks/PHP/ubiquity/app/models/CachedWorld.php @@ -4,6 +4,7 @@ /** * @table("World") */ +#[\AllowDynamicProperties] class CachedWorld extends World{ } diff --git a/frameworks/PHP/ubiquity/app/models/Fortune.php b/frameworks/PHP/ubiquity/app/models/Fortune.php index 1877df14b1a..b5d244820a5 100644 --- a/frameworks/PHP/ubiquity/app/models/Fortune.php +++ b/frameworks/PHP/ubiquity/app/models/Fortune.php @@ -1,6 +1,7 @@ /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.0-cli php8.0-dev php8.0-mbstring libphp8.0-embed nginx > /dev/null + php8.3-cli php8.3-dev php8.3-mbstring libphp8.3-embed nginx > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer ADD ./ ./ -ENV NGINX_VERSION=1.21.0 +ENV NGINX_VERSION=1.25.3 -RUN git clone -b v0.0.25 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ diff --git a/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile b/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile index d30d00b6a4b..81109dc94fb 100644 --- a/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,15 +9,15 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.0-cli php8.0-dev libphp8.0-embed php8.0-pgsql nginx > /dev/null + php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql nginx > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer ADD ./ ./ -ENV NGINX_VERSION=1.21.0 +ENV NGINX_VERSION=1.25.3 -RUN git clone -b v0.0.25 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ diff --git a/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile b/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile index 1b92f2d745d..014e12b9415 100644 --- a/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive @@ -9,15 +9,15 @@ RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ - php8.0-cli php8.0-dev libphp8.0-embed php8.0-pgsql nginx > /dev/null + php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql nginx > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer ADD ./ ./ -ENV NGINX_VERSION=1.21.0 +ENV NGINX_VERSION=1.25.3 -RUN git clone -b v0.0.25 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar -zxf nginx-${NGINX_VERSION}.tar.gz && \ diff --git a/frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile b/frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile index fdd3263c306..0abc0ab08ca 100644 --- a/frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile @@ -5,13 +5,13 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq php8.0 php8.0-common php8.0-cgi php-curl php8.0-mysql > /dev/null + apt-get install -yqq php8.3 php8.3-common php8.3-cgi php-curl php8.3-mysql > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN apt-get install -y php-pear php-dev > /dev/null -COPY deploy/conf/php-async.ini /etc/php/8.0/cgi/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cgi/php.ini ADD ./ /ubiquity WORKDIR /ubiquity @@ -33,8 +33,8 @@ RUN chmod 755 /bin/envwrapper.sh RUN chmod 777 -R /ubiquity/.ubiquity/* -#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.0/cgi/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.0/cgi/php.ini +#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/cgi/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cgi/php.ini COPY deploy/conf/roadrunner/mysql/rrServices.php app/config/rrServices.php diff --git a/frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile b/frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile index 80dee9c051d..a8532d8d779 100644 --- a/frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq php8.0 php8.0-common php8.0-cgi php8.0-pgsql php-curl > /dev/null + apt-get install -yqq php8.3 php8.3-common php8.3-cgi php8.3-pgsql php-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN apt-get install -y php-pear php-dev > /dev/null -COPY deploy/conf/php-async.ini /etc/php/8.0/cgi/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cgi/php.ini ADD ./ /ubiquity WORKDIR /ubiquity @@ -34,8 +34,8 @@ RUN chmod 755 /bin/envwrapper.sh RUN chmod 777 -R /ubiquity/.ubiquity/* -#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.0/cgi/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.0/cgi/php.ini +#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/cgi/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.3/cgi/php.ini COPY deploy/conf/roadrunner/pgsql/rrServices.php app/config/rrServices.php diff --git a/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile b/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile index 5e4fd4122bd..d4195a1d945 100644 --- a/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0 +FROM php:8.3-cli RUN apt-get update > /dev/null diff --git a/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile b/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile index 0439f54c5e5..ff57c3c54e1 100644 --- a/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0 +FROM php:8.3-cli RUN apt-get update > /dev/null diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman-mongo.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman-mongo.dockerfile index 437cc2fdc26..b8ed0a2df5c 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman-mongo.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman-mongo.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-mongodb php8.1-xml php8.1-mbstring > /dev/null + apt-get install -yqq git php8.3-cli php8.3-mongodb php8.3-xml php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini ADD ./ /ubiquity @@ -31,8 +31,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/* COPY deploy/conf/workerman/mongo/workerServices.php app/config/workerServices.php -RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.1/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.1/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile index 47d2262ea91..12568a07af3 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring > /dev/null + apt-get install -yqq git php8.3-cli php8.3-mysql php8.3-xml php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini ADD ./ /ubiquity WORKDIR /ubiquity @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/* COPY deploy/conf/workerman/mysql/workerServices.php app/config/workerServices.php -RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.1/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.1/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile index f095ab239f8..75b757a748d 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-pgsql php8.1-xml php8.1-mbstring > /dev/null + apt-get install -yqq git php8.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini ADD ./ /ubiquity WORKDIR /ubiquity @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/* COPY deploy/conf/workerman/pgsql/raw/workerServices.php app/config/workerServices.php -RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.1/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.1/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile index 5242c94ffbc..4b92ddc6f4a 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.1-cli php8.1-pgsql php8.1-xml php8.1-mbstring > /dev/null + apt-get install -yqq git php8.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.1-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.1/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.1/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini ADD ./ /ubiquity WORKDIR /ubiquity @@ -30,8 +30,8 @@ RUN chmod 777 -R /ubiquity/.ubiquity/* COPY deploy/conf/workerman/pgsql/workerServices.php app/config/workerServices.php -RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.1/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.1/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.3/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity.dockerfile b/frameworks/PHP/ubiquity/ubiquity.dockerfile index 7417ec1c802..239d849f9b4 100644 --- a/frameworks/PHP/ubiquity/ubiquity.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity.dockerfile @@ -5,16 +5,16 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.1 php8.1-common php8.1-cli php8.1-fpm php8.1-mysql php8.1-dev > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.1/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /ubiquity WORKDIR /ubiquity -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.1/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -22,9 +22,9 @@ RUN chmod 777 -R /ubiquity/app/cache/* COPY deploy/conf/ubiquity-config.php app/config/config.php -RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.1/fpm/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.3/fpm/php.ini EXPOSE 8080 -CMD service php8.1-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /ubiquity/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/webman/webman.dockerfile b/frameworks/PHP/webman/webman.dockerfile index 923ea5ebf71..512b164d99c 100644 --- a/frameworks/PHP/webman/webman.dockerfile +++ b/frameworks/PHP/webman/webman.dockerfile @@ -6,14 +6,14 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.2-cli php8.2-pgsql php8.2-xml > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get update -yqq && apt-get install -y php-pear php8.2-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get update -yqq && apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/8.2/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /webman WORKDIR /webman diff --git a/frameworks/PHP/wolff/composer.json b/frameworks/PHP/wolff/composer.json index 1b43803812c..9c3ade8f03f 100644 --- a/frameworks/PHP/wolff/composer.json +++ b/frameworks/PHP/wolff/composer.json @@ -22,10 +22,7 @@ ], "require": { "php": ">=7.1.0", - "usbac/wolff-framework": "~4.0" - }, - "require-dev": { - "phpunit/phpunit": "8.*" + "usbac/wolff-framework": "~4.1" }, "autoload": { "psr-4": { diff --git a/frameworks/PHP/wolff/wolff.dockerfile b/frameworks/PHP/wolff/wolff.dockerfile index 21939044bd5..a22a0ceb76c 100644 --- a/frameworks/PHP/wolff/wolff.dockerfile +++ b/frameworks/PHP/wolff/wolff.dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get install -yqq nginx git unzip \ - php8.2-fpm php8.2-mysql php8.2-xml php8.2-mbstring php8.2-intl php8.2-dev php8.2-curl > /dev/null + php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-intl php8.3-dev php8.3-curl > /dev/null -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /wolff WORKDIR /wolff @@ -16,11 +16,11 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /wolff EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /wolff/deploy/nginx.conf 2>&1 > /dev/stderr diff --git a/frameworks/PHP/workerman/workerman-async.dockerfile b/frameworks/PHP/workerman/workerman-async.dockerfile index ceef86cbc42..4228e2adf98 100644 --- a/frameworks/PHP/workerman/workerman-async.dockerfile +++ b/frameworks/PHP/workerman/workerman-async.dockerfile @@ -6,19 +6,19 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php7.4-cli php7.4-mysql > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-mysql > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php7.4-dev libevent-dev git > /dev/null -RUN pecl install event > /dev/null && echo "extension=event.so" > /etc/php/7.4/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev php8.3-xml libevent-dev git > /dev/null +RUN pecl install event-3.1.1 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/7.4/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /workerman WORKDIR /workerman -RUN composer require react/mysql "^0.3.3" --quiet +RUN composer require react/mysql "^0.6" --quiet RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 diff --git a/frameworks/PHP/workerman/workerman-pgsql.dockerfile b/frameworks/PHP/workerman/workerman-pgsql.dockerfile index ca4029a2dd1..f131163c93c 100644 --- a/frameworks/PHP/workerman/workerman-pgsql.dockerfile +++ b/frameworks/PHP/workerman/workerman-pgsql.dockerfile @@ -5,14 +5,14 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.2-cli php8.2-pgsql php8.2-xml > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.1.1 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php.ini /etc/php/8.2/cli/php.ini +COPY php.ini /etc/php/8.3/cli/php.ini ADD ./ /workerman WORKDIR /workerman diff --git a/frameworks/PHP/workerman/workerman-php8-jit.dockerfile b/frameworks/PHP/workerman/workerman-php8-jit.dockerfile index 61413217714..194a2e8817d 100644 --- a/frameworks/PHP/workerman/workerman-php8-jit.dockerfile +++ b/frameworks/PHP/workerman/workerman-php8-jit.dockerfile @@ -6,21 +6,21 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.2-cli php8.2-pgsql php8.2-xml > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-pgsql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.1.1 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php-jit.ini /etc/php/8.2/cli/php.ini +COPY php-jit.ini /etc/php/8.3/cli/php.ini ADD ./ /workerman WORKDIR /workerman RUN sed -i "s|'/app.php|'/app-pg.php|g" server.php RUN sed -i "s|init()|DbRaw::init()|g" server.php -RUN sed -i "s|opcache.jit=off|opcache.jit=function|g" /etc/php/8.2/cli/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|opcache.jit=function|g" /etc/php/8.3/cli/conf.d/10-opcache.ini RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet diff --git a/frameworks/PHP/workerman/workerman.dockerfile b/frameworks/PHP/workerman/workerman.dockerfile index 1652e708baa..36abb360fc1 100644 --- a/frameworks/PHP/workerman/workerman.dockerfile +++ b/frameworks/PHP/workerman/workerman.dockerfile @@ -6,14 +6,14 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null && \ apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null -RUN apt-get install -yqq php8.2-cli php8.2-mysql php8.2-xml > /dev/null +RUN apt-get install -yqq php8.3-cli php8.3-mysql php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev git > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev git > /dev/null +RUN pecl install event-3.1.1 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY php-jit.ini /etc/php/8.2/cli/php.ini +COPY php-jit.ini /etc/php/8.3/cli/php.ini ADD ./ /workerman WORKDIR /workerman diff --git a/frameworks/PHP/yii2/composer.json b/frameworks/PHP/yii2/composer.json index fd42939a64f..695b189d305 100755 --- a/frameworks/PHP/yii2/composer.json +++ b/frameworks/PHP/yii2/composer.json @@ -1,7 +1,7 @@ { "require": { "yidas/yii2-composer-bower-skip": "~2.0.13", - "yiisoft/yii2": "~2.0.43", + "yiisoft/yii2": "~2.0.49", "joanhey/adapterman": "^0.6" }, "config": { diff --git a/frameworks/PHP/yii2/yii2-raw.dockerfile b/frameworks/PHP/yii2/yii2-raw.dockerfile index 0d64edd9e3f..b7af0a36511 100644 --- a/frameworks/PHP/yii2/yii2-raw.dockerfile +++ b/frameworks/PHP/yii2/yii2-raw.dockerfile @@ -5,20 +5,20 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-dev > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /yii2 WORKDIR /yii2 -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /yii2/deploy/nginx.conf diff --git a/frameworks/PHP/yii2/yii2-workerman.dockerfile b/frameworks/PHP/yii2/yii2-workerman.dockerfile index 2c54c4e33b6..e5502f5b455 100644 --- a/frameworks/PHP/yii2/yii2-workerman.dockerfile +++ b/frameworks/PHP/yii2/yii2-workerman.dockerfile @@ -5,14 +5,14 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq git php8.2-cli php8.2-mysql php8.2-mbstring php8.2-xml > /dev/null + apt-get install -yqq git php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.2-dev libevent-dev > /dev/null -RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.2/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null +RUN pecl install event-3.0.8 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.2/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini ADD ./ /yii2 WORKDIR /yii2 diff --git a/frameworks/PHP/yii2/yii2.dockerfile b/frameworks/PHP/yii2/yii2.dockerfile index 0d64edd9e3f..b7af0a36511 100644 --- a/frameworks/PHP/yii2/yii2.dockerfile +++ b/frameworks/PHP/yii2/yii2.dockerfile @@ -5,20 +5,20 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php RUN apt-get update -yqq > /dev/null && \ - apt-get install -yqq nginx git unzip php8.2 php8.2-common php8.2-cli php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-dev > /dev/null + apt-get install -yqq nginx git unzip php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.2/fpm/ +COPY deploy/conf/* /etc/php/8.3/fpm/ ADD ./ /yii2 WORKDIR /yii2 -RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.2/fpm/php-fpm.conf ; fi; +RUN if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.3/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 -CMD service php8.2-fpm start && \ +CMD service php8.3-fpm start && \ nginx -c /yii2/deploy/nginx.conf diff --git a/frameworks/Pascal/mormot/setup_and_build.sh b/frameworks/Pascal/mormot/setup_and_build.sh index 9afe8eff833..81fc5b37ad0 100755 --- a/frameworks/Pascal/mormot/setup_and_build.sh +++ b/frameworks/Pascal/mormot/setup_and_build.sh @@ -35,7 +35,7 @@ echo "Download statics from $URL ..." wget -qO- "$URL" | tar -xz -C ./libs/mORMot/static # uncomment for fixed commit URL -URL=https://github.com/synopse/mORMot2/tarball/c9cefa05e892763ff66a9a51a659b937def36195 +URL=https://github.com/synopse/mORMot2/tarball/c68d24054ffd3e5d63ecb33a2eea49055948e816 #URL="https://api.github.com/repos/synopse/mORMot2/tarball/$USED_TAG" echo "Download and unpacking mORMot sources from $URL ..." wget -qO- "$URL" | tar -xz -C ./libs/mORMot --strip-components=1 diff --git a/frameworks/Pascal/mormot/src/raw.pas b/frameworks/Pascal/mormot/src/raw.pas index b3695c8393c..82b7d8f872a 100644 --- a/frameworks/Pascal/mormot/src/raw.pas +++ b/frameworks/Pascal/mormot/src/raw.pas @@ -201,10 +201,11 @@ constructor TRawAsyncServer.Create( hsoNoStats, // disable low-level statistic counters //hsoThreadCpuAffinity, // worse scaling on multi-servers hsoThreadSmooting, // seems a good option, even if not magical + hsoEnablePipelining, // as expected by /plaintext {$ifdef WITH_LOGS} hsoLogVerbose, {$endif WITH_LOGS} - hsoIncludeDateHeader // required by TPW General Test Requirements #5 + hsoIncludeDateHeader // required by TFB General Test Requirements #5 ] + flags); if pin2Core <> -1 then fHttpServer.Async.SetCpuAffinity(pin2Core); diff --git a/frameworks/Python/aiohttp/requirements.txt b/frameworks/Python/aiohttp/requirements.txt index bb7f19ececa..d833896a168 100644 --- a/frameworks/Python/aiohttp/requirements.txt +++ b/frameworks/Python/aiohttp/requirements.txt @@ -1,8 +1,8 @@ -aiohttp==3.9.0 +aiohttp==3.9.2 asyncpg==0.25.0 cchardet==2.1.7 gunicorn==20.1 -jinja2==3.0.3 +jinja2==3.1.3 psycopg2==2.9.2 SQLAlchemy==1.4.29 ujson==5.4.0 diff --git a/frameworks/Python/aioworkers/requirements-pg.txt b/frameworks/Python/aioworkers/requirements-pg.txt index 248c5419654..4a399de7759 100644 --- a/frameworks/Python/aioworkers/requirements-pg.txt +++ b/frameworks/Python/aioworkers/requirements-pg.txt @@ -2,4 +2,4 @@ uvloop==0.17.0 asyncpg==0.27.0 aioworkers-pg==0.2.0 -Jinja2==3.1.2 +Jinja2==3.1.3 diff --git a/frameworks/Python/api_hour/requirements.txt b/frameworks/Python/api_hour/requirements.txt index 8fb8905ca36..2a65448dcda 100644 --- a/frameworks/Python/api_hour/requirements.txt +++ b/frameworks/Python/api_hour/requirements.txt @@ -1,4 +1,4 @@ -aiohttp==3.9.0 +aiohttp==3.9.2 -e git+https://github.com/Eyepea/aiohttp_jinja2.git@c9675e5c1e1ee7741b30aea8d8fbffcde016c7a0#egg=aiohttp_jinja2-master aiopg==0.7.0 -e git+https://github.com/Eyepea/API-Hour.git@577abbdcbb8cc2810dad46e260b338b15db4d0e3#egg=api_hour-master @@ -6,7 +6,7 @@ asyncio-redis==0.13.4 chardet==2.3.0 gunicorn==19.9.0 hiredis==0.2.0 -Jinja2==2.11.3 +Jinja2==3.1.3 MarkupSafe==0.23 piprot==0.9.1 psycopg2==2.7.5 diff --git a/frameworks/Python/apidaora/requirements.txt b/frameworks/Python/apidaora/requirements.txt index 90e4dfac0b7..65f2f5c9b50 100644 --- a/frameworks/Python/apidaora/requirements.txt +++ b/frameworks/Python/apidaora/requirements.txt @@ -1,6 +1,6 @@ asyncpg==0.21.0 gunicorn==20.0.4 -jinja2==3.0.3 +jinja2==3.1.3 uvloop==0.14.0 uvicorn==0.11.7 apidaora==0.26.0 diff --git a/frameworks/Python/async-worker/Pipfile.lock b/frameworks/Python/async-worker/Pipfile.lock index e1c3bbb5bbc..aaa9ae7968e 100644 --- a/frameworks/Python/async-worker/Pipfile.lock +++ b/frameworks/Python/async-worker/Pipfile.lock @@ -298,33 +298,72 @@ }, "black": { "hashes": [ - "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1", - "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008" + "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f", + "sha256:41622020d7120e01d377f74249e677039d20e6344ff5851de8a10f11f513bf93", + "sha256:4acf672def7eb1725f41f38bf6bf425c8237248bb0804faa3965c036f7672d11", + "sha256:4be5bb28e090456adfc1255e03967fb67ca846a03be7aadf6249096100ee32d0", + "sha256:4f1373a7808a8f135b774039f61d59e4be7eb56b2513d3d2f02a8b9365b8a8a9", + "sha256:56f52cfbd3dabe2798d76dbdd299faa046a901041faf2cf33288bc4e6dae57b5", + "sha256:65b76c275e4c1c5ce6e9870911384bff5ca31ab63d19c76811cb1fb162678213", + "sha256:65c02e4ea2ae09d16314d30912a58ada9a5c4fdfedf9512d23326128ac08ac3d", + "sha256:6905238a754ceb7788a73f02b45637d820b2f5478b20fec82ea865e4f5d4d9f7", + "sha256:79dcf34b33e38ed1b17434693763301d7ccbd1c5860674a8f871bd15139e7837", + "sha256:7bb041dca0d784697af4646d3b62ba4a6b028276ae878e53f6b4f74ddd6db99f", + "sha256:7d5e026f8da0322b5662fa7a8e752b3fa2dac1c1cbc213c3d7ff9bdd0ab12395", + "sha256:9f50ea1132e2189d8dff0115ab75b65590a3e97de1e143795adb4ce317934995", + "sha256:a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f", + "sha256:aadf7a02d947936ee418777e0247ea114f78aff0d0959461057cae8a04f20597", + "sha256:b5991d523eee14756f3c8d5df5231550ae8993e2286b8014e2fdea7156ed0959", + "sha256:bf21b7b230718a5f08bd32d5e4f1db7fc8788345c8aea1d155fc17852b3410f5", + "sha256:c45f8dff244b3c431b36e3224b6be4a127c6aca780853574c00faf99258041eb", + "sha256:c7ed6668cbbfcd231fa0dc1b137d3e40c04c7f786e626b405c62bcd5db5857e4", + "sha256:d7de8d330763c66663661a1ffd432274a2f92f07feeddd89ffd085b5744f85e7", + "sha256:e19cb1c6365fd6dc38a6eae2dcb691d7d83935c10215aef8e6c38edee3f77abd", + "sha256:e2af80566f43c85f5797365077fb64a393861a3730bd110971ab7a0c94e873e7" ], "index": "pypi", - "version": "==21.5b1" + "markers": "python_version >= '3.8'", + "version": "==24.3.0" }, "click": { "hashes": [ - "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a", - "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6" + "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de" ], - "markers": "python_version >= '3.6'", - "version": "==8.0.1" + "markers": "python_version >= '3.7'", + "version": "==8.1.7" }, "mypy-extensions": { "hashes": [ - "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d", - "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" + "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", + "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.0" + }, + "packaging": { + "hashes": [ + "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9" ], - "version": "==0.4.3" + "markers": "python_version >= '3.7'", + "version": "==24.0" }, "pathspec": { "hashes": [ - "sha256:86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd", - "sha256:aa0cb481c4041bf52ffa7b0d8fa6cd3e88a2ca4879c533c9153882ee2556790d" + "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", + "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712" + ], + "markers": "python_version >= '3.8'", + "version": "==0.12.1" + }, + "platformdirs": { + "hashes": [ + "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068", + "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" ], - "version": "==0.8.1" + "markers": "python_version >= '3.8'", + "version": "==4.2.0" }, "regex": { "hashes": [ @@ -379,6 +418,22 @@ ], "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.2" + }, + "tomli": { + "hashes": [ + "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" + ], + "markers": "python_version < '3.11'", + "version": "==2.0.1" + }, + "typing-extensions": { + "hashes": [ + "sha256:6f1117ac0cbe64536f34520c4688cd144794f9b1d79690bfe0389aa12a347976", + "sha256:7427ef26efa5e4e465e3765af0e52d3897e3684c908efe20e3331e1ce51884b3" + ], + "markers": "python_version < '3.11'", + "version": "==4.11.0rc1" } } } diff --git a/frameworks/Python/bareasgi/requirements.txt b/frameworks/Python/bareasgi/requirements.txt index 4a81ab13c0a..18330880fea 100644 --- a/frameworks/Python/bareasgi/requirements.txt +++ b/frameworks/Python/bareasgi/requirements.txt @@ -8,7 +8,7 @@ hpack==4.0.0 hypercorn==0.14.3 hyperframe==6.0.1 jetblack-asgi-typing==0.4.0 -Jinja2==3.1.2 +Jinja2==3.1.3 MarkupSafe==2.1.1 orjson==3.8.0 priority==2.0.0 diff --git a/frameworks/Python/blacksheep/requirements.txt b/frameworks/Python/blacksheep/requirements.txt index c1a8d3d22a3..2965fca87aa 100644 --- a/frameworks/Python/blacksheep/requirements.txt +++ b/frameworks/Python/blacksheep/requirements.txt @@ -1,4 +1,4 @@ asyncpg==0.27.0 -Jinja2==3.1.2 +Jinja2==3.1.3 blacksheep==1.2.13 ujson==5.7.0 diff --git a/frameworks/Python/django/requirements.txt b/frameworks/Python/django/requirements.txt index a337c00f8d9..d5f982d585e 100644 --- a/frameworks/Python/django/requirements.txt +++ b/frameworks/Python/django/requirements.txt @@ -1,4 +1,4 @@ -Django==3.2.23 +Django==3.2.25 mysqlclient==1.4.6 psycopg2==2.9.6; implementation_name=='cpython' psycopg2cffi==2.9.0; implementation_name=='pypy' diff --git a/frameworks/Python/falcon/requirements.txt b/frameworks/Python/falcon/requirements.txt index 4e7ea05ad81..81c0d6ee5de 100644 --- a/frameworks/Python/falcon/requirements.txt +++ b/frameworks/Python/falcon/requirements.txt @@ -1,2 +1,2 @@ falcon==3.1.1 -jinja2==3.0.3 +jinja2==3.1.3 diff --git a/frameworks/Python/fastapi/requirements-socketify-pypy.txt b/frameworks/Python/fastapi/requirements-socketify-pypy.txt index 76a50bee96a..8882bf571a5 100644 --- a/frameworks/Python/fastapi/requirements-socketify-pypy.txt +++ b/frameworks/Python/fastapi/requirements-socketify-pypy.txt @@ -1,2 +1,2 @@ -fastapi==0.92.0 +fastapi==0.109.1 git+https://github.com/cirospaciari/socketify.py.git@main#socketify \ No newline at end of file diff --git a/frameworks/Python/fastapi/requirements-socketify.txt b/frameworks/Python/fastapi/requirements-socketify.txt index 03e6d8df2d2..5f4e0c71b78 100644 --- a/frameworks/Python/fastapi/requirements-socketify.txt +++ b/frameworks/Python/fastapi/requirements-socketify.txt @@ -1,3 +1,3 @@ orjson==3.8.7 -fastapi==0.92.0 +fastapi==0.109.1 git+https://github.com/cirospaciari/socketify.py.git@main#socketify \ No newline at end of file diff --git a/frameworks/Python/fastapi/requirements.txt b/frameworks/Python/fastapi/requirements.txt index fb2fbfdbf25..02ea2224c34 100644 --- a/frameworks/Python/fastapi/requirements.txt +++ b/frameworks/Python/fastapi/requirements.txt @@ -1,4 +1,4 @@ asyncpg==0.27.0 -fastapi==0.93.0 -Jinja2==3.1.2 +fastapi==0.109.1 +Jinja2==3.1.3 ujson==5.7.0 diff --git a/frameworks/Python/fastwsgi/requirements.txt b/frameworks/Python/fastwsgi/requirements.txt index 8b326799874..6fb55802cfd 100644 --- a/frameworks/Python/fastwsgi/requirements.txt +++ b/frameworks/Python/fastwsgi/requirements.txt @@ -3,6 +3,6 @@ ujson==5.7.0 #fastwsgi==0.0.9 git+https://github.com/jamesroberts/fastwsgi.git@5572bb31b859d690be225707b9e7e25af397544b asyncpg==0.27.0 -Jinja2==3.1.2 +Jinja2==3.1.3 cachetools==5.3.0 asyncache==0.3.1 diff --git a/frameworks/Python/flask/requirements.txt b/frameworks/Python/flask/requirements.txt index 2865cf8986a..a563bd2770b 100644 --- a/frameworks/Python/flask/requirements.txt +++ b/frameworks/Python/flask/requirements.txt @@ -6,7 +6,7 @@ psycopg2-binary==2.9.3; implementation_name=='cpython' psycopg2-pool==1.1; implementation_name=='cpython' psycopg2cffi==2.9.0; implementation_name=='pypy' itsdangerous==2.1.2 -Jinja2==3.0.3 +Jinja2==3.1.3 MarkupSafe==2.1.2 ujson==5.4.0 orjson==3.8.7; implementation_name=='cpython' diff --git a/frameworks/Python/granian/requirements.txt b/frameworks/Python/granian/requirements.txt index 601bdc3e401..68519dc8ae7 100644 --- a/frameworks/Python/granian/requirements.txt +++ b/frameworks/Python/granian/requirements.txt @@ -1,4 +1,4 @@ asyncpg==0.27.0 granian>=0.7.0,<0.8.0 -jinja2==3.1.2 +jinja2==3.1.3 orjson==3.9.10 diff --git a/frameworks/Python/heaven/requirements.txt b/frameworks/Python/heaven/requirements.txt index 3e8a09ee6f7..d3a26597539 100644 --- a/frameworks/Python/heaven/requirements.txt +++ b/frameworks/Python/heaven/requirements.txt @@ -1,4 +1,4 @@ asyncpg==0.29.0 heaven==0.2.4 -orjson==3.9.10 +orjson==3.9.15 gunicorn==20.1.0 diff --git a/frameworks/Python/microdot/README.md b/frameworks/Python/microdot/README.md index 9aefbcba3a3..c52da3793b9 100644 --- a/frameworks/Python/microdot/README.md +++ b/frameworks/Python/microdot/README.md @@ -8,20 +8,13 @@ Also note that there is additional information provided in the [Python README](. ### Test Source Code -* [JSON](app_sync.py#L60) -* [JSON-async](app_async.py#L60) -* [PLAINTEXT](app_sync.py#L102) -* [PLAINTEXT-async](app_async.py#L102) -* [DB](app_sync.py#L65) -* [DB-async](app_async.py#L65) -* [QUERY](app_sync.py#L73) -* [QUERY-async](app_async.py#L83) -* [CACHED QUERY](app_sync.py#L112) -* [CACHED_QUERY-async](app_async.py#L112) -* [UPDATE](app_sync.py#L89) -* [UPDATE-async](app_async.py#L89) -* [FORTUNES](app_sync.py#L80) -* [FORTUNES-async](app_async.py#L80) +* [JSON](app.py#L60) +* [PLAINTEXT](app.py#L102) +* [DB](app.py#L65) +* [QUERY](app.py#L73) +* [CACHED QUERY](app.py#L112) +* [UPDATE](app.py#L89) +* [FORTUNES](app.py#L80) ## Resources diff --git a/frameworks/Python/microdot/app_async.py b/frameworks/Python/microdot/app.py similarity index 76% rename from frameworks/Python/microdot/app_async.py rename to frameworks/Python/microdot/app.py index 428491ce3d6..a60c7edc98c 100644 --- a/frameworks/Python/microdot/app_async.py +++ b/frameworks/Python/microdot/app.py @@ -1,42 +1,42 @@ #!/usr/bin/env python -from datetime import datetime import os from random import randint, sample -from alchemical.aio import Alchemical -import sqlalchemy as sqla +from alchemical.aio import Alchemical, Model +import sqlalchemy.orm as so from asyncache import cached from cachetools.keys import hashkey -from microdot_asgi import Microdot -from microdot_jinja import render_template +from microdot.asgi import Microdot +from microdot.jinja import Template app = Microdot() -db = Alchemical(os.environ['DATABASE_URL']) +Template.initialize('templates', enable_async=True) +db = Alchemical(os.environ.get('DATABASE_URL', 'sqlite:///')) -class World(db.Model): +class World(Model): __tablename__ = "world" - id = sqla.Column(sqla.Integer, primary_key=True) - randomnumber = sqla.Column(sqla.Integer) + id: so.Mapped[int] = so.mapped_column(primary_key=True) + randomnumber: so.Mapped[int] def to_dict(self): return {"id": self.id, "randomNumber": self.randomnumber} -class CachedWorld(db.Model): +class CachedWorld(Model): __tablename__ = "cachedworld" - id = sqla.Column(sqla.Integer, primary_key=True) - randomnumber = sqla.Column(sqla.Integer) + id: so.Mapped[int] = so.mapped_column(primary_key=True) + randomnumber: so.Mapped[int] def to_dict(self): return {"id": self.id, "randomNumber": self.randomnumber} -class Fortune(db.Model): +class Fortune(Model): __tablename__ = "fortune" - id = sqla.Column(sqla.Integer, primary_key=True) - message = sqla.Column(sqla.String) + id: so.Mapped[int] = so.mapped_column(primary_key=True) + message: so.Mapped[str] def get_num_queries(request, name="queries"): @@ -81,7 +81,10 @@ async def test_fortunes(request): fortunes = list(await session.scalars(Fortune.select())) fortunes.append(Fortune(id=0, message="Additional fortune added at request time.")) fortunes.sort(key=lambda f: f.message) - return render_template("fortunes.html", fortunes=fortunes), {'Content-Type': 'text/html; charset=utf-8'} + return ( + await Template("fortunes.html").render_async(fortunes=fortunes), + {'Content-Type': 'text/html; charset=utf-8'}, + ) @app.route("/updates") diff --git a/frameworks/Python/microdot/app_async_raw.py b/frameworks/Python/microdot/app_raw.py similarity index 92% rename from frameworks/Python/microdot/app_async_raw.py rename to frameworks/Python/microdot/app_raw.py index d6368bc6826..9aa8a7ab362 100644 --- a/frameworks/Python/microdot/app_async_raw.py +++ b/frameworks/Python/microdot/app_raw.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -from datetime import datetime import os from random import randint, sample @@ -7,15 +6,18 @@ from asyncache import cached from cachetools.keys import hashkey -from microdot_asgi import Microdot -from microdot_jinja import render_template +from microdot.asgi import Microdot +from microdot.jinja import Template app = Microdot() +Template.initialize('templates', enable_async=True) + get_world_sql = 'SELECT id, randomnumber FROM world WHERE id = $1' update_world_sql = 'UPDATE world SET randomnumber = $1 WHERE id = $2' fortune_sql = 'SELECT * FROM fortune' db = None + async def asgi(scope, receive, send): if scope['type'] == 'lifespan': while True: @@ -81,7 +83,10 @@ async def test_fortunes(request): fortunes = list(await conn.fetch(fortune_sql)) fortunes.append((0, "Additional fortune added at request time.")) fortunes.sort(key=lambda f: f[1]) - return render_template("fortunes_raw.html", fortunes=fortunes), {'Content-Type': 'text/html; charset=utf-8'} + return ( + await Template("fortunes_raw.html").render_async(fortunes=fortunes), + {'Content-Type': 'text/html; charset=utf-8'}, + ) @app.route("/updates") diff --git a/frameworks/Python/microdot/app_sync.py b/frameworks/Python/microdot/app_sync.py deleted file mode 100644 index 546f4eb649b..00000000000 --- a/frameworks/Python/microdot/app_sync.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python -from datetime import datetime -from functools import lru_cache -import os -from random import randint, sample - -from alchemical import Alchemical -import sqlalchemy as sqla -from cachetools import cached -from cachetools.keys import hashkey - -from microdot_wsgi import Microdot -from microdot_jinja import render_template - -app = Microdot() -db = Alchemical(os.environ['DATABASE_URL']) - - -class World(db.Model): - __tablename__ = "world" - id = sqla.Column(sqla.Integer, primary_key=True) - randomnumber = sqla.Column(sqla.Integer) - - def to_dict(self): - return {"id": self.id, "randomNumber": self.randomnumber} - - -class CachedWorld(db.Model): - __tablename__ = "cachedworld" - id = sqla.Column(sqla.Integer, primary_key=True) - randomnumber = sqla.Column(sqla.Integer) - - def to_dict(self): - return {"id": self.id, "randomNumber": self.randomnumber} - - -class Fortune(db.Model): - __tablename__ = "fortune" - id = sqla.Column(sqla.Integer, primary_key=True) - message = sqla.Column(sqla.String) - - -def get_num_queries(request, name="queries"): - try: - num_queries = request.args.get(name, 1, type=int) - except ValueError: - num_queries = 1 - if num_queries < 1: - return 1 - if num_queries > 500: - return 500 - return num_queries - - -def generate_ids(num_queries): - return sample(range(1, 10001), num_queries) - - -@app.route("/json") -def test_json(request): - return {"message": "Hello, World!"} - - -@app.route("/db") -def test_db(request): - id = randint(1, 10000) - with db.Session() as session: - world = session.get(World, id) - return world.to_dict() - - -@app.route("/queries") -def test_queries(request): - with db.Session() as session: - worlds = [session.get(World, id).to_dict() for id in generate_ids(get_num_queries(request))] - return worlds - - -@app.route("/fortunes") -def test_fortunes(request): - with db.Session() as session: - fortunes = list(session.scalars(Fortune.select())) - fortunes.append(Fortune(id=0, message="Additional fortune added at request time.")) - fortunes.sort(key=lambda f: f.message) - return render_template("fortunes.html", fortunes=fortunes), {'Content-Type': 'text/html; charset=utf-8'} - - -@app.route("/updates") -def test_updates(request): - worlds = [] - ids = generate_ids(get_num_queries(request)) - ids.sort() # to avoid deadlocks - with db.begin() as session: - for id in ids: - world = session.get(World, id) - world.randomnumber = (randint(1, 9999) + world.randomnumber - 1) % 10000 + 1 - worlds.append(world.to_dict()) - return worlds - - -@app.route("/plaintext") -def test_plaintext(request): - return b"Hello, World!" - - -@cached(cache={}, key=lambda session, id: hashkey(id)) -def get_cached_world(session, id): - return session.get(World, id).to_dict() - - -@app.route("/cached-queries") -def test_cached_queries(request): - with db.Session() as session: - worlds = [get_cached_world(session, id) for id in generate_ids(get_num_queries(request, 'count'))] - return worlds diff --git a/frameworks/Python/microdot/app_sync_raw.py b/frameworks/Python/microdot/app_sync_raw.py deleted file mode 100644 index 29edc250fae..00000000000 --- a/frameworks/Python/microdot/app_sync_raw.py +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env python -from datetime import datetime -from functools import lru_cache -import os -from random import randint, sample - -from microdot_wsgi import Microdot -from microdot_jinja import render_template -import psycopg2 -from psycopg2.extras import execute_batch -from cachetools import cached -from cachetools.keys import hashkey - -app = Microdot() -db = psycopg2.connect(os.environ['DATABASE_URL']) - -get_world_sql = 'SELECT id, randomnumber FROM world WHERE id = $1' -update_world_sql = 'UPDATE world SET randomnumber = $1 WHERE id = $2' -fortune_sql = 'SELECT * FROM fortune' -with db.cursor() as cur: - cur.execute('PREPARE get_world AS ' + get_world_sql) - cur.execute('PREPARE update_world AS ' + update_world_sql) - cur.execute('PREPARE fortune AS ' + fortune_sql) - - -def get_num_queries(request, name="queries"): - try: - num_queries = request.args.get(name, 1, type=int) - except ValueError: - num_queries = 1 - if num_queries < 1: - return 1 - if num_queries > 500: - return 500 - return num_queries - - -def generate_ids(num_queries): - return sample(range(1, 10001), num_queries) - - -@app.route("/json") -def test_json(request): - return {"message": "Hello, World!"} - - -@app.route("/db") -def test_db(request): - id = randint(1, 10000) - with db.cursor() as cur: - cur.execute('EXECUTE get_world (%s)', (id,)) - result = cur.fetchone() - world = {'id': result[0], 'randomNumber': result[1]} - return world - - -def get_world(cur, id): - cur.execute('EXECUTE get_world (%s)', (id,)) - result = cur.fetchone() - return {'id': result[0], 'randomNumber': result[1]} - - -@app.route("/queries") -def test_queries(request): - with db.cursor() as cur: - worlds = [get_world(cur, id) for id in generate_ids(get_num_queries(request))] - return worlds - - -@app.route("/fortunes") -def test_fortunes(request): - with db.cursor() as cur: - cur.execute('EXECUTE fortune') - fortunes = list(cur.fetchall()) - fortunes.append((0, 'Additional fortune added at request time.')) - fortunes.sort(key=lambda f: f[1]) - return render_template("fortunes_raw.html", fortunes=fortunes), {'Content-Type': 'text/html; charset=utf-8'} - - -@app.route("/updates") -def test_updates(request): - worlds = [] - updated_worlds = [] - with db.cursor() as cur: - for id in generate_ids(get_num_queries(request)): - cur.execute('EXECUTE get_world (%s)', (id,)) - result = cur.fetchone() - new_value = randint(1, 10000) - updated_worlds.append((new_value, result[0])) - worlds.append({'id': result[0], 'randomNumber': new_value}) - execute_batch(cur, 'EXECUTE update_world (%s, %s)', updated_worlds) - db.commit() - return worlds - - -@app.route("/plaintext") -def test_plaintext(request): - return b"Hello, World!" - - -@cached(cache={}, key=lambda cur, id: hashkey(id)) -def get_cached_world(cur, id): - cur.execute('EXECUTE get_world (%s)', (id,)) - result = cur.fetchone() - return {'id': result[0], 'randomNumber': result[1]} - - -@app.route("/cached-queries") -def test_cached_queries(request): - with db.cursor() as cur: - worlds = [get_cached_world(cur, id) for id in generate_ids(get_num_queries(request, 'count'))] - return worlds diff --git a/frameworks/Python/microdot/benchmark_config.json b/frameworks/Python/microdot/benchmark_config.json index d1c696c33ea..712e89b44b9 100644 --- a/frameworks/Python/microdot/benchmark_config.json +++ b/frameworks/Python/microdot/benchmark_config.json @@ -19,14 +19,14 @@ "flavor": "None", "orm": "Full", "platform": "None", - "webserver": "Gunicorn", + "webserver": "Uvicorn", "os": "Linux", "database_os": "Linux", - "display_name": "Microdot-WSGI", + "display_name": "Microdot", "notes": "", "versus": "None" }, - "async": { + "raw": { "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", @@ -46,51 +46,7 @@ "webserver": "Uvicorn", "os": "Linux", "database_os": "Linux", - "display_name": "Microdot-ASGI", - "notes": "", - "versus": "None" - }, - "raw": { - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "update_url": "/updates?queries=", - "cached_query_url": "/cached-queries?count=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "postgres", - "framework": "Microdot", - "language": "Python", - "flavor": "None", - "orm": "Raw", - "platform": "None", - "webserver": "Gunicorn", - "os": "Linux", - "database_os": "Linux", - "display_name": "Microdot-WSGI-Raw", - "notes": "", - "versus": "None" - }, - "async-raw": { - "db_url": "/db", - "query_url": "/queries?queries=", - "fortune_url": "/fortunes", - "update_url": "/updates?queries=", - "cached_query_url": "/cached-queries?count=", - "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "postgres", - "framework": "Microdot", - "language": "Python", - "flavor": "None", - "orm": "Raw", - "platform": "None", - "webserver": "Uvicorn", - "os": "Linux", - "database_os": "Linux", - "display_name": "Microdot-ASGI-Raw", + "display_name": "Microdot-Raw", "notes": "", "versus": "None" } diff --git a/frameworks/Python/microdot/gunicorn_conf.py b/frameworks/Python/microdot/gunicorn_conf.py deleted file mode 100644 index 525911bf39e..00000000000 --- a/frameworks/Python/microdot/gunicorn_conf.py +++ /dev/null @@ -1,15 +0,0 @@ -import multiprocessing -import os -import sys - -_is_pypy = hasattr(sys, "pypy_version_info") -_is_travis = os.environ.get("TRAVIS") == "true" - -workers = int(multiprocessing.cpu_count() * 4) -if _is_travis: - workers = 2 - -bind = "0.0.0.0:8080" -keepalive = 120 -errorlog = "-" -pidfile = "gunicorn.pid" diff --git a/frameworks/Python/microdot/microdot-async-raw.dockerfile b/frameworks/Python/microdot/microdot-async-raw.dockerfile deleted file mode 100644 index d238d7a909a..00000000000 --- a/frameworks/Python/microdot/microdot-async-raw.dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.11-buster - -RUN apt-get update -RUN apt-get install libpq-dev python3-dev -y -ADD ./requirements.txt /microdot/requirements.txt -RUN pip3 install -r /microdot/requirements.txt -ADD ./ /microdot -WORKDIR /microdot - -ENV PYTHONUNBUFFERED 1 -ENV DATABASE_URL postgresql://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world - -EXPOSE 8080 - -CMD gunicorn app_async_raw:asgi -c uvicorn_conf.py diff --git a/frameworks/Python/microdot/microdot-async.dockerfile b/frameworks/Python/microdot/microdot-async.dockerfile deleted file mode 100644 index 87f96776066..00000000000 --- a/frameworks/Python/microdot/microdot-async.dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.11-buster - -RUN apt-get update -RUN apt-get install libpq-dev python3-dev -y -ADD ./requirements.txt /microdot/requirements.txt -RUN pip3 install -r /microdot/requirements.txt -ADD ./ /microdot -WORKDIR /microdot - -ENV PYTHONUNBUFFERED 1 -ENV DATABASE_URL postgresql://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world - -EXPOSE 8080 - -CMD gunicorn app_async:app -c uvicorn_conf.py diff --git a/frameworks/Python/microdot/microdot-raw.dockerfile b/frameworks/Python/microdot/microdot-raw.dockerfile index 6d14a41e20d..e5501998e14 100644 --- a/frameworks/Python/microdot/microdot-raw.dockerfile +++ b/frameworks/Python/microdot/microdot-raw.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-buster +FROM python:3.12-slim RUN apt-get update RUN apt-get install libpq-dev python3-dev -y @@ -8,8 +8,8 @@ ADD ./ /microdot WORKDIR /microdot ENV PYTHONUNBUFFERED 1 -ENV DATABASE_URL "host=tfb-database port=5432 user=benchmarkdbuser password=benchmarkdbpass dbname=hello_world" +ENV DATABASE_URL postgresql://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world EXPOSE 8080 -CMD gunicorn app_sync_raw:app -c gunicorn_conf.py +CMD gunicorn app_raw:asgi -c uvicorn_conf.py diff --git a/frameworks/Python/microdot/microdot.dockerfile b/frameworks/Python/microdot/microdot.dockerfile index 01db2e263b1..a47b8e74026 100644 --- a/frameworks/Python/microdot/microdot.dockerfile +++ b/frameworks/Python/microdot/microdot.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-buster +FROM python:3.12-slim RUN apt-get update RUN apt-get install libpq-dev python3-dev -y @@ -12,4 +12,4 @@ ENV DATABASE_URL postgresql://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/ EXPOSE 8080 -CMD gunicorn app_sync:app -c gunicorn_conf.py +CMD gunicorn app:app -c uvicorn_conf.py diff --git a/frameworks/Python/microdot/requirements.txt b/frameworks/Python/microdot/requirements.txt index 05a4c8c3f2c..4d928335e33 100644 --- a/frameworks/Python/microdot/requirements.txt +++ b/frameworks/Python/microdot/requirements.txt @@ -7,6 +7,6 @@ cachetools asyncache alchemical -microdot<2 +microdot>=2.0.1 gunicorn uvicorn[standard] diff --git a/frameworks/Python/microdot/uvicorn_conf.py b/frameworks/Python/microdot/uvicorn_conf.py index 9faf6f02064..5f410a49eb3 100644 --- a/frameworks/Python/microdot/uvicorn_conf.py +++ b/frameworks/Python/microdot/uvicorn_conf.py @@ -1,6 +1,5 @@ import multiprocessing import os -import sys _is_travis = os.environ.get("TRAVIS") == "true" diff --git a/frameworks/Python/mrhttp/README.md b/frameworks/Python/mrhttp/README.md new file mode 100644 index 00000000000..ab294b9a94c --- /dev/null +++ b/frameworks/Python/mrhttp/README.md @@ -0,0 +1,20 @@ +# MrHTTP Benchmark Test + +This is the MrHTTP portion of a [benchmarking tests suite](../../) +comparing a variety of web development platforms. + +The information below is specific to MrHTTP. For further guidance, +review the [documentation](https://github.com/TechEmpower/FrameworkBenchmarks/wiki). +Also note that there is additional information provided in +the [Python README](../). + +## Description + +[MrHTTP](https://github.com/MarkReedZ/mrhttp) is an asynchronous web framework for python 3.5+ written in C that has hit 8.5 million requests per second. + +## Test Paths & Sources + +All of the test implementations are located within a single file ([app.py](app.py)). + +* [JSON Serialization](app.py): "/json" +* [Plaintext](app.py): "/plaintext" diff --git a/frameworks/Python/mrhttp/app.py b/frameworks/Python/mrhttp/app.py new file mode 100644 index 00000000000..2e91f309f25 --- /dev/null +++ b/frameworks/Python/mrhttp/app.py @@ -0,0 +1,18 @@ + +import multiprocessing +import mrhttp +import mrjson as json + +app = mrhttp.Application() + +@app.route('/json', _type="json") +def j(r): + return json.dumps({'message': 'Hello, world!'}) + +@app.route('/plaintext', _type="text", options=['cache']) +def p(r): + return "Hello, world!" + + +app.run('0.0.0.0', 8080, cores=multiprocessing.cpu_count()) + diff --git a/frameworks/Python/mrhttp/benchmark_config.json b/frameworks/Python/mrhttp/benchmark_config.json new file mode 100644 index 00000000000..8303a252e1f --- /dev/null +++ b/frameworks/Python/mrhttp/benchmark_config.json @@ -0,0 +1,23 @@ +{ + "framework": "mrhttp", + "tests": [{ + "default": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "framework": "mrhttp", + "language": "Python", + "flavor": "Python3", + "platform": "None", + "webserver": "None", + "os": "Linux", + "orm": "Raw", + "database_os": "Linux", + "database": "None", + "display_name": "MrHTTP", + "notes": "" + } + }] +} diff --git a/frameworks/Python/mrhttp/config.toml b/frameworks/Python/mrhttp/config.toml new file mode 100644 index 00000000000..f9c36bcfa78 --- /dev/null +++ b/frameworks/Python/mrhttp/config.toml @@ -0,0 +1,15 @@ +[framework] +name = "mrhttp" + +[main] +urls.plaintext = "/plaintext" +urls.json = "/json" +approach = "Realistic" +classification = "Micro" +database = "None" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "None" +webserver = "None" +versus = "None" diff --git a/frameworks/Python/mrhttp/mrhttp.dockerfile b/frameworks/Python/mrhttp/mrhttp.dockerfile new file mode 100644 index 00000000000..a8cb1e5b201 --- /dev/null +++ b/frameworks/Python/mrhttp/mrhttp.dockerfile @@ -0,0 +1,13 @@ + +FROM python:3.8.12 + +ADD ./ /mrhttp + +WORKDIR /mrhttp + +RUN pip3 install -r /mrhttp/requirements.txt + +EXPOSE 8080 + +CMD python3 app.py + diff --git a/frameworks/Python/mrhttp/requirements.txt b/frameworks/Python/mrhttp/requirements.txt new file mode 100644 index 00000000000..047961f9463 --- /dev/null +++ b/frameworks/Python/mrhttp/requirements.txt @@ -0,0 +1,6 @@ +asyncpg==0.25.0 +mrjson==1.4 +ujson==5.4.0 +mrpacker==1.5 +mrhttp==0.12 +uvloop==0.19.0 diff --git a/frameworks/Python/panther/README.md b/frameworks/Python/panther/README.md new file mode 100644 index 00000000000..c1edfd4f5b7 --- /dev/null +++ b/frameworks/Python/panther/README.md @@ -0,0 +1,36 @@ +# Panther Benchmark Test + +This is the Panther portion of a [benchmarking tests suite](../../) +comparing a variety of web development platforms. + +The information below is specific to Panther. For further guidance, +review the [documentation](https://github.com/TechEmpower/FrameworkBenchmarks/wiki). +Also note that there is additional information provided in +the [Python README](../). + +## Description + +[Panther](https://pantherpy.github.io/) Is A Fast & Friendly Web Framework For Building Async APIs With Python 3.10+ +

+ logo +

+ + +## Implementation + +All tests are implemented in a single file ([app.py](app.py)). + +* [JSON](app.py): "/json" +* [DB](app.py): "/db" +* [QUERY](app.py): "/queries?=#"* +* [FORTUNES](app.py): "/fortunes" +* [UPDATE](app.py): "/updates?queries=#"* +* [Plaintext](app.py): "/plaintext" + +*Replace # with an actual number. + +## Resources + +* [GitHub](https://github.com/AliRn76/Panther) +* [Documentation](https://pantherpy.github.io) +* [PyPI](https://pypi.org/project/panther) diff --git a/frameworks/Python/panther/app.py b/frameworks/Python/panther/app.py new file mode 100644 index 00000000000..b3f712cd979 --- /dev/null +++ b/frameworks/Python/panther/app.py @@ -0,0 +1,132 @@ +import multiprocessing +import os +from random import randint, sample + +import asyncpg +import jinja2 +from panther import Panther +from panther.app import API +from panther.request import Request +from panther.response import Response, PlainTextResponse, HTMLResponse + +READ_ROW_SQL = 'SELECT "id", "randomnumber" FROM "world" WHERE id = $1' +WRITE_ROW_SQL = 'UPDATE "world" SET "randomnumber"=$1 WHERE id=$2' +ADDITIONAL_ROW = [0, 'Additional fortune added at request time.'] +MAX_POOL_SIZE = 1000 // multiprocessing.cpu_count() +MIN_POOL_SIZE = max(int(MAX_POOL_SIZE / 2), 1) + +pool = None + + +async def create_db_pool(): + global pool + pool = await asyncpg.create_pool( + user='benchmarkdbuser', + password='benchmarkdbpass', + database='hello_world', + host='tfb-database', + port=5432, + min_size=MIN_POOL_SIZE, + max_size=MAX_POOL_SIZE, + ) + + +async def clean_db_pool(): + await pool.close() + + +def load_fortunes_template(): + path = os.path.join('templates', 'fortune.html') + with open(path, 'r') as template_file: + template_text = template_file.read() + return jinja2.Template(template_text) + + +fortune_template = load_fortunes_template() + + +def get_num_queries(request): + value = request.query_params.get('queries') + if value is None: + return 1 + + try: + query_count = int(value) + except ValueError: + return 1 + if query_count < 1: + return 1 + if query_count > 500: + return 500 + return query_count + + +@API() +async def json_serialization(): + return Response(data={'message': 'Hello, world!'}) + + +@API() +async def single_database_query(): + row_id = randint(1, 10000) + async with pool.acquire() as connection: + number = await connection.fetchval(READ_ROW_SQL, row_id) + return Response(data={'id': row_id, 'randomNumber': number}) + + +@API() +async def multiple_database_queries(request: Request): + num_queries = get_num_queries(request) + row_ids = sample(range(1, 10000), num_queries) + + async with pool.acquire() as connection: + statement = await connection.prepare(READ_ROW_SQL) + worlds = [{'id': i, 'randomNumber': await statement.fetchval(i)} for i in row_ids] + + return Response(data=worlds) + + +@API() +async def fortunes(): + async with pool.acquire() as connection: + fortune_records = await connection.fetch('SELECT * FROM Fortune') + fortune_records.append(ADDITIONAL_ROW) + fortune_records.sort(key=lambda row: row[1]) + data = fortune_template.render(fortunes=fortune_records) + return HTMLResponse(data=data) + + +@API() +async def database_updates(request: Request): + num_queries = get_num_queries(request) + ids = sorted(sample(range(1, 10000 + 1), num_queries)) + numbers = sorted(sample(range(1, 10000), num_queries)) + updates = list(zip(ids, numbers)) + + worlds = [ + {'id': row_id, 'randomNumber': number} for row_id, number in updates + ] + + async with pool.acquire() as connection: + statement = await connection.prepare(READ_ROW_SQL) + for row_id, _ in updates: + await statement.fetchval(row_id) + await connection.executemany(WRITE_ROW_SQL, updates) + return Response(data=worlds) + + +@API() +async def plaintext(): + return PlainTextResponse(b'Hello, world!') + + +url_routing = { + 'json': json_serialization, + 'db': single_database_query, + 'queries': multiple_database_queries, + 'fortunes': fortunes, + 'updates': database_updates, + 'plaintext': plaintext, +} + +app = Panther(__name__, configs=__name__, urls=url_routing, startup=create_db_pool, shutdown=clean_db_pool) diff --git a/frameworks/Python/panther/benchmark_config.json b/frameworks/Python/panther/benchmark_config.json new file mode 100644 index 00000000000..3de0b7a0974 --- /dev/null +++ b/frameworks/Python/panther/benchmark_config.json @@ -0,0 +1,28 @@ +{ + "framework": "panther", + "tests": [{ + "default": { + "json_url": "/json", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "framework": "panther", + "language": "Python", + "flavor": "Python3", + "platform": "ASGI", + "webserver": "Uvicorn", + "os": "Linux", + "orm": "Raw", + "database_os": "Linux", + "database": "Postgres", + "display_name": "Panther", + "versus": "None", + "notes": "" + } + }] +} diff --git a/frameworks/Nim/basolato/config.toml b/frameworks/Python/panther/config.toml similarity index 62% rename from frameworks/Nim/basolato/config.toml rename to frameworks/Python/panther/config.toml index 47594b7293f..f556e171a19 100644 --- a/frameworks/Nim/basolato/config.toml +++ b/frameworks/Python/panther/config.toml @@ -1,5 +1,5 @@ [framework] -name = "basolato" +name = "panther" [main] urls.plaintext = "/plaintext" @@ -9,11 +9,11 @@ urls.query = "/queries?queries=" urls.update = "/updates?queries=" urls.fortune = "/fortunes" approach = "Realistic" -classification = "Fullstack" -database = "postgres" +classification = "Micro" +database = "Postgres" database_os = "Linux" os = "Linux" -orm = "Full" -platform = "httpbeast" -webserver = "None" -versus = "jester" +orm = "Raw" +platform = "ASGI" +webserver = "Uvicorn" +versus = "None" diff --git a/frameworks/Python/panther/panther.dockerfile b/frameworks/Python/panther/panther.dockerfile new file mode 100644 index 00000000000..31ec0377429 --- /dev/null +++ b/frameworks/Python/panther/panther.dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11-bullseye + +WORKDIR /panther + +COPY ./ /panther + +RUN pip3 install -U pip +RUN pip3 install -r /panther/requirements.txt + +EXPOSE 8080 + +CMD gunicorn app:app -k uvicorn.workers.UvicornWorker -c panther_conf.py diff --git a/frameworks/Python/panther/panther_conf.py b/frameworks/Python/panther/panther_conf.py new file mode 100644 index 00000000000..f2176beb091 --- /dev/null +++ b/frameworks/Python/panther/panther_conf.py @@ -0,0 +1,14 @@ +import multiprocessing +import os + +_is_travis = os.environ.get('TRAVIS') == 'true' + +workers = multiprocessing.cpu_count() +if _is_travis: + workers = 2 + +bind = "0.0.0.0:8080" +keepalive = 120 +errorlog = '-' +pidfile = '/tmp/panther.pid' +loglevel = 'error' diff --git a/frameworks/Python/panther/requirements.txt b/frameworks/Python/panther/requirements.txt new file mode 100644 index 00000000000..38124b17faf --- /dev/null +++ b/frameworks/Python/panther/requirements.txt @@ -0,0 +1,11 @@ +panther==3.2.1 + +cython==3.0.6 +jinja2==3.1.2 + +asyncpg==0.29.0 + +gunicorn==21.2.0 +uvicorn==0.24.0 +uvloop==0.19.0 +httptools==0.6.1 diff --git a/frameworks/Python/panther/templates/fortune.html b/frameworks/Python/panther/templates/fortune.html new file mode 100644 index 00000000000..d9c26bfa96a --- /dev/null +++ b/frameworks/Python/panther/templates/fortune.html @@ -0,0 +1,14 @@ + + + + Fortunes + + + + + {% for fortune in fortunes %} + + {% endfor %} +
idmessage
{{ fortune[0] }}{{ fortune[1]|e }}
+ + diff --git a/frameworks/Python/pyramid/requirements.txt b/frameworks/Python/pyramid/requirements.txt index 9a4521e4b5a..73d07efbeb0 100644 --- a/frameworks/Python/pyramid/requirements.txt +++ b/frameworks/Python/pyramid/requirements.txt @@ -12,7 +12,7 @@ gunicorn==20.1.0 # via -r requirements.in hupper==1.10.3 # via pyramid -orjson==3.6.5 +orjson==3.9.15 # via -r requirements.in pastedeploy==2.1.1 # via plaster-pastedeploy @@ -38,9 +38,9 @@ venusian==3.0.0 # via pyramid webob==1.8.7 # via pyramid -zope.deprecation==4.4.0 +zope-deprecation==4.4.0 # via pyramid -zope.interface==5.4.0 +zope-interface==5.4.0 # via pyramid # The following packages are considered to be unsafe in a requirements file: diff --git a/frameworks/Python/quart/requirements.txt b/frameworks/Python/quart/requirements.txt index 7bb0976e5a0..9e99d39a225 100644 --- a/frameworks/Python/quart/requirements.txt +++ b/frameworks/Python/quart/requirements.txt @@ -8,7 +8,7 @@ hpack==4.0.0 hypercorn==0.14.2 hyperframe==6.0.1 itsdangerous==2.1.2 -Jinja2==3.1.2 +Jinja2==3.1.3 MarkupSafe==2.1.1 priority==2.0.0 quart==0.18.0 diff --git a/frameworks/Python/responder/requirements.txt b/frameworks/Python/responder/requirements.txt index 12b381c6b2f..79f0a4304ce 100644 --- a/frameworks/Python/responder/requirements.txt +++ b/frameworks/Python/responder/requirements.txt @@ -1,6 +1,6 @@ asyncpg==0.21.0 gunicorn==20.0.4 -Jinja2==2.11.3 +Jinja2==3.1.3 ujson==2.0.3 uvloop==0.17.0 httptools==0.5.0 diff --git a/frameworks/Python/robyn/app-const.py b/frameworks/Python/robyn/app-const.py index f6cce721132..e082ff1b129 100755 --- a/frameworks/Python/robyn/app-const.py +++ b/frameworks/Python/robyn/app-const.py @@ -1,7 +1,7 @@ import multiprocessing import os -from robyn import Robyn +from robyn import Response, Robyn, jsonify from robyn.argument_parser import Config @@ -21,8 +21,17 @@ def plaintext() -> str: return "Hello, world!" +@app.get("/json", const=True) +def json() -> str: + return Response( + status_code=200, + description=jsonify({"message": "Hello, world!"}), + headers={"Content-Type": "application/json"} + ) + + + if __name__ == "__main__": app.add_response_header("Server", "Robyn") - app.add_response_header("Content-Type", "text/plain") - app.start(url="0.0.0.0", port=8080) + app.start(host="0.0.0.0", port=8080) diff --git a/frameworks/Python/robyn/app.py b/frameworks/Python/robyn/app.py index 5e8aae14d81..798b67026e2 100755 --- a/frameworks/Python/robyn/app.py +++ b/frameworks/Python/robyn/app.py @@ -1,7 +1,7 @@ import multiprocessing import os -from robyn import Robyn +from robyn import Response, Robyn, jsonify from robyn.argument_parser import Config @@ -21,8 +21,15 @@ def plaintext() -> str: return "Hello, world!" -if __name__ == "__main__": - app.add_response_header("Server", "Robyn") - app.add_response_header("Content-Type", "text/plain") +@app.get("/json") +def json() -> str: + return Response( + status_code=200, + description=jsonify({"message": "Hello, world!"}), + headers={"Content-Type": "application/json"} + ) + - app.start(url="0.0.0.0", port=8080) +if __name__ == "__main__": + app.add_response_header("Server", "Roby1n") + app.start(host="0.0.0.0", port=8080) diff --git a/frameworks/Python/robyn/benchmark_config.json b/frameworks/Python/robyn/benchmark_config.json index 16a462b0768..3d8c6baa8a3 100755 --- a/frameworks/Python/robyn/benchmark_config.json +++ b/frameworks/Python/robyn/benchmark_config.json @@ -3,6 +3,7 @@ "tests": [ { "default": { + "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", @@ -19,6 +20,7 @@ "versus": "None" }, "const": { + "json_url": "/json", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", diff --git a/frameworks/Python/robyn/config.toml b/frameworks/Python/robyn/config.toml index b4bcd32194f..5fcc7591d68 100644 --- a/frameworks/Python/robyn/config.toml +++ b/frameworks/Python/robyn/config.toml @@ -3,6 +3,7 @@ name = "Robyn" [main] urls.plaintext = "/plaintext" +urls.json = "/json" approach = "Realistic" classification = "Micro" os = "Linux" @@ -13,6 +14,7 @@ versus = "None" [const] urls.plaintext = "/plaintext" +urls.json = "/json" approach = "Realistic" classification = "Micro" os = "Linux" diff --git a/frameworks/Python/robyn/requirements-const.txt b/frameworks/Python/robyn/requirements-const.txt index 49ff1ae519f..0056c1d2876 100644 --- a/frameworks/Python/robyn/requirements-const.txt +++ b/frameworks/Python/robyn/requirements-const.txt @@ -1,2 +1,2 @@ -uvloop==0.17.0 -robyn==0.37.0 +uvloop==0.19.0 +robyn==0.45.0 diff --git a/frameworks/Python/robyn/requirements.txt b/frameworks/Python/robyn/requirements.txt index 49ff1ae519f..0056c1d2876 100644 --- a/frameworks/Python/robyn/requirements.txt +++ b/frameworks/Python/robyn/requirements.txt @@ -1,2 +1,2 @@ -uvloop==0.17.0 -robyn==0.37.0 +uvloop==0.19.0 +robyn==0.45.0 diff --git a/frameworks/Python/robyn/robyn-const.dockerfile b/frameworks/Python/robyn/robyn-const.dockerfile index ab65d8de834..a12c64e248f 100644 --- a/frameworks/Python/robyn/robyn-const.dockerfile +++ b/frameworks/Python/robyn/robyn-const.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 +FROM python:3.12 ADD ./ /robyn diff --git a/frameworks/Python/robyn/robyn.dockerfile b/frameworks/Python/robyn/robyn.dockerfile index 5d0ecc64845..bc42b5be462 100644 --- a/frameworks/Python/robyn/robyn.dockerfile +++ b/frameworks/Python/robyn/robyn.dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9 +FROM python:3.12 ADD ./ /robyn diff --git a/frameworks/Python/routerling/requirements.txt b/frameworks/Python/routerling/requirements.txt index 7b68e45f102..4a11df1bc19 100644 --- a/frameworks/Python/routerling/requirements.txt +++ b/frameworks/Python/routerling/requirements.txt @@ -3,7 +3,7 @@ asyncpg==0.24.0 click==8.0.1 gunicorn==20.1.0 h11==0.12.0 -Jinja2==3.0.1 +Jinja2==3.1.3 MarkupSafe==2.0.1 routerling==0.3.1 ujson==5.4.0 diff --git a/frameworks/Python/sanic/requirements.txt b/frameworks/Python/sanic/requirements.txt index 36f8d2c8246..e118a108cc7 100644 --- a/frameworks/Python/sanic/requirements.txt +++ b/frameworks/Python/sanic/requirements.txt @@ -1,4 +1,4 @@ asyncpg==0.25.0 -Jinja2==3.1.2 +Jinja2==3.1.3 sanic==22.6.1 uvloop==0.16.0 diff --git a/frameworks/Python/starlette/requirements.txt b/frameworks/Python/starlette/requirements.txt index ec1b4acc589..6c1a7f01ed6 100644 --- a/frameworks/Python/starlette/requirements.txt +++ b/frameworks/Python/starlette/requirements.txt @@ -2,10 +2,10 @@ asyncpg==0.26.0 gunicorn==20.1.0 httptools==0.5.0 idna==3.3 -Jinja2==3.1.2 +Jinja2==3.1.3 MarkupSafe==2.1.1 python-dotenv==0.20.0 PyYAML==6.0 -starlette==0.27.0 +starlette==0.36.2 uvicorn==0.20.0 uvloop==0.17.0 diff --git a/frameworks/Python/uvicorn/requirements.txt b/frameworks/Python/uvicorn/requirements.txt index b75fdec808c..91523ce5164 100644 --- a/frameworks/Python/uvicorn/requirements.txt +++ b/frameworks/Python/uvicorn/requirements.txt @@ -1,7 +1,7 @@ asyncpg==0.28.0 gunicorn==20.1.0 httptools==0.6.0 -Jinja2==3.1.2 +Jinja2==3.1.3 ujson==5.8.0 uvloop==0.17.0 uvicorn==0.22.0 diff --git a/frameworks/Ruby/agoo/agoo.dockerfile b/frameworks/Ruby/agoo/agoo.dockerfile index cbd64cb1f69..b423b2b4f4d 100644 --- a/frameworks/Ruby/agoo/agoo.dockerfile +++ b/frameworks/Ruby/agoo/agoo.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 RUN apt-get update -q \ && apt-get install --no-install-recommends -q -y \ diff --git a/frameworks/Ruby/grape/Gemfile b/frameworks/Ruby/grape/Gemfile index 380df952afe..846757d6607 100644 --- a/frameworks/Ruby/grape/Gemfile +++ b/frameworks/Ruby/grape/Gemfile @@ -7,4 +7,5 @@ gem 'activerecord', '7.0.3', :require => 'active_record' gem 'activerecord-import', '1.4.0' gem 'grape', '1.6.2' gem 'rack', '2.2.3.1' -gem 'json', '2.6.2' +gem 'multi_json', require: 'multi_json' +gem 'oj', '~> 3.16' diff --git a/frameworks/Ruby/grape/README.md b/frameworks/Ruby/grape/README.md index a6cc29080a3..80bb63763a4 100644 --- a/frameworks/Ruby/grape/README.md +++ b/frameworks/Ruby/grape/README.md @@ -11,7 +11,7 @@ comparing a variety of web servers. ## Infrastructure Software Versions The tests were run with: -* [Ruby 3.3-rc1](http://www.ruby-lang.org/) +* [Ruby 3.3](http://www.ruby-lang.org/) * [Grape 1.6.2](http://www.ruby-grape.org/) * [Rack 2.2.3.1](https://rack.github.io/) * [Unicorn 6.1.0](https://yhbt.net/unicorn/) diff --git a/frameworks/Ruby/grape/config.ru b/frameworks/Ruby/grape/config.ru index 7ea5bc40e14..1bd2494c83f 100644 --- a/frameworks/Ruby/grape/config.ru +++ b/frameworks/Ruby/grape/config.ru @@ -1,6 +1,7 @@ require 'erb' require 'active_record' require 'yaml' +require_relative 'config/auto_tune' MAX_PK = 10_000 QUERIES_MIN = 1 diff --git a/frameworks/Ruby/grape/config/database.yml b/frameworks/Ruby/grape/config/database.yml index f69080e07bd..40b271b409a 100644 --- a/frameworks/Ruby/grape/config/database.yml +++ b/frameworks/Ruby/grape/config/database.yml @@ -5,5 +5,5 @@ production: database: hello_world username: benchmarkdbuser password: benchmarkdbpass - pool: 512 + pool: 2 timeout: 5000 diff --git a/frameworks/Ruby/grape/config/puma.rb b/frameworks/Ruby/grape/config/puma.rb index efde35cd784..b187587b799 100644 --- a/frameworks/Ruby/grape/config/puma.rb +++ b/frameworks/Ruby/grape/config/puma.rb @@ -4,7 +4,9 @@ num_workers, num_threads = auto_tune workers num_workers -threads num_threads, num_threads + +threads 2, 2 + # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write diff --git a/frameworks/Ruby/grape/config/unicorn.rb b/frameworks/Ruby/grape/config/unicorn.rb index 972e803e685..697d61d8016 100644 --- a/frameworks/Ruby/grape/config/unicorn.rb +++ b/frameworks/Ruby/grape/config/unicorn.rb @@ -1,6 +1,8 @@ require_relative 'auto_tune' -worker_processes, = auto_tune +num_workers, = auto_tune +worker_processes num_workers + listen "/tmp/unicorn.sock", :backlog => 4096 preload_app true diff --git a/frameworks/Ruby/grape/grape-unicorn.dockerfile b/frameworks/Ruby/grape/grape-unicorn.dockerfile index b7d800649ba..2b0e1ba1dc3 100644 --- a/frameworks/Ruby/grape/grape-unicorn.dockerfile +++ b/frameworks/Ruby/grape/grape-unicorn.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/grape/grape.dockerfile b/frameworks/Ruby/grape/grape.dockerfile index 76b45401ac9..ea90f27d262 100644 --- a/frameworks/Ruby/grape/grape.dockerfile +++ b/frameworks/Ruby/grape/grape.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile index 9b7c57be690..3274f168c87 100644 --- a/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile +++ b/frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile @@ -4,7 +4,7 @@ ARG H2O_PREFIX=/opt/h2o FROM "ubuntu:${UBUNTU_VERSION}" AS compile -ARG H2O_VERSION=13ba727ad12dfb2338165d2bcfb2136457e33c8a +ARG H2O_VERSION=18b175f71ede08b50d3e5ae8303dacef3ea510fc ARG DEBIAN_FRONTEND=noninteractive ARG H2O_PREFIX @@ -14,6 +14,7 @@ RUN apt-get -yqq update && \ cmake \ curl \ g++ \ + libbpfcc-dev \ libbrotli-dev \ libcap-dev \ libssl-dev \ @@ -23,6 +24,7 @@ RUN apt-get -yqq update && \ libz-dev \ ninja-build \ pkg-config \ + rsync \ ruby \ systemtap-sdt-dev && \ curl -LSs "https://github.com/h2o/h2o/archive/${H2O_VERSION}.tar.gz" | \ diff --git a/frameworks/Ruby/hanami/hanami.dockerfile b/frameworks/Ruby/hanami/hanami.dockerfile index 2230a6d4675..4fb8b4523f7 100644 --- a/frameworks/Ruby/hanami/hanami.dockerfile +++ b/frameworks/Ruby/hanami/hanami.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV BUNDLE_FORCE_RUBY_PLATFORM=true ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/rack-sequel/README.md b/frameworks/Ruby/rack-sequel/README.md index 1aa39b2b4a2..11563d8ffeb 100644 --- a/frameworks/Ruby/rack-sequel/README.md +++ b/frameworks/Ruby/rack-sequel/README.md @@ -12,10 +12,8 @@ a variety of web platforms. The tests will be run with: -* [Ruby 2.4](http://www.ruby-lang.org) -* [JRuby 9.1](http://jruby.org) -* [Rubinius 3](https://rubinius.com)\* -* [Puma 3](http://puma.io) +* [Ruby 3.3](http://www.ruby-lang.org) +* [Puma 6](http://puma.io) * [Passenger 5](https://www.phusionpassenger.com) * [Unicorn 5](https://bogomips.org/unicorn/) * [Rack 2](http://rack.rubyforge.org) diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile index 1264a3d67e7..381ea34a10b 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile index f4cec089ff8..d157b710c31 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile index b702ee0cc8b..68f6665bf74 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile index 490dce8730e..3737c034cda 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile index 3e03ab1d14a..846d25d0532 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile index 9da494ae34a..796978d6d52 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack/Gemfile b/frameworks/Ruby/rack/Gemfile index d92ca804595..137e71e099c 100644 --- a/frameworks/Ruby/rack/Gemfile +++ b/frameworks/Ruby/rack/Gemfile @@ -9,7 +9,7 @@ gem 'jdbc-postgres', '~> 42.2', platforms: :jruby, require: 'jdbc/postgres' gem 'json', '~> 2.6', platforms: :jruby gem 'oj', '~> 3.14', platforms: %i[ruby mswin] gem 'pg', '~>1.5', platforms: %i[ruby mswin] -gem 'puma', '~> 6.3' +gem 'puma', '~> 6.4' gem 'sequel' gem 'sequel_pg', platforms: %i[ruby mswin] gem 'tzinfo-data', '1.2023.3' diff --git a/frameworks/Ruby/rack/Gemfile.lock b/frameworks/Ruby/rack/Gemfile.lock index a6c921d3e6c..d8bc4105c68 100644 --- a/frameworks/Ruby/rack/Gemfile.lock +++ b/frameworks/Ruby/rack/Gemfile.lock @@ -47,7 +47,7 @@ GEM kgio (2.11.4) localhost (1.1.10) mapping (1.1.1) - nio4r (2.5.9) + nio4r (2.7.0) oj (3.14.2) openssl (3.1.0) parallel (1.23.0) @@ -67,9 +67,9 @@ GEM protocol-rack (0.2.4) protocol-http (~> 0.23) rack (>= 1.0) - puma (6.3.1) + puma (6.4.2) nio4r (~> 2.0) - rack (3.0.7) + rack (3.0.9.1) rack-test (2.1.0) rack (>= 1.3) rainbow (3.1.1) @@ -118,7 +118,7 @@ DEPENDENCIES json (~> 2.6) oj (~> 3.14) pg (~> 1.5) - puma (~> 6.3) + puma (~> 6.4) rack (~> 3.0) rack-test rubocop diff --git a/frameworks/Ruby/rack/README.md b/frameworks/Ruby/rack/README.md index 7bc67727fba..1f4c0a3ad45 100644 --- a/frameworks/Ruby/rack/README.md +++ b/frameworks/Ruby/rack/README.md @@ -11,7 +11,7 @@ comparing a variety of web servers. ## Infrastructure Software Versions The tests were run with: -* [Ruby 3.2](http://www.ruby-lang.org/) +* [Ruby 3.3](http://www.ruby-lang.org/) * [JRuby 9.4](http://jruby.org/) * [Rack 3.0.7](http://rack.github.com/) * [Unicorn 6.1.0](http://unicorn.bogomips.org/) diff --git a/frameworks/Ruby/rack/rack-falcon.dockerfile b/frameworks/Ruby/rack/rack-falcon.dockerfile index b8e5d330cc5..a8975a65038 100644 --- a/frameworks/Ruby/rack/rack-falcon.dockerfile +++ b/frameworks/Ruby/rack/rack-falcon.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV BUNDLE_FORCE_RUBY_PLATFORM=true ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/rack/rack-unicorn.dockerfile b/frameworks/Ruby/rack/rack-unicorn.dockerfile index 917295345ae..11c017d61f2 100644 --- a/frameworks/Ruby/rack/rack-unicorn.dockerfile +++ b/frameworks/Ruby/rack/rack-unicorn.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 #RUN apt-get update -yqq && apt-get install -yqq nginx diff --git a/frameworks/Ruby/rack/rack.dockerfile b/frameworks/Ruby/rack/rack.dockerfile index 5819b3288ed..4ddda8e02c5 100644 --- a/frameworks/Ruby/rack/rack.dockerfile +++ b/frameworks/Ruby/rack/rack.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV BUNDLE_FORCE_RUBY_PLATFORM=true ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/rails/Gemfile b/frameworks/Ruby/rails/Gemfile index 04b3343f6c4..eb36722fcfa 100644 --- a/frameworks/Ruby/rails/Gemfile +++ b/frameworks/Ruby/rails/Gemfile @@ -6,6 +6,6 @@ gem 'trilogy', group: :mysql gem 'oj', '~> 3.16' gem 'pg', '1.5.4', group: :postgresql gem 'puma', '~> 6.4' -gem 'rails', '~> 7.1.0' +gem 'rails', '~> 7.1.3' gem 'redis', '~> 5.0' gem 'tzinfo-data' diff --git a/frameworks/Ruby/rails/Gemfile.lock b/frameworks/Ruby/rails/Gemfile.lock index b14e081c818..334455e2ac5 100644 --- a/frameworks/Ruby/rails/Gemfile.lock +++ b/frameworks/Ruby/rails/Gemfile.lock @@ -1,70 +1,71 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.0) - actionpack (= 7.1.0) - activesupport (= 7.1.0) + actioncable (7.1.3.1) + actionpack (= 7.1.3.1) + activesupport (= 7.1.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.0) - actionpack (= 7.1.0) - activejob (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + actionmailbox (7.1.3.1) + actionpack (= 7.1.3.1) + activejob (= 7.1.3.1) + activerecord (= 7.1.3.1) + activestorage (= 7.1.3.1) + activesupport (= 7.1.3.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.0) - actionpack (= 7.1.0) - actionview (= 7.1.0) - activejob (= 7.1.0) - activesupport (= 7.1.0) + actionmailer (7.1.3.1) + actionpack (= 7.1.3.1) + actionview (= 7.1.3.1) + activejob (= 7.1.3.1) + activesupport (= 7.1.3.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.0) - actionview (= 7.1.0) - activesupport (= 7.1.0) + actionpack (7.1.3.1) + actionview (= 7.1.3.1) + activesupport (= 7.1.3.1) nokogiri (>= 1.8.5) + racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.0) - actionpack (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + actiontext (7.1.3.1) + actionpack (= 7.1.3.1) + activerecord (= 7.1.3.1) + activestorage (= 7.1.3.1) + activesupport (= 7.1.3.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.0) - activesupport (= 7.1.0) + actionview (7.1.3.1) + activesupport (= 7.1.3.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.0) - activesupport (= 7.1.0) + activejob (7.1.3.1) + activesupport (= 7.1.3.1) globalid (>= 0.3.6) - activemodel (7.1.0) - activesupport (= 7.1.0) - activerecord (7.1.0) - activemodel (= 7.1.0) - activesupport (= 7.1.0) + activemodel (7.1.3.1) + activesupport (= 7.1.3.1) + activerecord (7.1.3.1) + activemodel (= 7.1.3.1) + activesupport (= 7.1.3.1) timeout (>= 0.4.0) - activestorage (7.1.0) - actionpack (= 7.1.0) - activejob (= 7.1.0) - activerecord (= 7.1.0) - activesupport (= 7.1.0) + activestorage (7.1.3.1) + actionpack (= 7.1.3.1) + activejob (= 7.1.3.1) + activerecord (= 7.1.3.1) + activesupport (= 7.1.3.1) marcel (~> 1.0) - activesupport (7.1.0) + activesupport (7.1.3.1) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -74,25 +75,25 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - base64 (0.1.1) - bigdecimal (3.1.4) + base64 (0.2.0) + bigdecimal (3.1.6) builder (3.2.4) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.3) connection_pool (2.4.1) crass (1.0.6) - date (3.3.3) - drb (2.1.1) + date (3.3.4) + drb (2.2.0) ruby2_keywords erubi (1.12.0) globalid (1.2.1) activesupport (>= 6.1) i18n (1.14.1) concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.1) + io-console (0.7.2) + irb (1.11.2) rdoc - reline (>= 0.3.8) - loofah (2.21.3) + reline (>= 0.4.2) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -102,34 +103,34 @@ GEM net-smtp marcel (1.0.2) mini_mime (1.1.5) - mini_portile2 (2.8.4) - minitest (5.20.0) - mutex_m (0.1.2) - net-imap (0.4.0) + mini_portile2 (2.8.5) + minitest (5.22.2) + mutex_m (0.2.0) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.4.0.1) net-protocol - nio4r (2.5.9) - nokogiri (1.15.4) + nio4r (2.7.0) + nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.4-arm64-darwin) + nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.4-x86_64-linux) + nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) oj (3.16.1) pg (1.5.4) - psych (5.1.0) + psych (5.1.2) stringio - puma (6.4.0) + puma (6.4.2) nio4r (~> 2.0) - racc (1.7.1) - rack (3.0.8) + racc (1.7.3) + rack (3.0.9.1) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) @@ -137,20 +138,20 @@ GEM rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rails (7.1.0) - actioncable (= 7.1.0) - actionmailbox (= 7.1.0) - actionmailer (= 7.1.0) - actionpack (= 7.1.0) - actiontext (= 7.1.0) - actionview (= 7.1.0) - activejob (= 7.1.0) - activemodel (= 7.1.0) - activerecord (= 7.1.0) - activestorage (= 7.1.0) - activesupport (= 7.1.0) + rails (7.1.3.1) + actioncable (= 7.1.3.1) + actionmailbox (= 7.1.3.1) + actionmailer (= 7.1.3.1) + actionpack (= 7.1.3.1) + actiontext (= 7.1.3.1) + actionview (= 7.1.3.1) + activejob (= 7.1.3.1) + activemodel (= 7.1.3.1) + activerecord (= 7.1.3.1) + activestorage (= 7.1.3.1) + activesupport (= 7.1.3.1) bundler (>= 1.15.0) - railties (= 7.1.0) + railties (= 7.1.3.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -158,29 +159,29 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.0) - actionpack (= 7.1.0) - activesupport (= 7.1.0) + railties (7.1.3.1) + actionpack (= 7.1.3.1) + activesupport (= 7.1.3.1) irb rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) - rake (13.0.6) - rdoc (6.5.0) + rake (13.1.0) + rdoc (6.6.3.1) psych (>= 4.0.0) redis (5.0.7) redis-client (>= 0.9.0) redis-client (0.17.0) connection_pool - reline (0.3.9) + reline (0.4.3) io-console (~> 0.5) ruby2_keywords (0.0.5) - stringio (3.0.8) - thor (1.2.2) - timeout (0.4.0) + stringio (3.1.0) + thor (1.3.1) + timeout (0.4.1) trilogy (2.6.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) tzinfo-data (1.2021.5) tzinfo (>= 1.0.0) @@ -188,7 +189,7 @@ GEM websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.12) + zeitwerk (2.6.13) PLATFORMS arm64-darwin-20 @@ -199,7 +200,7 @@ DEPENDENCIES oj (~> 3.16) pg (= 1.5.4) puma (~> 6.4) - rails (~> 7.1.0) + rails (~> 7.1.3) redis (~> 5.0) trilogy tzinfo-data diff --git a/frameworks/Ruby/rails/README.md b/frameworks/Ruby/rails/README.md index 6699e544d72..564df6d6479 100644 --- a/frameworks/Ruby/rails/README.md +++ b/frameworks/Ruby/rails/README.md @@ -12,8 +12,8 @@ comparing a variety of web platforms. The tests were run with: -- [Ruby 3.2.2](http://www.ruby-lang.org/) -- [Rails 7.0.8](http://rubyonrails.org/) +- [Ruby 3.3](http://www.ruby-lang.org/) +- [Rails 7.1](http://rubyonrails.org/) - [Puma 6.4](http://puma.io/) - [MySQL](https://dev.mysql.com/) - [PostgreSQL](https://www.postgresql.org/) diff --git a/frameworks/Ruby/rails/config/database.yml b/frameworks/Ruby/rails/config/database.yml index ae7de0910d7..87c1e85a2ac 100644 --- a/frameworks/Ruby/rails/config/database.yml +++ b/frameworks/Ruby/rails/config/database.yml @@ -5,7 +5,7 @@ default: &default password: benchmarkdbpass host: tfb-database timeout: 5000 - pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 3 } %> development: <<: *default diff --git a/frameworks/Ruby/rails/config/puma.rb b/frameworks/Ruby/rails/config/puma.rb index 3c5a8d92fe1..3089f8334a2 100644 --- a/frameworks/Ruby/rails/config/puma.rb +++ b/frameworks/Ruby/rails/config/puma.rb @@ -9,7 +9,7 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 3 } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count diff --git a/frameworks/Ruby/rails/rails-mysql.dockerfile b/frameworks/Ruby/rails/rails-mysql.dockerfile index b5496825df0..7129e9bd6d6 100644 --- a/frameworks/Ruby/rails/rails-mysql.dockerfile +++ b/frameworks/Ruby/rails/rails-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server diff --git a/frameworks/Ruby/rails/rails.dockerfile b/frameworks/Ruby/rails/rails.dockerfile index 627831fc6e5..d49a378e9bf 100644 --- a/frameworks/Ruby/rails/rails.dockerfile +++ b/frameworks/Ruby/rails/rails.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server diff --git a/frameworks/Ruby/roda-sequel/README.md b/frameworks/Ruby/roda-sequel/README.md index 311ecd7b500..1ca9c7b55a9 100644 --- a/frameworks/Ruby/roda-sequel/README.md +++ b/frameworks/Ruby/roda-sequel/README.md @@ -12,10 +12,8 @@ comparing a variety of web platforms. The tests will be run with: -* [Ruby 2.4](http://www.ruby-lang.org) -* [JRuby 9.1](http://jruby.org) -* [Rubinius 3](https://rubinius.com)\* -* [Puma 3](http://puma.io) +* [Ruby 3.3](http://www.ruby-lang.org) +* [Puma 6](http://puma.io) * [Passenger 5](https://www.phusionpassenger.com) * [Unicorn 5](https://bogomips.org/unicorn/) * [Roda 3](http://roda.jeremyevans.net) diff --git a/frameworks/Ruby/roda-sequel/boot.rb b/frameworks/Ruby/roda-sequel/boot.rb index f9026ae794b..44e64ce917c 100644 --- a/frameworks/Ruby/roda-sequel/boot.rb +++ b/frameworks/Ruby/roda-sequel/boot.rb @@ -29,11 +29,9 @@ def connect(dbtype) adapters = { mysql: { - jruby: "jdbc:mysql", mri: "mysql2" }, postgresql: { - jruby: "jdbc:postgresql", mri: "postgres" } } @@ -41,12 +39,7 @@ def connect(dbtype) opts = {} # 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 opts[:max_connections] = (2 * Math.log(threads)).floor opts[:pool_timeout] = 10 @@ -57,9 +50,7 @@ def connect(dbtype) Sequel.connect "%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}" % { adapter: - adapters.fetch(dbtype).fetch( - defined?(JRUBY_VERSION) ? :jruby : :mri - ), + adapters.fetch(dbtype).fetch(:mri), host: "tfb-database", database: "hello_world", user: "benchmarkdbuser", diff --git a/frameworks/Ruby/roda-sequel/config/java_tune.sh b/frameworks/Ruby/roda-sequel/config/java_tune.sh deleted file mode 100644 index 412b1e74fdc..00000000000 --- a/frameworks/Ruby/roda-sequel/config/java_tune.sh +++ /dev/null @@ -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 diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile index 73c319ebc2d..2aad19e21e1 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile index a315438d86a..74aaf520136 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile index 623d8840e5d..2a7da65809e 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile index 787e4080ea1..d0f073132ca 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile index fad6582b85a..0595393d903 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile index 34fd0da0dd0..0988d366a1e 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ADD ./ /roda-sequel WORKDIR /roda-sequel diff --git a/frameworks/Ruby/sinatra-sequel/README.md b/frameworks/Ruby/sinatra-sequel/README.md index 89ee66adb32..a9e8e72728b 100644 --- a/frameworks/Ruby/sinatra-sequel/README.md +++ b/frameworks/Ruby/sinatra-sequel/README.md @@ -12,9 +12,9 @@ comparing a variety of web platforms. The tests will be run with: -* [Ruby 3.3-rc1](http://www.ruby-lang.org) +* [Ruby 3.3](http://www.ruby-lang.org) * [JRuby 9.4](http://jruby.org) -* [Puma 3](http://puma.io) +* [Puma 6](http://puma.io) * [Passenger 5](https://www.phusionpassenger.com) * [Unicorn 5](https://bogomips.org/unicorn/) * [Sinatra 2](http://www.sinatrarb.com) diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile index d96f522e49d..ff757c613a3 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile index dfe342c2a74..6aa9e5c3cb8 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile index 3e5cc00c634..f2c31645934 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile index 3be003d036b..4a5a7d7bb68 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile index 1ddf88b4d0c..3094fc88cc6 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile index 3d42937031e..fea0aff40c0 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile index 78a9fbad91d..944d8fff20c 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/README.md b/frameworks/Ruby/sinatra/README.md index 38e5dc4ea0b..ff118f6ff21 100644 --- a/frameworks/Ruby/sinatra/README.md +++ b/frameworks/Ruby/sinatra/README.md @@ -12,7 +12,7 @@ comparing a variety of web platforms. The tests will be run with: -* [Ruby 3.3-rc](http://www.ruby-lang.org) +* [Ruby 3.3](http://www.ruby-lang.org) * [Puma 6](http://puma.io) * [Passenger 6](https://www.phusionpassenger.com) * [Unicorn 6](https://bogomips.org/unicorn/) diff --git a/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile index 9ef7f70943d..ccab0a6feac 100644 --- a/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile index 92c66ae5985..c74cf454967 100644 --- a/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile index e264737b84f..ec3e0d2f8ff 100644 --- a/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile index 52c38f195fb..89784eed670 100644 --- a/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile index 330670f9962..71871552328 100644 --- a/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra.dockerfile b/frameworks/Ruby/sinatra/sinatra.dockerfile index 614b265a6ea..729eba869be 100644 --- a/frameworks/Ruby/sinatra/sinatra.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3-rc +FROM ruby:3.3 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Rust/actix/Cargo.lock b/frameworks/Rust/actix/Cargo.lock index 501124b789a..180b200226d 100644 --- a/frameworks/Rust/actix/Cargo.lock +++ b/frameworks/Rust/actix/Cargo.lock @@ -1071,9 +1071,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.20" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -1081,7 +1081,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.0.0", "slab", "tokio", "tokio-util 0.7.8", @@ -2046,9 +2046,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" diff --git a/frameworks/Rust/actix/rust-toolchain.toml b/frameworks/Rust/actix/rust-toolchain.toml index 5d56faf9ae0..292fe499e3b 100644 --- a/frameworks/Rust/actix/rust-toolchain.toml +++ b/frameworks/Rust/actix/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly" +channel = "stable" diff --git a/frameworks/Rust/astra/Cargo.lock b/frameworks/Rust/astra/Cargo.lock index 3cd9550884b..3eb313f1e71 100644 --- a/frameworks/Rust/astra/Cargo.lock +++ b/frameworks/Rust/astra/Cargo.lock @@ -125,7 +125,7 @@ checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -262,9 +262,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.108" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libmimalloc-sys" @@ -301,33 +301,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.0" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -556,23 +537,73 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] -name = "winapi" -version = "0.3.9" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" diff --git a/frameworks/Rust/axum/Cargo.lock b/frameworks/Rust/axum/Cargo.lock index b13924bd25f..dbda43b6d71 100644 --- a/frameworks/Rust/axum/Cargo.lock +++ b/frameworks/Rust/axum/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,24 +19,38 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -39,9 +62,9 @@ dependencies = [ [[package]] name = "annotate-snippets" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" +checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" dependencies = [ "unicode-width", "yansi-term", @@ -49,24 +72,34 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.42", ] [[package]] name = "atoi" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ "num-traits", ] +[[package]] +name = "atomic-write-file" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +dependencies = [ + "nix", + "rand", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -77,7 +110,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" name = "axum" version = "0.2.0" dependencies = [ - "axum 0.6.18", + "axum 0.6.20", "deadpool", "deadpool-postgres", "dotenv", @@ -101,16 +134,15 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", - "headers", "http", "http-body", "hyper", @@ -149,71 +181,122 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bson" -version = "2.4.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d76085681585d39016f4d3841eb019201fc54d2dd0d92ad1e4fab3bfb32754" +checksum = "88c18b51216e1f74b9d769cead6ace2f82b965b807e3d73330aabe9faec31c84" dependencies = [ "ahash", - "base64", + "base64 0.13.1", + "bitvec", "hex", - "indexmap", - "lazy_static", + "indexmap 1.9.3", + "js-sys", + "once_cell", "rand", "serde", "serde_bytes", "serde_json", - "time 0.3.17", - "uuid 1.2.2", + "time", + "uuid", ] [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.77" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -224,28 +307,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", - "js-sys", - "num-integer", "num-traits", - "time 0.1.45", - "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] -name = "codespan-reporting" -version = "0.11.1" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "convert_case" @@ -255,9 +331,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -265,33 +341,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -304,9 +380,9 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" dependencies = [ "cfg-if", "crossbeam-utils", @@ -314,9 +390,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if", ] @@ -331,50 +407,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cxx" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.105", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.105", -] - [[package]] name = "darling" version = "0.13.4" @@ -396,7 +428,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] @@ -407,50 +439,69 @@ checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "deadpool" -version = "0.9.5" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421fe0f90f2ab22016f32a9881be5134fdd71c65298917084b0c7477cbc3856e" +checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" dependencies = [ "async-trait", "deadpool-runtime", "num_cpus", - "retain_mut", "serde", "tokio", ] [[package]] name = "deadpool-postgres" -version = "0.10.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e866e414e9e12fc988f0bfb89a0b86228e7ed196ca509fbc4dcbc738c56e753c" +checksum = "bda39fa1cfff190d8924d447ad04fd22772c250438ca5ce1dfb3c80621c05aaa" dependencies = [ "deadpool", - "log", "tokio", "tokio-postgres", + "tracing", ] [[package]] name = "deadpool-runtime" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" +checksum = "63dfa964fe2a66f3fde91fc70b267fe193d822c7e603e2a675a49a7f46ad3f49" dependencies = [ "tokio", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] + [[package]] name = "derivative" version = "2.2.0" @@ -459,7 +510,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] @@ -472,40 +523,21 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dotenv" version = "0.15.0" @@ -514,21 +546,24 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "dotenvy" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dtoa" -version = "1.0.4" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6eee2d5d0d113f015688310da018bd1d864d86bd567c8fca9c266889e1bfa" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "either" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] [[package]] name = "enum-as-inner" @@ -539,7 +574,34 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", ] [[package]] @@ -556,23 +618,37 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.8.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" @@ -596,18 +672,24 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -620,9 +702,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -630,15 +712,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -647,49 +729,49 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.11.2", + "parking_lot", ] [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -705,9 +787,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -715,75 +797,60 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] -name = "hashlink" -version = "0.8.1" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" -dependencies = [ - "hashbrown", -] +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] -name = "headers" -version = "0.3.8" +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "base64", - "bitflags", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", + "ahash", + "allocator-api2", ] [[package]] -name = "headers-core" -version = "0.2.0" +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "http", + "hashbrown 0.14.3", ] [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -793,9 +860,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -809,6 +876,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -822,9 +898,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -833,9 +909,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -844,9 +920,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -856,15 +932,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -876,7 +952,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -885,26 +961,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -926,9 +1001,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -936,70 +1011,71 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ - "cfg-if", + "equivalent", + "hashbrown 0.14.3", ] [[package]] name = "ipconfig" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.5", "widestring", - "winapi", + "windows-sys 0.48.0", "winreg", ] [[package]] name = "ipnet" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -1009,20 +1085,31 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "libc" -version = "0.2.138" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] -name = "link-cplusplus" -version = "1.0.7" +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libsqlite3-sys" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", + "pkg-config", + "vcpkg", ] [[package]] @@ -1031,11 +1118,17 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1043,12 +1136,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru-cache" @@ -1067,36 +1157,37 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1106,46 +1197,46 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "wasi", + "windows-sys 0.48.0", ] [[package]] name = "mongodb" -version = "2.3.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a1df476ac9541b0e4fdc8e2cc48884e66c92c933cd17a1fd75e68caf75752e" +checksum = "46c30763a5c6c52079602be44fa360ca3bfacee55fca73f4734aecd23706a7f2" dependencies = [ "async-trait", - "base64", - "bitflags", + "base64 0.13.1", + "bitflags 1.3.2", "bson", "chrono", "derivative", + "derive_more", "flate2", "futures-core", "futures-executor", + "futures-io", "futures-util", "hex", "hmac", "lazy_static", "md-5", - "os_info", "pbkdf2", "percent-encoding", "rand", @@ -1158,7 +1249,7 @@ dependencies = [ "sha-1", "sha2", "snap", - "socket2", + "socket2 0.4.10", "stringprep", "strsim", "take_mut", @@ -1169,7 +1260,7 @@ dependencies = [ "trust-dns-proto", "trust-dns-resolver", "typed-builder", - "uuid 0.8.2", + "uuid", "webpki-roots", "zstd", ] @@ -1193,13 +1284,41 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.1" +name = "nix" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "memchr", - "minimal-lexical", + "bitflags 2.4.1", + "cfg-if", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", ] [[package]] @@ -1212,38 +1331,59 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.16.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ - "bitflags", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", @@ -1254,13 +1394,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", ] [[package]] @@ -1271,9 +1411,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" dependencies = [ "cc", "libc", @@ -1281,27 +1421,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_info" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4750134fb6a5d49afc80777394ad5d95b04bc12068c6abb92fae8f43817270f" -dependencies = [ - "log", - "winapi", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -1309,100 +1428,95 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.5", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_shared", ] [[package]] name = "phf_shared" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1410,19 +1524,40 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "postgres-protocol" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878c6cbf956e03af9aa8204b407b9cbf47c072164800aa918c516cd4b056c50c" +checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64", + "base64 0.21.5", "byteorder", "bytes", "fallible-iterator", @@ -1436,15 +1571,21 @@ dependencies = [ [[package]] name = "postgres-types" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d946ec7d256b04dfadc4e6a3292324e6f417124750fc5c0950f981b703a0f1" +checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" dependencies = [ "bytes", "fallible-iterator", "postgres-protocol", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1453,19 +1594,19 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.21" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -1478,13 +1619,19 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -1517,29 +1664,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.7.0" +name = "regex-automata" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1548,18 +1696,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "resolv-conf" @@ -1571,27 +1710,46 @@ dependencies = [ "quick-error", ] -[[package]] -name = "retain_mut" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" - [[package]] name = "ring" -version = "0.16.20" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", + "getrandom", "libc", - "once_cell", - "spin", + "spin 0.9.8", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.48.0", +] + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.2.3" @@ -1607,7 +1765,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.14", + "semver 1.0.20", ] [[package]] @@ -1620,66 +1778,82 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" -version = "0.20.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.48.0", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -1687,11 +1861,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1700,9 +1874,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -1719,9 +1893,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "semver-parser" @@ -1731,40 +1905,40 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.150" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.150" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", ] [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "indexmap", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -1772,10 +1946,11 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa", "serde", ] @@ -1810,7 +1985,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] @@ -1826,9 +2001,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -1837,9 +2012,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1848,61 +2023,100 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqlformat" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ "itertools", "nom", @@ -1911,101 +2125,209 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9249290c05928352f71c077cc44a464d880c63f26f7534728cca008e135c0428" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", ] [[package]] name = "sqlx-core" -version = "0.6.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ "ahash", "atoi", - "base64", - "bitflags", "byteorder", "bytes", "crc", "crossbeam-queue", - "dirs", "dotenvy", "either", "event-listener", "futures-channel", "futures-core", "futures-intrusive", + "futures-io", "futures-util", "hashlink", "hex", - "hkdf", - "hmac", - "indexmap", - "itoa", - "libc", + "indexmap 2.1.0", "log", - "md-5", "memchr", + "native-tls", "once_cell", "paste", "percent-encoding", - "rand", "serde", "serde_json", - "sha1", "sha2", "smallvec", "sqlformat", - "sqlx-rt", - "stringprep", "thiserror", + "tokio", "tokio-stream", + "tracing", "url", - "whoami", ] [[package]] name = "sqlx-macros" -version = "0.6.2" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" dependencies = [ + "atomic-write-file", "dotenvy", "either", "heck", + "hex", "once_cell", "proc-macro2", "quote", + "serde", + "serde_json", "sha2", "sqlx-core", - "sqlx-rt", - "syn 1.0.105", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", "url", ] [[package]] -name = "sqlx-rt" -version = "0.6.2" +name = "sqlx-mysql" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ - "native-tls", + "atoi", + "base64 0.21.5", + "bitflags 2.4.1", + "byteorder", + "bytes", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", "once_cell", - "tokio", - "tokio-native-tls", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +dependencies = [ + "atoi", + "base64 0.21.5", + "bitflags 2.4.1", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", ] [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -2018,15 +2340,15 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "1.0.105" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -2035,9 +2357,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" dependencies = [ "proc-macro2", "quote", @@ -2046,9 +2368,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "take_mut" @@ -2056,67 +2378,54 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" -version = "3.3.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", + "rustix", + "windows-sys 0.48.0", ] [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.42", ] [[package]] name = "time" -version = "0.3.17" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ + "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -2124,15 +2433,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -2148,49 +2457,38 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", + "syn 2.0.42", ] [[package]] @@ -2209,15 +2507,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8548f756cd6eb4069c5af0fb0cec57001fb42bd1fb7330d8f24067ee3fa62608" dependencies = [ "quote", - "syn 1.0.105", + "syn 1.0.109", "tokio-postgres", ] [[package]] name = "tokio-postgres" -version = "0.7.7" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a12c1b3e0704ae7dfc25562629798b29c72e6b1d0a681b6f29ab4ae5e7f7bf" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", @@ -2226,33 +2524,34 @@ dependencies = [ "futures-channel", "futures-util", "log", - "parking_lot 0.12.1", + "parking_lot", "percent-encoding", "phf", "pin-project-lite", "postgres-protocol", "postgres-types", - "socket2", + "rand", + "socket2 0.5.5", "tokio", "tokio-util", + "whoami", ] [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2261,12 +2560,13 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -2275,9 +2575,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] @@ -2300,11 +2600,11 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags", + "bitflags 2.4.1", "bytes", "futures-core", "futures-util", @@ -2330,21 +2630,32 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -2386,7 +2697,7 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot 0.12.1", + "parking_lot", "resolv-conf", "smallvec", "thiserror", @@ -2396,9 +2707,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" @@ -2408,26 +2719,26 @@ checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2440,15 +2751,15 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -2464,35 +2775,32 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.5.0", "percent-encoding", ] [[package]] -name = "uuid" -version = "0.8.2" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", -] +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" -version = "1.2.2" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ "getrandom", "serde", @@ -2505,7 +2813,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd8b599d797eb038d0dde9a3860aacb6bbba3bffa4ac64f807c8673820cc9d9" dependencies = [ "regex", - "syn 1.0.105", + "syn 1.0.109", ] [[package]] @@ -2528,20 +2836,13 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2550,9 +2851,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2560,24 +2861,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2585,68 +2886,54 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 2.0.42", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "whoami" -version = "1.2.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6631b6a2fd59b1841b622e8f1a7ad241ef0a46f2d580464ce8140ac94cbd571" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" dependencies = [ - "bumpalo", "wasm-bindgen", "web-sys", ] [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -2664,15 +2951,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2680,136 +2958,163 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.36.1" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.48.5", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.5", ] [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.0", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", ] [[package]] @@ -2833,13 +3138,13 @@ dependencies = [ [[package]] name = "yarte_codegen" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cf72076dbf4d39fe4779b58380d7213dcb3995d00666dd2d109f1b45879ea4" +checksum = "4a79312078b97a195de91a8c1457c2e0d7abd97e6e605f3cdeb01b3c105d2cff" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", "yarte_helpers", "yarte_hir", ] @@ -2852,7 +3157,7 @@ checksum = "b296edd7e1a81717b6f794baa2de8dfe89646050847161550b2d963b3ca6fe80" dependencies = [ "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", "yarte_codegen", "yarte_helpers", "yarte_hir", @@ -2861,15 +3166,15 @@ dependencies = [ [[package]] name = "yarte_helpers" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dfe1ef3558dde14b4be5387bdd41e3bd45746570743521470ec3e9cd0826679" +checksum = "e0d1076f8cee9541ea5ffbecd9102f751252c91f085e7d30a18a3ce805ebd3ee" dependencies = [ "dtoa", "itoa", "prettyplease", "serde", - "syn 1.0.105", + "syn 1.0.109", "toml", "v_htmlescape", ] @@ -2883,7 +3188,7 @@ dependencies = [ "derive_more", "proc-macro2", "quote", - "syn 1.0.105", + "syn 1.0.109", "v_eval", "v_htmlescape", "yarte_helpers", @@ -2901,11 +3206,37 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 1.0.105", + "syn 1.0.109", "unicode-xid", "yarte_helpers", ] +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" @@ -2927,10 +3258,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.4+zstd.1.5.2" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa202f2ef00074143e219d15b62ffc317d17cc33909feac471c044087cad7b0" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", + "pkg-config", ] diff --git a/frameworks/Rust/axum/Cargo.toml b/frameworks/Rust/axum/Cargo.toml index 1236aab32f9..f4ecf45adf4 100644 --- a/frameworks/Rust/axum/Cargo.toml +++ b/frameworks/Rust/axum/Cargo.toml @@ -29,9 +29,9 @@ name = "axum-pg" path = "src/main_pg.rs" [dependencies] -axum = { version = "0.6.16", default-features = false, features = ["json", "query", "headers", "http1", "tokio"] } -deadpool = { version = "0.9.5", features = ["rt_tokio_1", "serde", "async-trait", "managed" ] } -deadpool-postgres = "0.10.3" +axum = { version = "0.6.16", default-features = false, features = ["json", "query", "http1", "tokio"] } +deadpool = { version = "0.10.0", features = ["rt_tokio_1", "serde", "async-trait", "managed" ] } +deadpool-postgres = "0.12.1" dotenv = "0.15.0" futures = "0.3.25" futures-util = "0.3.25" @@ -41,7 +41,7 @@ num_cpus = "1.14.0" rand = { version = "0.8.5", features = ["small_rng"] } serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.89" -sqlx = { version = "0.6.2", features = ["postgres", "macros", "runtime-tokio-native-tls"] } +sqlx = { version = "0.7.3", features = ["postgres", "macros", "runtime-tokio-native-tls"] } tokio = { version = "1.24.2", features = ["full"] } tokio-pg-mapper = "0.2.0" tokio-pg-mapper-derive = "0.2.0" diff --git a/frameworks/Rust/axum/axum-mongo-raw.dockerfile b/frameworks/Rust/axum/axum-mongo-raw.dockerfile index 5eec4f41017..ffdabfc2d8c 100644 --- a/frameworks/Rust/axum/axum-mongo-raw.dockerfile +++ b/frameworks/Rust/axum/axum-mongo-raw.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster ENV AXUM_TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/axum/axum-mongo.dockerfile b/frameworks/Rust/axum/axum-mongo.dockerfile index c9ed43a90b2..99a6f76f997 100644 --- a/frameworks/Rust/axum/axum-mongo.dockerfile +++ b/frameworks/Rust/axum/axum-mongo.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster ENV AXUM_TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/axum/axum-pg-pool.dockerfile b/frameworks/Rust/axum/axum-pg-pool.dockerfile index 1a436f88b30..c836faa2381 100644 --- a/frameworks/Rust/axum/axum-pg-pool.dockerfile +++ b/frameworks/Rust/axum/axum-pg-pool.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/axum/axum-pg.dockerfile b/frameworks/Rust/axum/axum-pg.dockerfile index 375e82ce7d3..98d44481007 100644 --- a/frameworks/Rust/axum/axum-pg.dockerfile +++ b/frameworks/Rust/axum/axum-pg.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world diff --git a/frameworks/Rust/axum/axum-sqlx.dockerfile b/frameworks/Rust/axum/axum-sqlx.dockerfile index 455e282abd0..0cecda65f32 100644 --- a/frameworks/Rust/axum/axum-sqlx.dockerfile +++ b/frameworks/Rust/axum/axum-sqlx.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=56 diff --git a/frameworks/Rust/axum/axum.dockerfile b/frameworks/Rust/axum/axum.dockerfile index 6f23b4e1a44..2cd772a3426 100644 --- a/frameworks/Rust/axum/axum.dockerfile +++ b/frameworks/Rust/axum/axum.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.67-slim-buster +FROM rust:1.75-slim-buster RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config libssl-dev \ diff --git a/frameworks/Rust/axum/src/database_sqlx.rs b/frameworks/Rust/axum/src/database_sqlx.rs index e26baebde03..b156bb3a3b7 100644 --- a/frameworks/Rust/axum/src/database_sqlx.rs +++ b/frameworks/Rust/axum/src/database_sqlx.rs @@ -69,7 +69,7 @@ pub async fn fetch_world( let world: World = sqlx::query_as_with("SELECT id, randomnumber FROM World WHERE id = $1", args) - .fetch_one(&mut conn) + .fetch_one(&mut *conn) .await .expect("error loading world"); Ok(world) @@ -79,7 +79,7 @@ pub async fn fetch_fortunes( mut conn: PoolConnection, ) -> Result, PgError> { let fortunes: Vec = sqlx::query_as("SELECT * FROM Fortune") - .fetch_all(&mut conn) + .fetch_all(&mut *conn) .await .expect("error loading Fortunes"); Ok(fortunes) diff --git a/frameworks/Rust/ntex/Cargo.toml b/frameworks/Rust/ntex/Cargo.toml index f14828040f7..b1aff0f6435 100755 --- a/frameworks/Rust/ntex/Cargo.toml +++ b/frameworks/Rust/ntex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex" -version = "0.7.0" +version = "1.0.0" edition = "2018" [[bin]] @@ -37,8 +37,8 @@ tokio = ["ntex/tokio"] async-std = ["ntex/async-std"] [dependencies] -ntex = "0.7.2" -ntex-bytes = { version = "0.1.19", features=["simd"] } +ntex = "1.0.0" +ntex-bytes = { version = "0.1.21", features=["simd"] } mimalloc = { version = "0.1.25", default-features = false } snmalloc-rs = { version = "0.3.3", features = ["native-cpu"] } yarte = { version = "0.15", features = ["bytes-buf", "json"] } @@ -52,7 +52,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" log = { version = "0.4", features = ["release_max_level_off"] } tok_io = {version = "1", package = "tokio" } -tokio-postgres = { git="https://github.com/fafhrd91/postgres.git" } +tokio-postgres = { git="https://github.com/fafhrd91/postgres.git", branch="ntex-1.0" } [profile.release] opt-level = 3 diff --git a/frameworks/Rust/ntex/src/main.rs b/frameworks/Rust/ntex/src/main.rs index c9220d83247..c9fd1e80245 100644 --- a/frameworks/Rust/ntex/src/main.rs +++ b/frameworks/Rust/ntex/src/main.rs @@ -55,7 +55,9 @@ async fn main() -> std::io::Result<()> { http::HttpService::build() .keep_alive(http::KeepAlive::Os) - .client_timeout(Seconds(0)) + .client_timeout(Seconds::ZERO) + .headers_read_rate(Seconds::ZERO, Seconds::ZERO, 0) + .payload_read_rate(Seconds::ZERO, Seconds::ZERO, 0) .h1(web::App::new().service(json).service(plaintext).finish()) })? .workers(num_cpus::get()) diff --git a/frameworks/Rust/ntex/src/main_db.rs b/frameworks/Rust/ntex/src/main_db.rs index 8354a41fd21..437fd70b9e1 100644 --- a/frameworks/Rust/ntex/src/main_db.rs +++ b/frameworks/Rust/ntex/src/main_db.rs @@ -7,7 +7,7 @@ use ntex::http::header::{CONTENT_TYPE, SERVER}; use ntex::http::{HttpService, KeepAlive, Request, Response, StatusCode}; use ntex::service::{Service, ServiceCtx, ServiceFactory}; use ntex::web::{Error, HttpResponse}; -use ntex::{time::Seconds, util::BoxFuture, util::PoolId}; +use ntex::{time::Seconds, util::PoolId}; mod db; mod utils; @@ -17,52 +17,49 @@ struct App(db::PgConnection); impl Service for App { type Response = Response; type Error = Error; - type Future<'f> = BoxFuture<'f, Result> where Self: 'f; - fn call<'a>(&'a self, req: Request, _: ServiceCtx<'a, Self>) -> Self::Future<'a> { - Box::pin(async move { - match req.path() { - "/db" => { - let body = self.0.get_world().await; - let mut res = HttpResponse::with_body(StatusCode::OK, body.into()); - res.headers_mut().insert(SERVER, utils::HDR_SERVER); - res.headers_mut() - .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); - Ok(res) - } - "/fortunes" => { - let body = self.0.tell_fortune().await; - let mut res = HttpResponse::with_body(StatusCode::OK, body.into()); - res.headers_mut().insert(SERVER, utils::HDR_SERVER); - res.headers_mut() - .insert(CONTENT_TYPE, utils::HDR_HTML_CONTENT_TYPE); - Ok(res) - } - "/query" => { - let worlds = self - .0 - .get_worlds(utils::get_query_param(req.uri().query())) - .await; - let mut res = HttpResponse::with_body(StatusCode::OK, worlds.into()); - res.headers_mut().insert(SERVER, utils::HDR_SERVER); - res.headers_mut() - .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); - Ok(res) - } - "/update" => { - let worlds = self - .0 - .update(utils::get_query_param(req.uri().query())) - .await; - let mut res = HttpResponse::with_body(StatusCode::OK, worlds.into()); - res.headers_mut().insert(SERVER, utils::HDR_SERVER); - res.headers_mut() - .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); - Ok(res) - } - _ => Ok(Response::new(StatusCode::NOT_FOUND)), + async fn call(&self, req: Request, _: ServiceCtx<'_, Self>) -> Result { + match req.path() { + "/db" => { + let body = self.0.get_world().await; + let mut res = HttpResponse::with_body(StatusCode::OK, body.into()); + res.headers_mut().insert(SERVER, utils::HDR_SERVER); + res.headers_mut() + .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); + Ok(res) } - }) + "/fortunes" => { + let body = self.0.tell_fortune().await; + let mut res = HttpResponse::with_body(StatusCode::OK, body.into()); + res.headers_mut().insert(SERVER, utils::HDR_SERVER); + res.headers_mut() + .insert(CONTENT_TYPE, utils::HDR_HTML_CONTENT_TYPE); + Ok(res) + } + "/query" => { + let worlds = self + .0 + .get_worlds(utils::get_query_param(req.uri().query())) + .await; + let mut res = HttpResponse::with_body(StatusCode::OK, worlds.into()); + res.headers_mut().insert(SERVER, utils::HDR_SERVER); + res.headers_mut() + .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); + Ok(res) + } + "/update" => { + let worlds = self + .0 + .update(utils::get_query_param(req.uri().query())) + .await; + let mut res = HttpResponse::with_body(StatusCode::OK, worlds.into()); + res.headers_mut().insert(SERVER, utils::HDR_SERVER); + res.headers_mut() + .insert(CONTENT_TYPE, utils::HDR_JSON_CONTENT_TYPE); + Ok(res) + } + _ => Ok(Response::new(StatusCode::NOT_FOUND)), + } } } @@ -73,13 +70,12 @@ impl ServiceFactory for AppFactory { type Error = Error; type Service = App; type InitError = (); - type Future<'f> = BoxFuture<'f, Result>; - fn create(&self, _: ()) -> Self::Future<'_> { + async fn create(&self, _: ()) -> Result { const DB_URL: &str = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"; - Box::pin(async move { Ok(App(db::PgConnection::connect(DB_URL).await)) }) + Ok(App(db::PgConnection::connect(DB_URL).await)) } } @@ -97,6 +93,8 @@ async fn main() -> std::io::Result<()> { HttpService::build() .keep_alive(KeepAlive::Os) .client_timeout(Seconds(0)) + .headers_read_rate(Seconds::ZERO, Seconds::ZERO, 0) + .payload_read_rate(Seconds::ZERO, Seconds::ZERO, 0) .h1(AppFactory) })? .workers(num_cpus::get()) diff --git a/frameworks/Rust/ohkami/.gitignore b/frameworks/Rust/ohkami/.gitignore index c41cc9e35e3..ea8c4bf7f35 100644 --- a/frameworks/Rust/ohkami/.gitignore +++ b/frameworks/Rust/ohkami/.gitignore @@ -1 +1 @@ -/target \ No newline at end of file +/target diff --git a/frameworks/Rust/ohkami/Cargo.lock b/frameworks/Rust/ohkami/Cargo.lock index 29cc979cc9b..905a89d8a8e 100644 --- a/frameworks/Rust/ohkami/Cargo.lock +++ b/frameworks/Rust/ohkami/Cargo.lock @@ -2,204 +2,110 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] -name = "android_system_properties" -version = "0.1.5" +name = "allocator-api2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "annotate-snippets" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" +checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" dependencies = [ "unicode-width", "yansi-term", ] [[package]] -name = "async-channel" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" -dependencies = [ - "async-lock", - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.12.0" +name = "atoi" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ - "async-lock", - "autocfg", - "concurrent-queue", - "futures-lite", - "libc", - "log", - "parking", - "polling", - "slab", - "socket2", - "waker-fn", - "windows-sys 0.42.0", + "num-traits", ] [[package]] -name = "async-lock" -version = "2.6.0" +name = "atomic-write-file" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" dependencies = [ - "event-listener", - "futures-lite", + "nix", + "rand", ] [[package]] -name = "async-native-tls" -version = "0.4.0" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d57d4cec3c647232e1094dc013546c0b33ce785d8aeb251e1f20dfaf8a9a13fe" -dependencies = [ - "futures-util", - "native-tls", - "thiserror", - "url", -] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "async-process" -version = "1.6.0" +name = "backtrace" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "async-io", - "async-lock", - "autocfg", - "blocking", + "addr2line", + "cc", "cfg-if", - "event-listener", - "futures-lite", "libc", - "signal-hook", - "windows-sys 0.42.0", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] -name = "async-task" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" - -[[package]] -name = "atoi" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - -[[package]] -name = "autocfg" -version = "1.1.0" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64" -version = "0.13.1" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bitflags" @@ -208,51 +114,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.10.3" +name = "bitflags" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ - "generic-array", + "serde", ] [[package]] -name = "blocking" -version = "1.3.0" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "async-channel", - "async-lock", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", + "generic-array", ] [[package]] -name = "bumpalo" -version = "3.11.1" +name = "byte_reader" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "087a18fc062e9ae6d8c0fc7d9afc22e373f3eda1244379eefabff7e2b2cad206" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.78" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -261,38 +165,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "time", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "concurrent-queue" -version = "2.0.0" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" -dependencies = [ - "crossbeam-utils", -] +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "convert_case" @@ -302,9 +178,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -312,52 +188,48 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -370,57 +242,14 @@ dependencies = [ ] [[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "cxx" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5add3fc1717409d029b20c5b6903fc0c0b02fa6741d820054f4a2efa5e5816fd" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c87959ba14bc6fbc61df77c3fcfe180fc32b93538c4f1031dd802ccb5f2ff0" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a3e162fde4e594ed2b07d0f83c6c67b745e7f28ce58c6df5e6b6bef99dfb59" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.85" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "proc-macro2", - "quote", - "syn", + "const-oid", + "pem-rfc7468", + "zeroize", ] [[package]] @@ -433,57 +262,68 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] [[package]] -name = "dirs" -version = "4.0.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "dirs-sys" -version = "0.3.7" +name = "dtoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ - "libc", - "redox_users", - "winapi", + "serde", ] [[package]] -name = "dotenvy" -version = "0.15.6" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "dtoa" -version = "1.0.5" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] [[package]] -name = "either" -version = "1.8.0" +name = "etcetera" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] [[package]] name = "event-listener" @@ -493,11 +333,25 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "1.8.0" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "finl_unicode" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ - "instant", + "futures-core", + "futures-sink", + "spin 0.9.8", ] [[package]] @@ -517,18 +371,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -536,15 +390,26 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] [[package]] name = "futures-intrusive" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", @@ -553,53 +418,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" - -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -614,9 +464,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -624,54 +474,55 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] -name = "gloo-timers" -version = "0.2.5" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", + "allocator-api2", ] [[package]] name = "hashlink" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown", ] [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" dependencies = [ "unicode-segmentation", ] +[[package]] +name = "hermit-abi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" + [[package]] name = "hex" version = "0.4.3" @@ -680,9 +531,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -697,34 +548,19 @@ dependencies = [ ] [[package]] -name = "iana-time-zone" -version = "0.1.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" +name = "home" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "cxx", - "cxx-build", + "windows-sys 0.52.0", ] [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -732,82 +568,72 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "js-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "log", + "spin 0.5.2", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "libc" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "libc" -version = "0.2.138" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "libsqlite3-sys" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", + "pkg-config", + "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -815,28 +641,25 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", - "value-bag", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "minimal-lexical" @@ -844,6 +667,26 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -862,84 +705,151 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "libc", +] + [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] [[package]] -name = "nu-ansi-term" -version = "0.46.0" +name = "num-bigint-dig" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" dependencies = [ - "overload", - "winapi", + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", + "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", + "libm", ] [[package]] -name = "ohkami" -version = "0.1.0" +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "ohkami 0.3.3", - "rand", - "serde", - "sqlx", - "yarte", + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", ] [[package]] name = "ohkami" -version = "0.3.3" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5865b230c6e90ca5146fc32495d8e6fc601756727affb1567d0a9d0096de6c0" +checksum = "0e19a311d70d741f4a08f54374df6501bc2ebde819b5a69b95763ea2335f5f19" dependencies = [ - "async-std", - "chrono", + "byte_reader", + "hmac", + "ohkami_lib", + "ohkami_macros", "serde", "serde_json", + "sha2", + "tokio", +] + +[[package]] +name = "ohkami_framework_benchmarks" +version = "0.15.0" +dependencies = [ + "futures-util", + "ohkami", + "rand", "sqlx", - "tracing", - "tracing-subscriber", + "tokio", + "yarte", +] + +[[package]] +name = "ohkami_lib" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf187aa0f73c2b91d9ac5c7eb1437c8d1a015d765d4fc3db8113c90a82ae2a0" + +[[package]] +name = "ohkami_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c09a65693c4398af64b085040fe937f7d42d9b164306b5271fc169fa276db7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "once_cell" -version = "1.16.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -950,13 +860,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] @@ -967,9 +877,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -977,60 +887,55 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.6" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.11" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1039,25 +944,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.26" +name = "pkcs1" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] [[package]] -name = "polling" -version = "2.5.2" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "autocfg", - "cfg-if", - "libc", - "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "der", + "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1066,28 +978,28 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.22" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.109", ] [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1124,29 +1036,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.7.0" +name = "regex-automata" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -1155,19 +1068,36 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rsa" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ - "winapi", + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -1177,41 +1107,47 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.52.0", ] [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.7.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1220,9 +1156,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -1230,35 +1166,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.151" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.151" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -1267,9 +1203,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -1278,9 +1214,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1288,63 +1224,79 @@ dependencies = [ ] [[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signal-hook" -version = "0.3.14" +name = "signal-hook-registry" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", - "signal-hook-registry", ] [[package]] -name = "signal-hook-registry" -version = "1.4.0" +name = "signature" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "libc", + "digest", + "rand_core", ] [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.4.7" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", ] [[package]] name = "sqlformat" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ "itertools", "nom", @@ -1353,114 +1305,224 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.2" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9249290c05928352f71c077cc44a464d880c63f26f7534728cca008e135c0428" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ + "ahash", + "atoi", + "byteorder", + "bytes", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap", + "log", + "memchr", + "native-tls", + "once_cell", + "paste", + "percent-encoding", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +dependencies = [ + "atomic-write-file", + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", "sqlx-core", - "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", ] [[package]] -name = "sqlx-core" -version = "0.6.2" +name = "sqlx-mysql" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ - "ahash", "atoi", "base64", - "bitflags", + "bitflags 2.4.2", "byteorder", "bytes", "crc", - "crossbeam-queue", - "dirs", + "digest", "dotenvy", "either", - "event-listener", "futures-channel", "futures-core", - "futures-intrusive", + "futures-io", "futures-util", - "hashlink", + "generic-array", "hex", "hkdf", "hmac", - "indexmap", "itoa", - "libc", "log", "md-5", "memchr", "once_cell", - "paste", "percent-encoding", "rand", + "rsa", "serde", - "serde_json", "sha1", "sha2", "smallvec", - "sqlformat", - "sqlx-rt", + "sqlx-core", "stringprep", "thiserror", - "url", + "tracing", "whoami", ] [[package]] -name = "sqlx-macros" -version = "0.6.2" +name = "sqlx-postgres" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ + "atoi", + "base64", + "bitflags 2.4.2", + "byteorder", + "crc", "dotenvy", - "either", - "heck", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", "once_cell", - "proc-macro2", - "quote", + "rand", + "serde", + "serde_json", + "sha1", "sha2", + "smallvec", "sqlx-core", - "sqlx-rt", - "syn", - "url", + "stringprep", + "thiserror", + "tracing", + "whoami", ] [[package]] -name = "sqlx-rt" -version = "0.6.2" +name = "sqlx-sqlite" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" dependencies = [ - "async-native-tls", - "async-std", - "native-tls", + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", ] [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -1468,99 +1530,120 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.3.0" +name = "syn" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "termcolor" -version = "1.1.3" +name = "tempfile" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ - "winapi-util", + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] -name = "thread_local" -version = "1.1.4" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "once_cell", + "tinyvec_macros", ] [[package]] -name = "time" -version = "0.1.45" +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ + "backtrace", + "bytes", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tokio-macros" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "tinyvec_macros", + "proc-macro2", + "quote", + "syn 2.0.49", ] [[package]] -name = "tinyvec_macros" -version = "0.1.0" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1568,67 +1651,41 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.49", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" -dependencies = [ - "nu-ansi-term", - "sharded-slab", - "smallvec", - "thread_local", - "tracing-core", - "tracing-log", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -1641,15 +1698,15 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -1665,15 +1722,21 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "v_eval" version = "0.6.0" @@ -1681,7 +1744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd8b599d797eb038d0dde9a3860aacb6bbba3bffa4ac64f807c8673820cc9d9" dependencies = [ "regex", - "syn", + "syn 1.0.109", ] [[package]] @@ -1690,22 +1753,6 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "value-bag" -version = "1.0.0-alpha.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -1718,119 +1765,17 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "web-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "whoami" -version = "1.2.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6631b6a2fd59b1841b622e8f1a7ad241ef0a46f2d580464ce8140ac94cbd571" -dependencies = [ - "bumpalo", - "wasm-bindgen", - "web-sys", -] +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" [[package]] name = "winapi" @@ -1848,15 +1793,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1865,103 +1801,135 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.48.5", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "yansi-term" @@ -1984,13 +1952,13 @@ dependencies = [ [[package]] name = "yarte_codegen" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cf72076dbf4d39fe4779b58380d7213dcb3995d00666dd2d109f1b45879ea4" +checksum = "4a79312078b97a195de91a8c1457c2e0d7abd97e6e605f3cdeb01b3c105d2cff" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "yarte_helpers", "yarte_hir", ] @@ -2003,7 +1971,7 @@ checksum = "b296edd7e1a81717b6f794baa2de8dfe89646050847161550b2d963b3ca6fe80" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "yarte_codegen", "yarte_helpers", "yarte_hir", @@ -2012,15 +1980,15 @@ dependencies = [ [[package]] name = "yarte_helpers" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dfe1ef3558dde14b4be5387bdd41e3bd45746570743521470ec3e9cd0826679" +checksum = "e0d1076f8cee9541ea5ffbecd9102f751252c91f085e7d30a18a3ce805ebd3ee" dependencies = [ "dtoa", "itoa", "prettyplease", "serde", - "syn", + "syn 1.0.109", "toml", "v_htmlescape", ] @@ -2034,7 +2002,7 @@ dependencies = [ "derive_more", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "v_eval", "v_htmlescape", "yarte_helpers", @@ -2052,7 +2020,33 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn", + "syn 1.0.109", "unicode-xid", "yarte_helpers", ] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/frameworks/Rust/ohkami/Cargo.toml b/frameworks/Rust/ohkami/Cargo.toml index a521a7b4f08..15475ee8cd9 100644 --- a/frameworks/Rust/ohkami/Cargo.toml +++ b/frameworks/Rust/ohkami/Cargo.toml @@ -1,11 +1,13 @@ [package] -name = "ohkami" -version = "0.1.0" +name = "ohkami_framework_benchmarks" +version = "0.15.0" edition = "2021" +authors = ["kanarus "] [dependencies] -ohkami = { version = "0.3.3", features = ["sqlx", "postgres"] } -serde = { version = "1.0", features = ["derive"] } -sqlx = "0.6" -rand = "0.8.5" -yarte = "0.15" +ohkami = { version = "=0.15.0", features = ["rt_tokio"] } +tokio = { version = "1.36.0" , features = ["full"] } +rand = { version = "0.8.5" , features = ["small_rng"] } +sqlx = { version = "0.7.3" , features = ["postgres", "macros", "runtime-tokio-native-tls"] } +yarte = { version = "0.15.7" } +futures-util = { version = "0.3.30" } \ No newline at end of file diff --git a/frameworks/Rust/ohkami/README.md b/frameworks/Rust/ohkami/README.md index e234565d4b4..2d61eb2ee76 100644 --- a/frameworks/Rust/ohkami/README.md +++ b/frameworks/Rust/ohkami/README.md @@ -1,15 +1,41 @@ -# [ohkami](https://github.com/kana-rus/ohkami) web framework +# [ohkami](https://github.com/kana-rus/ohkami) - Intuitive and Declarative Web Framework for Rust ## Description -ohkami is **simple** and **macro free** wen framework. + +> Build web app in intuitive and declarative code +> - *macro-less and type-safe* APIs for intuitive and declarative code +> - *multi runtime* support:`tokio`, `async-std` + +- [User Guide](https://docs.rs/ohkami/latest/ohkami/) +- [API Documentation](https://docs.rs/ohkami/latest/ohkami/) +- Cargo package: [ohkami](https://crates.io/crates/ohkami) ## Database -- PostgreSQL + +PostgreSQL with [sqlx](https://github.com/launchbadge/sqlx) ## Test URLs -- JSON Encoding: [http://localhost:8080/json](http://localhost:8080/json) -- Single Row Query: [http://localhost:8080/db](http://localhost:8080/db) -- Multi Row Query: [http://localhost:8080/queries](http://localhost:8080/queries) -- Fortunes: [http://localhost:8080/fortunes](http://localhost:8080/fortunes) -- Update Query: [http://localhost:8080/updates](http://localhost:8080/updates) -- Plaintext: [http://localhost:8080/plaintext](http://localhost:8080/plaintext) \ No newline at end of file + +### 1. JSON Serialization + + http://localhost:8000/json + +### 2. Single Database Query + + http://localhost:8000/db + +### 3. Multiple Database Queries + + http://localhost:8000/queries?q={count} + +### 4. Fortunes + + http://localhost:8000/fortunes + +### 5. Database Updates + + http://localhost:8000/updates?q={count} + +### 6. Plaintext + + http://localhost:8000/plaintext \ No newline at end of file diff --git a/frameworks/Rust/ohkami/benchmark_config.json b/frameworks/Rust/ohkami/benchmark_config.json index b80c54f8be3..d09a2d32926 100644 --- a/frameworks/Rust/ohkami/benchmark_config.json +++ b/frameworks/Rust/ohkami/benchmark_config.json @@ -3,24 +3,26 @@ "tests": [ { "default": { - "json_url": "/json", - "plaintext_url": "/plaintext", - "fortune_url": "/fortunes", - "db_url": "/db", - "query_url": "/queries?q=", - "update_url": "/updates?q=", - "port": 8080, - "approach": "Realistic", + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?q=", + "fortune_url": "/fortunes", + "update_url": "/updates?q=", + "plaintext_url": "/plaintext", + "port": 8000, + "approach": "Realistic", "classification": "Micro", - "database": "Postgres", - "framework": "ohkami", - "language": "Rust", - "orm": "Raw", - "platform": "Rust", - "webserver": "ohkami", - "os": "Linux", - "database_os": "Linux", - "display_name": "ohkami" + "database": "Postgres", + "framework": "ohkami", + "language": "Rust", + "orm": "Raw", + "platform": "None", + "webserver": "ohkami", + "os": "Linux", + "database_os": "Linux", + "display_name": "ohkami", + "notes": "", + "versus": "None" } } ] diff --git a/frameworks/Rust/ohkami/config.toml b/frameworks/Rust/ohkami/config.toml new file mode 100644 index 00000000000..85eddc62c99 --- /dev/null +++ b/frameworks/Rust/ohkami/config.toml @@ -0,0 +1,19 @@ +[framework] +name = "ohkami" + +[main] +urls.json = "/json" +urls.db = "/db" +urls.query = "/queries?q=" +urls.fortune = "/fortunes" +urls.update = "/updates?q=" +urls.plaintext = "/plaintext" +approach = "Realistic" +classification = "Micro" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "None" +webserver = "ohkami" +versus = "None" \ No newline at end of file diff --git a/frameworks/Rust/ohkami/ohkami.dockerfile b/frameworks/Rust/ohkami/ohkami.dockerfile index ccecec92039..e528d58373e 100644 --- a/frameworks/Rust/ohkami/ohkami.dockerfile +++ b/frameworks/Rust/ohkami/ohkami.dockerfile @@ -1,13 +1,19 @@ -FROM rust:1.65 +FROM rust:1.76-slim-buster +WORKDIR /ohkami_framework_benchmarks -RUN apt update -yqq \ - && apt install -yqq cmake g++ +ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world +ENV MAX_CONNECTIONS=56 +ENV MIN_CONNECTIONS=56 -ADD ./ /ohkami -WORKDIR /ohkami +COPY ./src ./src +COPY ./templates ./templates +COPY ./Cargo.toml ./Cargo.toml +COPY ./Cargo.lock ./Cargo.lock -RUN cargo clean \ - && RUSTFLAGS="-C target-cpu=native" cargo build --release +RUN apt update && apt install -y --no-install-recommends \ + libpq-dev pkg-config libssl-dev && \ + rm -rf /var/lib/apt/lists/* -EXPOSE 8080 -CMD ./target/release/ohkami \ No newline at end of file +RUN RUSTFLAGS="-C target-cpu=native" cargo build --release +EXPOSE 8000 +CMD ./target/release/ohkami_framework_benchmarks \ No newline at end of file diff --git a/frameworks/Rust/ohkami/src/components.rs b/frameworks/Rust/ohkami/src/components.rs deleted file mode 100644 index 7fab61e573b..00000000000 --- a/frameworks/Rust/ohkami/src/components.rs +++ /dev/null @@ -1,60 +0,0 @@ -pub(crate) mod consts { - use std::ops::RangeInclusive; - - pub const RAND_RANGE: RangeInclusive = 1..=10000; - pub const DB_URL: &'static str = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world?sslmode=disable"; - pub const MAX_CONNECTIONS: u32 = 10000; -} - -pub(crate) mod models { - use serde::Serialize; - use sqlx::FromRow; - use yarte::Template; - - #[derive(FromRow, Serialize)] - pub struct World { - id: i32, - randomnumber: i32, - } impl World { - pub fn set_randomnumber(&mut self, new_randomnumber: i32) { - self.randomnumber = new_randomnumber - } - } - - #[derive(FromRow, Serialize)] - pub struct Fortune { - pub id: i32, - pub message: String, - } - #[derive(Template)] - #[template(path = "fortunes.hbs")] - pub(crate) struct FortunesTemplate { - pub(crate) fortunes: Vec - } -} - -pub(crate) mod functions { - use ohkami::{prelude::Body, result::{Result, ElseResponseWithErr}, response::Response}; - use rand::Rng; - use yarte::Template; - use super::{models::{Fortune, FortunesTemplate}, consts::RAND_RANGE}; - - pub fn random_i32() -> i32 { - rand::thread_rng().gen_range(RAND_RANGE) as i32 - } - pub fn random_i32s(n: usize) -> std::vec::IntoIter { - let mut generator = rand::thread_rng(); - let mut i32s = Vec::with_capacity(n); - for _ in 0..n { - i32s.push(generator.gen_range(RAND_RANGE) as i32) - } - i32s.into_iter() - } - pub fn render_html(fortunes: Vec) -> Result { - Response::OK(Body::html( - FortunesTemplate {fortunes} - .call() - ._else(|_| Response::InternalServerError("failed to render template"))? - )) - } -} diff --git a/frameworks/Rust/ohkami/src/main.rs b/frameworks/Rust/ohkami/src/main.rs index de77651f067..bcac0f3a2ef 100644 --- a/frameworks/Rust/ohkami/src/main.rs +++ b/frameworks/Rust/ohkami/src/main.rs @@ -1,97 +1,74 @@ -use ohkami::{prelude::*, json}; -use sqlx::postgres::PgPoolOptions; -mod components; use components::{ - consts::{DB_URL, MAX_CONNECTIONS}, - models::{World, Fortune}, - functions::{random_i32, random_i32s, render_html}, -}; - -fn main() -> Result<()> { - let config = Config { - db_profile: DBprofile { - pool_options: PgPoolOptions::new().max_connections(MAX_CONNECTIONS), - url: DB_URL, - }, - log_subscribe: None, - ..Default::default() - }; - - Server::setup_with(config) - .GET("/json", || async {Response::OK(json!("message": "Hello, World!"))}) - .GET("/plaintext", || async {Response::OK("Hello, World!")}) - .GET("/db", handle_db) - .GET("/fortunes", handle_fortunes) - .GET("/queries", handle_queries) - .GET("/updates", handle_updates) - .serve_on(":8080") +mod models; +pub use models::{Fortune, Message, World, WorldsQuery}; + +mod postgres; +pub use postgres::Postgres; + +mod templates; +pub use templates::FortunesTemplate; + +use ohkami::{Ohkami, Route, Memory}; + + +#[tokio::main] +async fn main() { + struct SetServer; + impl ohkami::BackFang for SetServer { + type Error = std::convert::Infallible; + #[inline(always)] + async fn bite(&self, res: &mut ohkami::Response, _req: &ohkami::Request) -> Result<(), Self::Error> { + res.headers.set().Server("ohkami"); + Ok(()) + } + } + + Ohkami::with((SetServer, Postgres::init().await), ( + "/json" .GET(json_serialization), + "/db" .GET(single_database_query), + "/queries" .GET(multiple_database_query), + "/fortunes" .GET(fortunes), + "/updates" .GET(database_updates), + "/plaintext".GET(plaintext), + )).howl("0.0.0.0:8000").await +} + +async fn json_serialization() -> Message { + Message { + message: "Hello, World!" + } } -async fn handle_db(ctx: Context) -> Result { - let id = random_i32(); - let world = sqlx::query_as::<_, World>( - "SELECT id, randomnumber FROM world WHERE id = $1" - ).bind(id) - .fetch_one(ctx.pool()) - .await?; - Response::OK(json(&world)?) +async fn single_database_query(p: Memory<'_, Postgres>) -> World { + p.select_random_world().await } -async fn handle_fortunes(ctx: Context) -> Result { - let mut fortunes = sqlx::query_as::<_, Fortune>( - "SELECT id, message FROM fortune" - ) - .fetch_all(ctx.pool()) - .await?; +async fn multiple_database_query(q: WorldsQuery<'_>, p: Memory<'_, Postgres>) -> Vec { + let n = q.parse(); + p.select_n_random_worlds(n).await +} + +async fn fortunes(p: Memory<'_, Postgres>) -> FortunesTemplate { + let mut fortunes = p.select_all_fortunes().await; + fortunes.push(Fortune { id: 0, - message: "Additional fortune added at request time.".into(), + message: String::from("Additional fortune added at request time."), }); - fortunes.sort_unstable_by(|it, next| it.message.cmp(&next.message)); - render_html(fortunes) + + fortunes.sort_unstable_by(|a, b| str::cmp(&a.message, &b.message)); + + FortunesTemplate { fortunes } } -async fn handle_queries(ctx: Context) -> Result { - let count = { - let queries = ctx.query::<&str>("q").unwrap_or("1").parse::().unwrap_or(1); - if queries < 1 {1} else if 500 < queries {500} else {queries} - }; - let mut worlds = Vec::with_capacity(count); - for id in random_i32s(count) { - worlds.push( - sqlx::query_as::<_, World>( - "SELECT id, randomnumber FROM world WHERE id = $1" - ).bind(id) - .fetch_one(ctx.pool()) - .await? - ) - } - Response::OK(json(&worlds)?) +async fn database_updates(q: WorldsQuery<'_>, p: Memory<'_, Postgres>) -> Vec { + let n = q.parse(); + let mut worlds = p.select_n_random_worlds(n).await; + + p.update_random_ids_of_worlds(&mut worlds).await; + + worlds } -async fn handle_updates(ctx: Context) -> Result { - let count = { - let queries = ctx.query::<&str>("q").unwrap_or("1").parse::().unwrap_or(1); - if queries < 1 {1} else if 500 < queries {500} else {queries} - }; - let mut worlds = Vec::with_capacity(count); - let mut new_randomnumbers = random_i32s(count); - for id in random_i32s(count) { - let mut world = sqlx::query_as::<_, World>( - "SELECT id, randomnumber FROM world WHERE id = $1" - ).bind(id) - .fetch_one(ctx.pool()) - .await?; - - let new_randomnumber = new_randomnumbers.next().unwrap(); - world.set_randomnumber(new_randomnumber); - - sqlx::query("UPDATE world SET randomnumber = $1 WHERE id = $2") - .bind(new_randomnumber) - .bind(id) - .execute(ctx.pool()) - .await?; - - worlds.push(world) - } - Response::OK(json(&worlds)?) +async fn plaintext() -> &'static str { + "Hello, World!" } diff --git a/frameworks/Rust/ohkami/src/models.rs b/frameworks/Rust/ohkami/src/models.rs new file mode 100644 index 00000000000..3896cedc28a --- /dev/null +++ b/frameworks/Rust/ohkami/src/models.rs @@ -0,0 +1,36 @@ +use ohkami::typed::{ResponseBody, Query}; + + +#[ResponseBody(JSONS)] +pub struct Message { + pub message: &'static str, +} + +#[derive(sqlx::FromRow)] +pub struct Fortune { + pub id: i32, + pub message: String, +} + +#[derive(sqlx::FromRow)] +#[ResponseBody(JSONS)] +pub struct World { + pub id: i32, + #[serde(rename="randomNumber")] + pub randomnumber: i32, +} + +#[Query] +pub struct WorldsQuery<'q> { + q: Option<&'q str>, +} +impl WorldsQuery<'_> { + #[inline(always)] + pub fn parse(self) -> usize { + match self.q.unwrap_or("1").parse::().unwrap_or(1) { + n @ 1..=500 => n, + 0 => 1, + 501.. => 500, + } + } +} diff --git a/frameworks/Rust/ohkami/src/postgres.rs b/frameworks/Rust/ohkami/src/postgres.rs new file mode 100644 index 00000000000..3f5a50a02ea --- /dev/null +++ b/frameworks/Rust/ohkami/src/postgres.rs @@ -0,0 +1,102 @@ +use futures_util::{stream::FuturesUnordered, TryStreamExt}; +use rand::{rngs::SmallRng, SeedableRng, Rng, thread_rng}; +use crate::models::{World, Fortune}; + + +#[derive(Clone)] +pub struct Postgres(sqlx::PgPool); + +impl Postgres { + pub async fn init() -> impl ohkami::FrontFang { + pub struct UsePostgres(Postgres); + + impl ohkami::FrontFang for UsePostgres { + type Error = std::convert::Infallible; + #[inline(always)] + async fn bite(&self, req: &mut ohkami::Request) -> Result<(), Self::Error> { + req.memorize(self.0.clone()); + Ok(()) + } + } + + macro_rules! load_env { + ($($name:ident as $t:ty)*) => { + $( + #[allow(non_snake_case)] + let $name = ::std::env::var(stringify!($name)) + .expect(concat!( + "Failed to load environment variable ", + "`", stringify!($name), "`" + )) + .parse::<$t>() + .unwrap(); + )* + }; + } load_env! { + MAX_CONNECTIONS as u32 + MIN_CONNECTIONS as u32 + DATABASE_URL as String + } + + UsePostgres(Self( + sqlx::postgres::PgPoolOptions::new() + .max_connections(MAX_CONNECTIONS) + .min_connections(MIN_CONNECTIONS) + .connect(&DATABASE_URL).await + .unwrap() + )) + } +} + +impl Postgres { + pub async fn select_random_world(&self) -> World { + let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); + + sqlx::query_as( + "SELECT id, randomnumber FROM World WHERE id = $1") + .bind((rng.gen::() % 10_000 + 1) as i32) + .fetch_one(&self.0).await + .expect("Failed to fetch a world") + } + + pub async fn select_all_fortunes(&self) -> Vec { + sqlx::query_as( + "SELECT id, message FROM Fortune") + .fetch_all(&self.0).await + .expect("Failed to fetch fortunes") + } + + pub async fn select_n_random_worlds(&self, n: usize) -> Vec { + let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); + + let selects = FuturesUnordered::new(); + for _ in 0..n { + selects.push( + sqlx::query_as( + "SELECT id, randomnumber FROM World WHERE id = $1") + .bind((rng.gen::() % 10_000 + 1) as i32) + .fetch_one(&self.0) + ) + } + + selects.try_collect().await.expect("Failed to fetch worlds") + } + + pub async fn update_random_ids_of_worlds(&self, worlds: &mut Vec) { + let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); + + let updates = FuturesUnordered::new(); + for w in worlds { + w.randomnumber = (rng.gen::() % 10_000 + 1) as i32; + updates.push( + sqlx::query( + "UPDATE World SET randomnumber = $1 WHERE id = $2") + .bind(w.randomnumber) + .bind(w.id) + .execute(&self.0) + ) + } + + let _: sqlx::postgres::PgQueryResult = updates.try_collect().await.expect("Failed to fetch worlds"); + } +} diff --git a/frameworks/Rust/ohkami/src/templates.rs b/frameworks/Rust/ohkami/src/templates.rs new file mode 100644 index 00000000000..d52ffcb2b3a --- /dev/null +++ b/frameworks/Rust/ohkami/src/templates.rs @@ -0,0 +1,18 @@ +use ohkami::{Response, IntoResponse}; +use crate::models::Fortune; + + +#[derive(yarte::Template)] +#[template(path="fortunes")] +pub struct FortunesTemplate { + pub fortunes: Vec, +} +impl IntoResponse for FortunesTemplate { + #[inline(always)] + fn into_response(self) -> Response { + ohkami::utils::HTML( + ::call(&self) + .expect("Failed to render fortunes template") + ).into_response() + } +} diff --git a/frameworks/Rust/pavex/Cargo.lock b/frameworks/Rust/pavex/Cargo.lock index 55bef569ece..cf9569133b4 100644 --- a/frameworks/Rust/pavex/Cargo.lock +++ b/frameworks/Rust/pavex/Cargo.lock @@ -81,6 +81,12 @@ dependencies = [ "cc", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "fnv" version = "1.0.7" @@ -147,9 +153,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.18" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -157,7 +163,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -170,6 +176,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "hermit-abi" version = "0.2.6" @@ -244,10 +256,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "itoa" version = "1.0.6" @@ -256,9 +278,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "libc" -version = "0.2.142" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "lock_api" @@ -293,14 +315,14 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mio" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -339,7 +361,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -350,7 +372,7 @@ dependencies = [ "anyhow", "fs-err", "http", - "indexmap", + "indexmap 1.9.3", "pavex_runtime", "ron", "serde", @@ -585,7 +607,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -695,7 +717,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -704,13 +735,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -719,38 +765,80 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" diff --git a/frameworks/Rust/rocket/Cargo.lock b/frameworks/Rust/rocket/Cargo.lock index 4f45a3f3f13..b22dcf8b1f9 100644 --- a/frameworks/Rust/rocket/Cargo.lock +++ b/frameworks/Rust/rocket/Cargo.lock @@ -428,6 +428,12 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "event-listener" version = "2.5.3" @@ -671,9 +677,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.15" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -681,7 +687,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -717,6 +723,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "hashlink" version = "0.7.0" @@ -856,6 +868,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "inlinable_string" version = "0.1.15" @@ -1554,7 +1576,7 @@ dependencies = [ "either", "figment", "futures", - "indexmap", + "indexmap 1.9.2", "log", "memchr", "multer", @@ -1586,7 +1608,7 @@ checksum = "d6aeb6bb9c61e9cd2c00d70ea267bf36f76a4cc615e5908b349c2f9d93999b47" dependencies = [ "devise", "glob", - "indexmap", + "indexmap 1.9.2", "proc-macro2", "quote", "rocket_http", @@ -1640,7 +1662,7 @@ dependencies = [ "futures", "http", "hyper", - "indexmap", + "indexmap 1.9.2", "log", "memchr", "pear", @@ -1938,7 +1960,7 @@ dependencies = [ "hex", "hkdf", "hmac", - "indexmap", + "indexmap 1.9.2", "itoa", "libc", "log", diff --git a/frameworks/Rust/salvo/Cargo.toml b/frameworks/Rust/salvo/Cargo.toml index 82b6107eb70..cbeaff5e350 100644 --- a/frameworks/Rust/salvo/Cargo.toml +++ b/frameworks/Rust/salvo/Cargo.toml @@ -40,16 +40,16 @@ anyhow = "1" async-trait = "0.1" bytes = "1" diesel = { version = "2", features = ["postgres", "r2d2"] } -deadpool = { version = "0.9", features = ["rt_tokio_1", "serde", "async-trait", "managed"] } -deadpool-postgres = "0.10" +deadpool = { version = "0.10", features = ["rt_tokio_1", "serde", "async-trait", "managed"] } +deadpool-postgres = "0.11" futures-util = "0.3" -lru = "0.11.0" -markup = "0.13" +lru = "0.12.0" +markup = "0.15" # mimalloc = { version = "0.1", default-features = false } mongodb = { version = "2.4.0", features = ["zstd-compression", "snappy-compression", "zlib-compression"] } once_cell = "1" rand = { version = "0.8", features = ["min_const_gen", "small_rng"] } -salvo = { version = "0.55", default-features = false, features = ["anyhow", "http1", "affix"] } +salvo = { version = "0.63", default-features = false, features = ["anyhow", "server", "http1", "affix"] } serde = { version = "1", features = ["derive"] } serde_json = "1" # smallvec = "1" diff --git a/frameworks/Rust/salvo/salvo-diesel.dockerfile b/frameworks/Rust/salvo/salvo-diesel.dockerfile index 9a1538291c4..81a2dbaa0a8 100644 --- a/frameworks/Rust/salvo/salvo-diesel.dockerfile +++ b/frameworks/Rust/salvo/salvo-diesel.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world ENV TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/salvo/salvo-lru.dockerfile b/frameworks/Rust/salvo/salvo-lru.dockerfile index 6c21d0630d7..8cb63d2c03e 100644 --- a/frameworks/Rust/salvo/salvo-lru.dockerfile +++ b/frameworks/Rust/salvo/salvo-lru.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world diff --git a/frameworks/Rust/salvo/salvo-mongo-raw.dockerfile b/frameworks/Rust/salvo/salvo-mongo-raw.dockerfile index 93d580b6098..ca7a5c8b495 100644 --- a/frameworks/Rust/salvo/salvo-mongo-raw.dockerfile +++ b/frameworks/Rust/salvo/salvo-mongo-raw.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017 ENV TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/salvo/salvo-mongo.dockerfile b/frameworks/Rust/salvo/salvo-mongo.dockerfile index fe92c417c15..77fccfa0a50 100644 --- a/frameworks/Rust/salvo/salvo-mongo.dockerfile +++ b/frameworks/Rust/salvo/salvo-mongo.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017 ENV TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/salvo/salvo-pg-pool.dockerfile b/frameworks/Rust/salvo/salvo-pg-pool.dockerfile index 4ce679efee2..40947697908 100644 --- a/frameworks/Rust/salvo/salvo-pg-pool.dockerfile +++ b/frameworks/Rust/salvo/salvo-pg-pool.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world ENV TECHEMPOWER_MAX_POOL_SIZE=28 diff --git a/frameworks/Rust/salvo/salvo-pg.dockerfile b/frameworks/Rust/salvo/salvo-pg.dockerfile index a694661fc8c..b4c10866c21 100644 --- a/frameworks/Rust/salvo/salvo-pg.dockerfile +++ b/frameworks/Rust/salvo/salvo-pg.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world diff --git a/frameworks/Rust/salvo/salvo-sqlx.dockerfile b/frameworks/Rust/salvo/salvo-sqlx.dockerfile index a947139d101..d3d0f56080b 100644 --- a/frameworks/Rust/salvo/salvo-sqlx.dockerfile +++ b/frameworks/Rust/salvo/salvo-sqlx.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ENV TECHEMPOWER_POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world ENV TECHEMPOWER_MAX_POOL_SIZE=56 diff --git a/frameworks/Rust/salvo/salvo.dockerfile b/frameworks/Rust/salvo/salvo.dockerfile index 1e88321d350..186f5d755ee 100644 --- a/frameworks/Rust/salvo/salvo.dockerfile +++ b/frameworks/Rust/salvo/salvo.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.74 ADD ./ /salvo WORKDIR /salvo diff --git a/frameworks/Rust/trillium/Cargo.lock b/frameworks/Rust/trillium/Cargo.lock index 080f122ca49..ab1aceee5e0 100644 --- a/frameworks/Rust/trillium/Cargo.lock +++ b/frameworks/Rust/trillium/Cargo.lock @@ -2,21 +2,26 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", ] [[package]] @@ -26,31 +31,86 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" [[package]] -name = "arrayvec" -version = "0.5.2" +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "anstream" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] [[package]] name = "askama" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" dependencies = [ "askama_derive", "askama_escape", - "askama_shared", + "humansize", + "num-traits", + "percent-encoding", ] [[package]] name = "askama_derive" -version = "0.11.2" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87bf87e6e8b47264efa9bde63d6225c6276a52e05e91bf37eaa8afd0032d6b71" +checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83" dependencies = [ - "askama_shared", + "askama_parser", + "basic-toml", + "mime", + "mime_guess", "proc-macro2", - "syn", + "quote", + "serde", + "syn 2.0.48", ] [[package]] @@ -60,153 +120,156 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] -name = "askama_shared" -version = "0.12.2" +name = "askama_parser" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf722b94118a07fcbc6640190f247334027685d4e218b794dbfe17c32bf38ed0" +checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0" dependencies = [ - "askama_escape", - "humansize", - "mime", - "mime_guess", "nom", - "num-traits", - "percent-encoding", - "proc-macro2", - "quote", - "serde", - "syn", - "toml", ] [[package]] name = "async-channel" -version = "1.6.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 5.0.0", + "event-listener-strategy 0.5.0", "futures-core", + "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ + "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", + "fastrand 2.0.1", + "futures-lite 2.2.0", "slab", ] [[package]] name = "async-global-executor" -version = "2.0.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel", + "async-channel 2.2.0", "async-executor", - "async-io", - "async-mutex", + "async-io 2.3.1", + "async-lock 3.3.0", "blocking", - "futures-lite", - "num_cpus", + "futures-lite 2.2.0", "once_cell", ] [[package]] name = "async-io" -version = "1.6.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ + "async-lock 2.8.0", + "autocfg", + "cfg-if", "concurrent-queue", - "futures-lite", - "libc", + "futures-lite 1.13.0", "log", - "once_cell", "parking", - "polling", + "polling 2.8.0", + "rustix 0.37.27", "slab", "socket2", "waker-fn", - "winapi", ] [[package]] -name = "async-lock" -version = "2.4.0" +name = "async-io" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "event-listener", + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.2.0", + "parking", + "polling 3.4.0", + "rustix 0.38.31", + "slab", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "async-mutex" -version = "1.4.0" +name = "async-lock" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", ] [[package]] -name = "async-native-tls" -version = "0.3.3" +name = "async-lock" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9e7a929bd34c68a82d58a4de7f86fffdaf97fb2af850162a7bb19dd7269b33" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "async-std", - "native-tls", - "thiserror", - "url", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", ] [[package]] -name = "async-process" -version = "1.3.0" +name = "async-net" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "async-io", + "async-io 2.3.1", "blocking", - "cfg-if", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi", + "futures-lite 2.2.0", ] [[package]] name = "async-std" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-global-executor", - "async-io", - "async-lock", - "async-process", + "async-io 1.13.0", + "async-lock 2.8.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", "memchr", - "num_cpus", "once_cell", "pin-project-lite", "pin-utils", @@ -216,92 +279,94 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "async-task" -version = "4.0.3" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.52" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] +[[package]] +name = "async_cell" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "834eee9ce518130a3b4d5af09ecc43e9d6b57ee76613f227a1ddd6b77c7a62bc" + [[package]] name = "atoi" -version = "0.4.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ "num-traits", ] [[package]] name = "atomic-waker" -version = "1.0.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "atty" -version = "0.2.14" +name = "atomic-write-file" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "nix", + "rand", ] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "bae" -version = "0.1.7" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64" -version = "0.13.0" +name = "basic-toml" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" +dependencies = [ + "serde", +] [[package]] name = "bitflags" @@ -309,58 +374,100 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "block-buffer" -version = "0.9.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "blocking" -version = "1.1.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", + "async-channel 2.2.0", + "async-lock 3.3.0", "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.2.0", + "piper", + "tracing", ] [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bytecount" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] -name = "cache-padded" -version = "1.1.1" +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", +] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -369,44 +476,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chrono" -version = "0.4.19" +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "serde", - "time", - "winapi", -] +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "atty", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "concurrent-queue" -version = "1.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ - "cache-padded", + "crossbeam-utils", ] [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -414,227 +512,319 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "1.1.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] -name = "crossbeam-queue" -version = "0.3.2" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] -name = "crossbeam-utils" -version = "0.8.8" +name = "crossbeam-queue" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", - "lazy_static", + "crossbeam-utils", ] [[package]] -name = "crypto-mac" -version = "0.11.1" +name = "crossbeam-utils" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] -name = "ctor" -version = "0.1.21" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "quote", - "syn", + "generic-array", + "typenum", ] [[package]] -name = "digest" -version = "0.9.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "generic-array", + "powerfmt", ] [[package]] -name = "dirs" -version = "3.0.2" +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "dirs-sys", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "dirs-sys" -version = "0.3.6" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "libc", - "redox_users", - "winapi", + "block-buffer", + "crypto-common", + "subtle", ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +dependencies = [ + "serde", +] [[package]] name = "encoding_rs" -version = "0.8.30" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] -name = "event-listener" -version = "2.5.1" +name = "env_filter" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] [[package]] -name = "fastrand" -version = "1.7.0" +name = "env_logger" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" dependencies = [ - "instant", + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "foreign-types" -version = "0.3.2" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "foreign-types-shared", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "foreign-types-shared" -version = "0.1.1" +name = "error-chain" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" +dependencies = [ + "version_check", +] [[package]] -name = "form_urlencoded" -version = "1.0.1" +name = "etcetera" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "matches", - "percent-encoding", + "cfg-if", + "home", + "windows-sys 0.48.0", ] [[package]] -name = "futures" -version = "0.3.18" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", ] [[package]] -name = "futures-channel" -version = "0.3.21" +name = "event-listener" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "b72557800024fabbaa2449dd4bf24e37b93702d457a4d4f2b0dd1f0f039f20c1" dependencies = [ - "futures-core", - "futures-sink", + "concurrent-queue", + "parking", + "pin-project-lite", ] [[package]] -name = "futures-core" -version = "0.3.21" +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.0.0", + "pin-project-lite", +] [[package]] -name = "futures-executor" -version = "0.3.18" +name = "fastrand" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ + "instant", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", "futures-core", + "futures-io", + "futures-sink", "futures-task", "futures-util", ] +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + [[package]] name = "futures-intrusive" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", @@ -643,17 +833,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -662,34 +852,47 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -705,9 +908,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -715,82 +918,66 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "gloo-timers" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", "js-sys", "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "h2" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", ] [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", + "allocator-api2", ] [[package]] name = "hashlink" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown", ] [[package]] name = "heck" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -799,113 +986,90 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hmac" -version = "0.11.0" +name = "hkdf" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "crypto-mac", - "digest", + "hmac", ] [[package]] -name = "http" -version = "0.2.5" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "bytes", - "fnv", - "itoa 0.4.8", + "digest", ] [[package]] -name = "http-body" -version = "0.4.4" +name = "home" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "windows-sys 0.52.0", ] [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humansize" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" - -[[package]] -name = "hyper" -version = "0.14.16" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa 0.4.8", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", + "libm", ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "humantime" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "idna" -version = "0.2.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.7.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] +[[package]] +name = "inherent" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "instant" version = "0.1.12" @@ -916,37 +1080,56 @@ dependencies = [ ] [[package]] -name = "ipnet" -version = "2.3.1" +name = "io-lifetimes" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.48.0", +] [[package]] name = "itertools" -version = "0.10.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "itoa" -version = "1.0.1" +name = "jemalloc-sys" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" +dependencies = [ + "jemalloc-sys", + "libc", +] [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -968,74 +1151,68 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", "value-bag", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "md-5" -version = "0.9.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "block-buffer", + "cfg-if", "digest", - "opaque-debug", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memmem" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64a92489e2744ce060c349162be1c5f33c6969234104dbd99ddb5feb08b8c15" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime-db" -version = "1.6.0" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7c816ec30c41f873e1eea969aa2261d78756629e468a427244ff8658b75e7d" -dependencies = [ - "reqwest", - "serde", - "tokio", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -1054,32 +1231,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mio" -version = "0.7.14" +name = "moka" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "b1911e88d5831f748a4097a43862d129e3c6fca831eecac9b8db6d01d93c9de2" dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "async-lock 2.8.0", + "async-trait", + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "futures-util", + "once_cell", + "parking_lot", + "quanta", + "rustc_version", + "skeptic", + "smallvec", + "tagptr", + "thiserror", + "triomphe", + "uuid", ] [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1094,84 +1273,63 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" -dependencies = [ - "memchr", - "minimal-lexical", - "version_check", -] - -[[package]] -name = "ntapi" -version = "0.3.6" +name = "nix" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "winapi", + "bitflags 2.4.2", + "cfg-if", + "libc", ] [[package]] -name = "num-bigint" -version = "0.3.3" +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "memchr", + "minimal-lexical", ] [[package]] -name = "num-integer" -version = "0.1.44" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] [[package]] -name = "num_cpus" -version = "1.13.0" +name = "num_threads" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ - "hermit-abi", "libc", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -1182,26 +1340,26 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -1209,92 +1367,105 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "ordered-float" +version = "3.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" +dependencies = [ + "num-traits", +] + [[package]] name = "ouroboros" -version = "0.14.2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71643f290d126e18ac2598876d01e1d57aed164afc78fdb6e2a0c6589a1f6662" +checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" dependencies = [ "aliasable", "ouroboros_macro", - "stable_deref_trait", + "static_assertions", ] [[package]] name = "ouroboros_macro" -version = "0.14.2" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9a247206016d424fe8497bc611e510887af5c261fbbf977877c4bb55ca4d82" +checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" dependencies = [ - "Inflector", + "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "parking" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-targets 0.48.5", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.0.8" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.8" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1302,30 +1473,64 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" -version = "0.3.24" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" -version = "2.2.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ + "autocfg", + "bitflags 1.3.2", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "winapi", + "pin-project-lite", + "windows-sys 0.48.0", +] + +[[package]] +name = "polling" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-error" @@ -1336,7 +1541,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1353,32 +1558,57 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.33" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" +dependencies = [ + "bitflags 2.4.2", + "memchr", + "unicase", +] + +[[package]] +name = "quanta" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" +checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" dependencies = [ - "unicode-xid", + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -1393,236 +1623,222 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] -name = "rand_hc" -version = "0.3.1" +name = "raw-cpuid" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "rand_core", + "bitflags 2.4.2", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.0" +name = "regex" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ - "getrandom", - "redox_syscall", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-automata" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ - "winapi", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "reqwest" -version = "0.11.7" +name = "regex-syntax" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bea77bc708afa10e59905c3d4af7c8fd43c9214251673095ff8b14345fcbc5" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rlimit" -version = "0.6.2" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc0bf25554376fd362f54332b8410a625c71f15445bca32ffdfdf4ec9ac91726" +checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" dependencies = [ "libc", ] [[package]] name = "routefinder" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480a056df7cdee2fd55df6dc10ce137c70b00cc65f20a16f796d2250ef8e0cd8" +checksum = "0971d3c8943a6267d6bd0d782fdc4afa7593e7381a92a3df950ff58897e066b5" dependencies = [ "smartcow", "smartstring", ] [[package]] -name = "rust_decimal" -version = "1.18.0" +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b5a9625a7e6060b23db692facf49082cc78889a7e6ac94a735356ae49db4b0" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "arrayvec", - "num-traits", - "serde", + "semver", ] [[package]] -name = "rustversion" -version = "1.0.6" +name = "rustix" +version = "0.37.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", +] [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "lazy_static", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sea-bae" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "3bd3534a9978d0aa7edd2808dc1f8f31c4d0ecd31ddf71d997b3c98e9f3c9114" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] [[package]] name = "sea-orm" -version = "0.6.0" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd24380b48dacd3ed1c3d467c7b17ffa5818555a2c04066f4a0a9e17d830abc9" +checksum = "6632f499b80cc6aaa781b302e4c9fae663e0e3dcf2640e9d80034d5b10731efe" dependencies = [ "async-stream", "async-trait", - "chrono", "futures", - "futures-util", - "once_cell", + "log", "ouroboros", - "rust_decimal", "sea-orm-macros", "sea-query", - "sea-strum", + "sea-query-binder", "serde", - "serde_json", "sqlx", + "strum", + "thiserror", "tracing", "url", - "uuid", ] [[package]] name = "sea-orm-macros" -version = "0.6.0" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c199fa8630b1e195d7aef24ce8944af8f4ced67c4eccffd8926453b59f2565a1" +checksum = "ec13bfb4c4aef208f68dbea970dd40d13830c868aa8dcb4e106b956e6bb4f2fa" dependencies = [ - "bae", "heck", "proc-macro2", "quote", - "syn", + "sea-bae", + "syn 2.0.48", + "unicode-ident", ] [[package]] name = "sea-query" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9088ff96158860a75d98a85a654fdd9d97b10515773af6d87339bfc48258c800" -dependencies = [ - "chrono", - "rust_decimal", - "sea-query-derive", - "serde_json", - "uuid", -] - -[[package]] -name = "sea-query-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", - "thiserror", -] - -[[package]] -name = "sea-strum" -version = "0.23.0" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391d06a6007842cfe79ac6f7f53911b76dfd69fc9a6769f1cf6569d12ce20e1b" +checksum = "4166a1e072292d46dc91f31617c2a1cdaf55a8be4b5c9f4bf2ba248e3ac4999b" dependencies = [ - "sea-strum_macros", + "derivative", + "inherent", + "ordered-float", ] [[package]] -name = "sea-strum_macros" -version = "0.23.0" +name = "sea-query-binder" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" +checksum = "36bbb68df92e820e4d5aeb17b4acd5cc8b5d18b2c36a4dd6f4626aabfa7ab1b9" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", + "sea-query", + "sqlx", ] [[package]] name = "security-framework" -version = "2.4.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1631,89 +1847,93 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +dependencies = [ + "serde", +] + [[package]] name = "serde" -version = "1.0.136" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 0.4.8", + "itoa", "ryu", "serde", ] [[package]] -name = "sha-1" -version = "0.9.8" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer", "cfg-if", "cpufeatures", "digest", - "opaque-debug", ] [[package]] name = "sha2" -version = "0.9.8" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer", "cfg-if", "cpufeatures", "digest", - "opaque-debug", ] [[package]] name = "signal-hook" -version = "0.3.12" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35dfd12afb7828318348b8c408383cf5071a086c1d4ab1c0f9840ec92dbb922" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -1721,69 +1941,86 @@ dependencies = [ [[package]] name = "signal-hook-async-std" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90526e74631c69a79b38212e3d4fda4b00de9d6be56b3cead133bf67ad371af1" +checksum = "0c4aa94397e2023af5b7cff5b8d4785e935cfb77f0e4aab0cae3b26258ace556" dependencies = [ - "async-io", - "futures-lite", + "async-io 1.13.0", + "futures-lite 1.13.0", "libc", "signal-hook", ] [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "size" -version = "0.1.2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" + +[[package]] +name = "skeptic" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5021178e8e70579d009fb545932e274ec2dde4c917791c6063d1002bee2a56" +checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" dependencies = [ - "num-traits", + "bytecount", + "cargo_metadata", + "error-chain", + "glob", + "pulldown-cmark", + "tempfile", + "walkdir", ] [[package]] name = "slab" -version = "0.4.5" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.7.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smartcow" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e3ed3ccf93c7425507e5e2261a3fc90d14267d491f360b9b679ae0a4ce693e" +checksum = "656fcb1c1fca8c4655372134ce87d8afdf5ec5949ebabe8d314be0141d8b5da2" dependencies = [ "smartstring", ] [[package]] name = "smartstring" -version = "0.2.9" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31aa6a31c0c2b21327ce875f7e8952322acfcfd0c27569a6e18a647281352c9b" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" dependencies = [ + "autocfg", "static_assertions", + "version_check", ] [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -1791,9 +2028,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.1.8" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ "itertools", "nom", @@ -1802,103 +2039,133 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7911b0031a0247af40095838002999c7a52fba29d9739e93326e71a5a1bc9d43" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-postgres", ] [[package]] name = "sqlx-core" -version = "0.5.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ "ahash", + "async-io 1.13.0", + "async-std", "atoi", - "base64", - "bitflags", "byteorder", "bytes", - "chrono", "crc", - "crossbeam-channel", "crossbeam-queue", - "crossbeam-utils", - "dirs", + "dotenvy", "either", + "event-listener 2.5.3", "futures-channel", "futures-core", "futures-intrusive", + "futures-io", "futures-util", "hashlink", "hex", - "hmac", "indexmap", - "itoa 0.4.8", - "libc", "log", - "md-5", "memchr", - "num-bigint", + "native-tls", "once_cell", - "parking_lot", + "paste", "percent-encoding", - "rand", - "rust_decimal", "serde", "serde_json", - "sha-1", "sha2", "smallvec", "sqlformat", - "sqlx-rt", - "stringprep", "thiserror", + "tracing", "url", - "uuid", - "whoami", ] [[package]] name = "sqlx-macros" -version = "0.5.9" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" dependencies = [ - "dotenv", + "async-std", + "atomic-write-file", + "dotenvy", "either", "heck", + "hex", "once_cell", "proc-macro2", "quote", + "serde", "serde_json", "sha2", "sqlx-core", - "sqlx-rt", - "syn", + "sqlx-postgres", + "syn 1.0.109", + "tempfile", "url", ] [[package]] -name = "sqlx-rt" -version = "0.5.9" +name = "sqlx-postgres" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d1bd069de53442e7a320f525a6d4deb8bb0621ac7a55f7eccbc2b58b57f43d0" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ - "async-native-tls", - "async-std", - "native-tls", + "atoi", + "base64", + "bitflags 2.4.2", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" @@ -1907,175 +2174,152 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stopper" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4573bf2456e356934de15c7151d1c9fc8873e8866a7c2b5e0bb20f8244bd0073" +checksum = "ed8bff52ab3d70adfb76df17a225936c7676efdda1a1567ed5b11c22e3577bd3" dependencies = [ - "futures-lite", - "pin-project", - "waker-set", + "event-listener 4.0.3", + "futures-lite 2.2.0", + "pin-project-lite", ] [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "syn" -version = "1.0.82" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + [[package]] name = "tempfile" -version = "3.2.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi", + "fastrand 2.0.1", + "rustix 0.38.31", + "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "time" -version = "0.1.44" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ + "deranged", + "itoa", "libc", - "wasi", - "winapi", -] - -[[package]] -name = "tinyvec" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" -dependencies = [ - "tinyvec_macros", + "num-conv", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "tinyvec_macros" -version = "0.1.0" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "tokio" -version = "1.14.0" +name = "time-macros" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "pin-project-lite", - "tokio-macros", - "winapi", + "num-conv", + "time-core", ] [[package]] -name = "tokio-macros" +name = "tinyvec" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "serde", + "tinyvec_macros", ] [[package]] -name = "tower-service" -version = "0.3.1" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -2084,32 +2328,32 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.19" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "trillium" -version = "0.2.2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a229016cb2f3be4209b40cfbd2f3a0cd11aa7d283be8f4612219227d3e4014e4" +checksum = "acca545b3933760b2b88b822d83e62ccf9aab8c24d16ae82e56df1f2a5af11c1" dependencies = [ "async-trait", - "futures-lite", + "futures-lite 2.2.0", "log", "trillium-http", ] @@ -2129,70 +2373,66 @@ dependencies = [ [[package]] name = "trillium-askama" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace69c685aec173f963a8ab9cb44a0efb07519878c528d1863e78a153e31331c" +checksum = "f0a4eeb5246ff1baea3c81782ee46bc4601463d75d6a8502bcf44890456b4c1e" dependencies = [ "askama", - "mime-db", - "trillium", -] - -[[package]] -name = "trillium-async-std" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaba69d82fa40cfb4ec00169ec29cad318dfbe6e4030d5a24916ef0b29131c16" -dependencies = [ - "async-std", - "log", - "signal-hook", - "signal-hook-async-std", + "mime_guess", "trillium", - "trillium-http", - "trillium-server-common", ] [[package]] name = "trillium-http" -version = "0.2.6" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35699b044a43f0284c9726c78bbea94828edb7ffbd8d7ad552f04506da256747" +checksum = "f8afd3a7e9a46df93d81229fcd2011e089ed522c55ef633edee8893a23cb88e9" dependencies = [ "encoding_rs", - "futures-lite", + "futures-lite 2.2.0", "hashbrown", "httparse", "httpdate", "log", - "memmem", + "memchr", "mime", "smallvec", "smartcow", "smartstring", "stopper", "thiserror", + "trillium-macros", ] [[package]] name = "trillium-logger" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a01e95a1a2021c465ed2773f9be589bc3b0138523389fd99366d1537c70fcd" +checksum = "8a0d5329a0826c06cd7d36a81928345d97ab5277dcc7d1d624335eb52fa22d1a" dependencies = [ - "atty", - "chrono", "colored", "log", "size", + "time", "trillium", ] +[[package]] +name = "trillium-macros" +version = "0.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916054381183f0cfed7604bf7de2044a760624a50d26eef5492468fb73083bbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "trillium-router" -version = "0.3.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20eb6edfe01b2df89944e0371453dbc288d94cf8b779f9fbd89c24ed923217a9" +checksum = "71daa9c919d4b4a7afae1a846fa2e60aad712e5b924936751630a880a84e9659" dependencies = [ "log", "routefinder", @@ -2201,18 +2441,40 @@ dependencies = [ [[package]] name = "trillium-server-common" -version = "0.3.0" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f8a8649680599d1142d454668be5f864f81809d77543ec5ac615b73241b8aa" +checksum = "9b4f157b81051bb2630b6750d6583f648f545d241ef4b939781f4ad6a45fe700" dependencies = [ - "atomic-waker", - "futures-lite", + "async-trait", + "async_cell", + "event-listener 4.0.3", + "futures-lite 2.2.0", "log", "pin-project-lite", "rlimit", "trillium", "trillium-http", - "trillium-tls-common", + "url", +] + +[[package]] +name = "trillium-smol" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91f9ca9fc22be687543ee24d23d9730f7370d57796adc2a2f2ccd9ce51b78199" +dependencies = [ + "async-global-executor", + "async-io 2.3.1", + "async-net", + "futures-lite 2.2.0", + "log", + "signal-hook", + "signal-hook-async-std", + "trillium", + "trillium-http", + "trillium-macros", + "trillium-server-common", + "url", ] [[package]] @@ -2220,78 +2482,70 @@ name = "trillium-techempower" version = "0.1.0" dependencies = [ "askama", - "fastrand", - "futures-lite", - "futures-util", + "env_logger", + "fastrand 2.0.1", + "futures-lite 2.2.0", + "jemallocator", + "moka", "sea-orm", "serde", "serde_json", "trillium", "trillium-api", "trillium-askama", - "trillium-async-std", "trillium-logger", "trillium-router", + "trillium-smol", + "unicycle", ] [[package]] -name = "trillium-tls-common" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25c024962f8fdad586fb329e91b64ef0f4034652779ef5d3720102ca0f88d714" -dependencies = [ - "async-trait", - "futures-lite", - "url", -] - -[[package]] -name = "try-lock" -version = "0.2.3" +name = "triomphe" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" [[package]] name = "typenum" -version = "1.14.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - -[[package]] -name = "unicode-xid" -version = "0.2.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -2299,37 +2553,56 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "unicycle" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edfa5ca2452d3fbf68f7078c5e7f42b96f0c0c7def017994147f8acd8c4264d" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", + "pin-project", + "uniset", +] + +[[package]] +name = "uniset" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c9f21fe154ca4d5d06fc2ebb8c58cc80e338eacc372ec794943f69e535c131c" + [[package]] name = "url" -version = "2.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" -version = "0.8.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", - "serde", ] [[package]] name = "value-bag" -version = "1.0.0-alpha.8" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" -dependencies = [ - "ctor", - "version_check", -] +checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" [[package]] name = "vcpkg" @@ -2339,47 +2612,37 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - -[[package]] -name = "waker-set" -version = "0.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e958152c46345e1af5c61812030ac85200573a0b384c137e83ce2c01ac4bc07" -dependencies = [ - "crossbeam-utils", - "slab", -] +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] -name = "want" -version = "0.3.0" +name = "walkdir" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "log", - "try-lock", + "same-file", + "winapi-util", ] [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2387,24 +2650,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -2414,9 +2677,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2424,51 +2687,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "whoami" -version = "1.2.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8" -dependencies = [ - "wasm-bindgen", - "web-sys", -] +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" [[package]] name = "winapi" @@ -2486,6 +2736,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2493,10 +2752,153 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winreg" -version = "0.7.0" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "winapi", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] diff --git a/frameworks/Rust/trillium/Cargo.toml b/frameworks/Rust/trillium/Cargo.toml index 9c1a1bcf338..6b31ed67ad6 100644 --- a/frameworks/Rust/trillium/Cargo.toml +++ b/frameworks/Rust/trillium/Cargo.toml @@ -3,25 +3,32 @@ name = "trillium-techempower" version = "0.1.0" edition = "2021" +[features] +jemallocator = ["dep:jemallocator"] + [dependencies] -askama = "0.11.1" -fastrand = "1.7.0" -futures-lite = "1.12.0" -futures-util = "0.3.21" -serde = { version = "1.0.136", features = ["derive"] } -serde_json = "1.0.79" -trillium = "0.2.2" +askama = "0.12.1" +fastrand = "2.0.1" +futures-lite = "2.2.0" +serde = { version = "1.0.196", features = ["derive"] } +serde_json = "1.0.113" +trillium = "0.2.16" trillium-api = "0.1.0" -trillium-askama = "0.3.0" -trillium-async-std = "0.2.0" -trillium-logger = "0.4.0" -trillium-router = "0.3.2" +trillium-askama = "0.3.2" +trillium-smol = "0.3.3" +trillium-logger = "0.4.4" +trillium-router = "0.3.6" +unicycle = "0.9.4" +env_logger = "0.11.2" +moka = { version = "0.12.5", features = ["future"] } +jemallocator = {version="0.5.4", optional = true} [dependencies.sea-orm] -version = "0.6.0" +version = "0.12.14" default-features = false features = ["runtime-async-std-native-tls", "sqlx-postgres", "macros"] [profile.release] panic = "abort" lto = "fat" +codegen-units = 1 diff --git a/frameworks/Rust/trillium/README.md b/frameworks/Rust/trillium/README.md index 586e669e5c1..007e4d454e2 100755 --- a/frameworks/Rust/trillium/README.md +++ b/frameworks/Rust/trillium/README.md @@ -53,3 +53,7 @@ PostgreSQL. ### Test 6: Plaintext http://localhost:8080/plaintext + +### Test 7: Caching + + http://localhost:8080/cached/20 diff --git a/frameworks/Rust/trillium/benchmark_config.json b/frameworks/Rust/trillium/benchmark_config.json index 19076a3598f..a781bbabdcc 100755 --- a/frameworks/Rust/trillium/benchmark_config.json +++ b/frameworks/Rust/trillium/benchmark_config.json @@ -1,5 +1,6 @@ { "framework": "trillium", + "maintainers": ["jbr"], "tests": [ { "default": { @@ -8,6 +9,8 @@ "query_url": "/queries/", "plaintext_url": "/plaintext", "fortune_url": "/fortunes", + "cached_query_url": "/cached-queries/", + "update_url": "/updates/", "port": 8080, "approach": "Realistic", "classification": "Micro", diff --git a/frameworks/Rust/trillium/src/application.rs b/frameworks/Rust/trillium/src/application.rs index 83992f56eaa..d8ed8106628 100644 --- a/frameworks/Rust/trillium/src/application.rs +++ b/frameworks/Rust/trillium/src/application.rs @@ -1,14 +1,10 @@ use crate::db::Db; use crate::routes::router; -use trillium_logger::Logger; pub fn application() -> impl trillium::Handler { ( - if cfg!(debug_assertions) { - Some(Logger::new()) - } else { - None - }, + #[cfg(debug_assertions)] + trillium_logger::logger(), Db::default(), router(), ) diff --git a/frameworks/Rust/trillium/src/db.rs b/frameworks/Rust/trillium/src/db.rs index fb1d61e4ebe..3f9982a09bc 100644 --- a/frameworks/Rust/trillium/src/db.rs +++ b/frameworks/Rust/trillium/src/db.rs @@ -5,9 +5,23 @@ use trillium::{async_trait, Conn, Handler, Info}; #[derive(Debug, Default)] pub struct Db(Option); +pub mod cached_world; pub mod fortune; pub mod world; +impl Db { + pub(crate) async fn connection() -> DatabaseConnection { + let db_url = env::var("DATABASE_URL").expect("env var DATABASE_URL not found"); + + let connect_options = ConnectOptions::new(db_url.clone()); + + Database::connect(connect_options) + .await + .map_err(|e| format!("could not connect to {}: {}", &db_url, e)) + .unwrap() + } +} + #[async_trait] impl Handler for Db { async fn run(&self, conn: Conn) -> Conn { @@ -16,16 +30,7 @@ impl Handler for Db { async fn init(&mut self, _info: &mut Info) { if self.0.is_none() { - let db_url = env::var("DATABASE_URL").expect("env var DATABASE_URL not found"); - - let connect_options = ConnectOptions::new(db_url.clone()); - - let db = Database::connect(connect_options) - .await - .map_err(|e| format!("could not connect to {}: {}", &db_url, e)) - .unwrap(); - - self.0 = Some(db); + self.0 = Some(Self::connection().await); } } } diff --git a/frameworks/Rust/trillium/src/db/cached_world.rs b/frameworks/Rust/trillium/src/db/cached_world.rs new file mode 100644 index 00000000000..d8ea0b82223 --- /dev/null +++ b/frameworks/Rust/trillium/src/db/cached_world.rs @@ -0,0 +1,24 @@ +use sea_orm::entity::prelude::*; +use serde::Serialize; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize)] +#[sea_orm(table_name = "World")] +#[serde(rename_all = "camelCase")] +pub struct Model { + #[sea_orm(primary_key)] + pub id: i32, + + #[sea_orm(column_name = "randomnumber")] + pub random_number: i32, +} + +#[derive(Copy, Clone, Debug, EnumIter)] +pub enum Relation {} + +impl RelationTrait for Relation { + fn def(&self) -> RelationDef { + unimplemented!() + } +} + +impl ActiveModelBehavior for ActiveModel {} diff --git a/frameworks/Rust/trillium/src/db/fortune.rs b/frameworks/Rust/trillium/src/db/fortune.rs index b046f3ddfe4..b6d69229599 100644 --- a/frameworks/Rust/trillium/src/db/fortune.rs +++ b/frameworks/Rust/trillium/src/db/fortune.rs @@ -1,7 +1,8 @@ use sea_orm::entity::prelude::*; use serde::Serialize; +use std::cmp::Ordering; -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize)] +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Eq)] #[sea_orm(table_name = "Fortune")] pub struct Model { #[sea_orm(primary_key)] @@ -20,3 +21,15 @@ impl RelationTrait for Relation { } impl ActiveModelBehavior for ActiveModel {} + +impl PartialOrd for Model { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for Model { + fn cmp(&self, other: &Self) -> Ordering { + self.message.cmp(&other.message) + } +} diff --git a/frameworks/Rust/trillium/src/main.rs b/frameworks/Rust/trillium/src/main.rs index 65935b84a66..879a545e754 100644 --- a/frameworks/Rust/trillium/src/main.rs +++ b/frameworks/Rust/trillium/src/main.rs @@ -1,9 +1,23 @@ +#[cfg(feature = "jemallocator")] +#[global_allocator] +static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; + mod application; mod db; mod routes; - use application::application; +use trillium::HttpConfig; fn main() { - trillium_async_std::run(application()) + #[cfg(debug_assertions)] + env_logger::init(); + + let http_config = HttpConfig::default() + .with_response_buffer_len(256) + .with_request_buffer_initial_len(256) + .with_response_header_initial_capacity(5); + + trillium_smol::config() + .with_http_config(http_config) + .run(application()) } diff --git a/frameworks/Rust/trillium/src/routes.rs b/frameworks/Rust/trillium/src/routes.rs index b5cc8864564..4b807f5b0f7 100644 --- a/frameworks/Rust/trillium/src/routes.rs +++ b/frameworks/Rust/trillium/src/routes.rs @@ -1,11 +1,11 @@ use trillium_router::Router; +mod cached_queries; mod db; mod fortune; mod json; mod plaintext; mod queries; mod updates; - pub fn router() -> Router { Router::build(|mut router| { router.get("/fortunes", fortune::handler); @@ -16,5 +16,8 @@ pub fn router() -> Router { router.get("/plaintext", plaintext::handler); router.get("/updates/:updates", updates::handler); router.get("/updates", updates::handler); + let cached_queries = cached_queries::handler(); + router.get("/cached-queries/:count", cached_queries.clone()); + router.get("/cached-queries", cached_queries); }) } diff --git a/frameworks/Rust/trillium/src/routes/cached_queries.rs b/frameworks/Rust/trillium/src/routes/cached_queries.rs new file mode 100644 index 00000000000..25e007bf791 --- /dev/null +++ b/frameworks/Rust/trillium/src/routes/cached_queries.rs @@ -0,0 +1,80 @@ +use crate::db::{ + cached_world::{Entity as CachedWorlds, Model as CachedWorld}, + Db, DbConnExt, +}; +use futures_lite::StreamExt; +use moka::future::Cache; +use sea_orm::{DatabaseConnection, DbErr, EntityTrait}; +use std::{iter, sync::Arc}; +use trillium::{Conn, Handler, Info, Status}; +use trillium_api::ApiConnExt; +use trillium_router::RouterConnExt; +use unicycle::FuturesUnordered; + +pub fn handler() -> CachedWorldHandler { + CachedWorldHandler { + cache: Cache::new(10_000), + } +} + +#[derive(Debug, Clone)] +pub struct CachedWorldHandler { + cache: Cache, +} + +impl CachedWorldHandler { + #[inline(always)] + fn count_param(conn: &Conn) -> usize { + conn.param("count") + .and_then(|s| s.parse().ok()) + .unwrap_or(1) + .min(500) + .max(1) + } + + #[inline(always)] + async fn fetch_cached( + &self, + db: &DatabaseConnection, + id: i32, + ) -> Result> { + self.cache + .try_get_with(id, async { + CachedWorlds::find_by_id(id) + .one(db) + .await? + .ok_or_else(|| DbErr::RecordNotFound(String::from("not found"))) + }) + .await + } +} + +#[trillium::async_trait] +impl Handler for CachedWorldHandler { + async fn init(&mut self, _info: &mut Info) { + if self.cache.entry_count() == 0 { + let db = Db::connection().await; + let mut stream = CachedWorlds::find().stream(&db).await.unwrap(); + while let Some(Ok(world)) = stream.next().await { + self.cache.insert(world.id, world).await + } + self.cache.run_pending_tasks().await; + } + } + + async fn run(&self, conn: Conn) -> Conn { + let count = Self::count_param(&conn); + let db = conn.db(); + let worlds: Result, _> = + iter::repeat_with(|| self.fetch_cached(db, fastrand::i32(1..=10_000))) + .take(count) + .collect::>() + .try_collect() + .await; + + match worlds { + Ok(worlds) => conn.with_json(&worlds), + Err(_) => conn.with_status(Status::InternalServerError), + } + } +} diff --git a/frameworks/Rust/trillium/src/routes/db.rs b/frameworks/Rust/trillium/src/routes/db.rs index de1b8fc2fbd..8dbb00b499d 100644 --- a/frameworks/Rust/trillium/src/routes/db.rs +++ b/frameworks/Rust/trillium/src/routes/db.rs @@ -1,18 +1,13 @@ use crate::db::{world::Entity as World, DbConnExt}; use sea_orm::entity::prelude::*; -use trillium::{conn_unwrap, Conn}; +use trillium::{Conn, Status}; use trillium_api::ApiConnExt; pub async fn handler(conn: Conn) -> Conn { - let random = fastrand::i32(1..10000); - let world = conn_unwrap!( - World::find_by_id(random) - .one(conn.db()) - .await - .ok() - .flatten(), - conn - ); - - conn.with_json(&world) + let id = fastrand::i32(1..=10_000); + match World::find_by_id(id).one(conn.db()).await { + Ok(Some(world)) => conn.with_json(&world), + Err(_) => conn.with_status(Status::InternalServerError), + Ok(None) => conn.with_status(Status::NotFound), + } } diff --git a/frameworks/Rust/trillium/src/routes/fortune.rs b/frameworks/Rust/trillium/src/routes/fortune.rs index 66bcce25aef..e9ea757e7bf 100644 --- a/frameworks/Rust/trillium/src/routes/fortune.rs +++ b/frameworks/Rust/trillium/src/routes/fortune.rs @@ -2,26 +2,34 @@ use crate::db::{ fortune::{Entity as Fortunes, Model as Fortune}, DbConnExt, }; -use sea_orm::entity::prelude::*; -use trillium::{conn_try, Conn, KnownHeaderName::ContentType}; +use futures_lite::StreamExt; +use sea_orm::EntityTrait; +use std::collections::BTreeSet; +use trillium::{Conn, KnownHeaderName::ContentType, Status}; use trillium_askama::{AskamaConnExt, Template}; #[derive(Template)] #[template(path = "fortunes.html")] struct FortuneTemplate<'a> { - fortunes: &'a [Fortune], + fortunes: &'a BTreeSet, } pub async fn handler(conn: Conn) -> Conn { - let db = conn.db(); + let db = conn.db().clone(); - let mut fortunes = conn_try!(Fortunes::find().all(db).await, conn); - fortunes.push(Fortune { + let mut fortunes = BTreeSet::new(); + fortunes.insert(Fortune { id: 0, message: String::from("Additional fortune added at request time."), }); - fortunes.sort_by(|a, b| a.message.cmp(&b.message)); + let Ok(mut stream) = Fortunes::find().stream(&db).await else { + return conn.with_status(Status::InternalServerError); + }; + + while let Some(Ok(fortune)) = stream.next().await { + fortunes.insert(fortune); + } conn.render(FortuneTemplate { fortunes: &fortunes, diff --git a/frameworks/Rust/trillium/src/routes/json.rs b/frameworks/Rust/trillium/src/routes/json.rs index e238b70a8b9..ce203fb921b 100644 --- a/frameworks/Rust/trillium/src/routes/json.rs +++ b/frameworks/Rust/trillium/src/routes/json.rs @@ -1,8 +1,7 @@ -use serde_json::{json, to_string}; -use trillium::{conn_try, Conn, KnownHeaderName}; +use serde_json::json; +use trillium::Conn; +use trillium_api::ApiConnExt; pub async fn handler(conn: Conn) -> Conn { - let body = conn_try!(to_string(&json!({"message": "Hello, World!"})), conn); - conn.ok(body) - .with_header(KnownHeaderName::ContentType, "application/json") + conn.with_json(&json!({"message": "Hello, World!"})) } diff --git a/frameworks/Rust/trillium/src/routes/queries.rs b/frameworks/Rust/trillium/src/routes/queries.rs index a32d13d964c..dfd21e318d2 100644 --- a/frameworks/Rust/trillium/src/routes/queries.rs +++ b/frameworks/Rust/trillium/src/routes/queries.rs @@ -1,11 +1,11 @@ use crate::db::{world::Entity as Worlds, DbConnExt}; use futures_lite::StreamExt; -use futures_util::stream::futures_unordered::FuturesUnordered; -use sea_orm::entity::prelude::*; +use sea_orm::{entity::prelude::*, TransactionTrait}; use std::iter; -use trillium::{conn_try, Conn}; +use trillium::{Conn, Status}; use trillium_api::ApiConnExt; use trillium_router::RouterConnExt; +use unicycle::FuturesUnordered; pub async fn handler(conn: Conn) -> Conn { let queries = conn @@ -15,20 +15,23 @@ pub async fn handler(conn: Conn) -> Conn { .min(500) .max(1); - let db = conn.db(); + let Ok(tx) = conn.db().begin().await else { + return conn.with_status(Status::InternalServerError); + }; - let vec_of_worlds: Result, DbErr> = - iter::repeat_with(|| Worlds::find_by_id(fastrand::i32(1..10000)).one(db)) - .take(queries) - .collect::>() - .map(|x| match x { - Ok(None) => Err(DbErr::RecordNotFound(String::from("not found"))), - other => other, - }) - .try_collect() - .await; + let worlds = iter::repeat_with(|| async { + Worlds::find_by_id(fastrand::i32(1..=10_000)) + .one(&tx) + .await? + .ok_or_else(|| DbErr::RecordNotFound(String::from("not found"))) + }) + .take(queries) + .collect::>() + .try_collect::<_, _, Vec<_>>() + .await; - let vec_of_worlds = conn_try!(vec_of_worlds, conn); - - conn.with_json(&vec_of_worlds) + match worlds { + Ok(worlds) => conn.with_json(&worlds), + Err(_) => conn.with_status(Status::InternalServerError), + } } diff --git a/frameworks/Rust/trillium/src/routes/updates.rs b/frameworks/Rust/trillium/src/routes/updates.rs index c88e5595f67..46e7737d29b 100644 --- a/frameworks/Rust/trillium/src/routes/updates.rs +++ b/frameworks/Rust/trillium/src/routes/updates.rs @@ -1,14 +1,11 @@ -use crate::db::{ - world::{Entity as Worlds, Model as World}, - DbConnExt, -}; - -use futures_util::stream::{futures_unordered::FuturesUnordered, StreamExt}; +use crate::db::{world::Entity as Worlds, DbConnExt}; +use futures_lite::StreamExt; use sea_orm::{entity::prelude::*, IntoActiveModel, Set}; use std::iter; -use trillium::Conn; +use trillium::{Conn, Status}; use trillium_api::ApiConnExt; use trillium_router::RouterConnExt; +use unicycle::FuturesUnordered; pub async fn handler(conn: Conn) -> Conn { let queries = conn @@ -19,19 +16,22 @@ pub async fn handler(conn: Conn) -> Conn { .max(1); let db = conn.db(); + let worlds = iter::repeat_with(|| async { + let mut world = Worlds::find_by_id(fastrand::i32(1..=10_000)) + .one(db) + .await? + .ok_or_else(|| DbErr::RecordNotFound(String::from("not found")))? + .into_active_model(); + world.random_number = Set(fastrand::i32(1..=10_000)); + world.update(db).await + }) + .take(queries) + .collect::>() + .try_collect::<_, _, Vec<_>>() + .await; - let vec_of_worlds: Vec = - iter::repeat_with(|| Worlds::find_by_id(fastrand::i32(1..10000)).one(db)) - .take(queries) - .collect::>() - .filter_map(|x| async move { x.ok().flatten() }) - .filter_map(|w| async move { - let mut am = w.clone().into_active_model(); - am.random_number = Set(fastrand::i32(1..10000)); - am.update(db).await.ok() - }) - .collect() - .await; - - conn.with_json(&vec_of_worlds) + match worlds { + Ok(worlds) => conn.with_json(&worlds), + Err(_) => conn.with_status(Status::InternalServerError), + } } diff --git a/frameworks/Rust/trillium/templates/fortunes.html b/frameworks/Rust/trillium/templates/fortunes.html index 3619c728ea2..fb45d04e019 100644 --- a/frameworks/Rust/trillium/templates/fortunes.html +++ b/frameworks/Rust/trillium/templates/fortunes.html @@ -4,9 +4,9 @@ - {% for fortune in fortunes %} + {%- for fortune in fortunes -%} - {% endfor %} + {%- endfor -%}
idmessage
{{fortune.id}}{{fortune.message}}
diff --git a/frameworks/Rust/trillium/trillium.dockerfile b/frameworks/Rust/trillium/trillium.dockerfile index eac19bbbd6a..e5e3ac910ba 100644 --- a/frameworks/Rust/trillium/trillium.dockerfile +++ b/frameworks/Rust/trillium/trillium.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.57 +FROM rust:1.76 WORKDIR /trillium COPY src src COPY templates templates @@ -12,5 +12,5 @@ ENV PORT=8080 ENV HOST=0.0.0.0 ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world -RUN cargo build --release +RUN cargo build --release --features jemallocator CMD ["./target/release/trillium-techempower"] diff --git a/frameworks/Rust/viz/Cargo.toml b/frameworks/Rust/viz/Cargo.toml index 462dbb7bc31..9832cb58fdb 100644 --- a/frameworks/Rust/viz/Cargo.toml +++ b/frameworks/Rust/viz/Cargo.toml @@ -24,8 +24,9 @@ path = "src/main_diesel.rs" required-features = ["diesel", "diesel-async", "sailfish"] [dependencies] -viz = "0.4" -hyper = "0.14" +viz = "0.8" +hyper = "1.0" +hyper-util = "0.1" atoi = "2.0" serde = { version = "1.0", features = ["derive"] } nanorand = "0.7" @@ -50,7 +51,7 @@ diesel-async = { version = "0.4", default-features = false, features = [ ], optional = true } yarte = { version = "0.15", features = ["bytes-buf", "json"], optional = true } -markup = { version = "0.13", optional = true } +markup = { version = "0.15", optional = true } v_htmlescape = { version = "0.15", optional = true } sailfish = { version = "0.8", optional = true } diff --git a/frameworks/Rust/viz/src/db_diesel.rs b/frameworks/Rust/viz/src/db_diesel.rs index 9e93bb342ba..624000a7d1d 100644 --- a/frameworks/Rust/viz/src/db_diesel.rs +++ b/frameworks/Rust/viz/src/db_diesel.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use diesel::prelude::*; use diesel_async::{ pooled_connection::bb8::{Pool, RunError}, @@ -112,7 +110,7 @@ pub async fn tell_fortune(pool: Pool) -> Result Result, PgError> { let mut items = vec![Fortune { id: 0, - message: Cow::Borrowed("Additional fortune added at request time."), + message: "Additional fortune added at request time.".to_string(), }]; let stream = self @@ -176,7 +176,7 @@ impl PgConnection { items.push(Fortune { id: row.get(0), - message: Cow::Owned(row.get(1)), + message: row.get(1), }); } diff --git a/frameworks/Rust/viz/src/db_sqlx.rs b/frameworks/Rust/viz/src/db_sqlx.rs index cf8c10c8799..af8322e9d1d 100644 --- a/frameworks/Rust/viz/src/db_sqlx.rs +++ b/frameworks/Rust/viz/src/db_sqlx.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use nanorand::{Rng, WyRand}; pub use sqlx::{ @@ -8,10 +6,7 @@ pub use sqlx::{ Arguments, PgPool, Postgres, Row, }; -use viz::{ - async_trait, Error, FromRequest, IntoResponse, Request, RequestExt, Response, - StatusCode, -}; +use viz::{Error, FromRequest, IntoResponse, Request, RequestExt, Response, StatusCode}; use crate::models_sqlx::*; use crate::utils::get_query_param; @@ -19,7 +14,6 @@ use crate::RANGE; pub struct DatabaseConnection(pub PoolConnection); -#[async_trait] impl FromRequest for DatabaseConnection { type Error = PgError; @@ -53,7 +47,6 @@ impl IntoResponse for PgError { pub struct Counter(pub u16); -#[async_trait] impl FromRequest for Counter { type Error = Error; @@ -110,14 +103,14 @@ pub async fn get_fortunes( let mut items = sqlx::query("SELECT * FROM Fortune") .map(|row: PgRow| Fortune { id: row.get(0), - message: Cow::Owned(row.get(1)), + message: row.get(1), }) .fetch_all(&mut *conn) .await?; items.push(Fortune { id: 0, - message: Cow::Borrowed("Additional fortune added at request time."), + message: "Additional fortune added at request time.".to_string(), }); items.sort_by(|it, next| it.message.cmp(&next.message)); diff --git a/frameworks/Rust/viz/src/main.rs b/frameworks/Rust/viz/src/main.rs index 0550a8ffc4a..1813ac62a22 100644 --- a/frameworks/Rust/viz/src/main.rs +++ b/frameworks/Rust/viz/src/main.rs @@ -3,7 +3,7 @@ use serde::Serialize; use viz::{ header::{HeaderValue, SERVER}, - Error, Request, Response, ResponseExt, Result, Router, ServiceMaker, + Error, Request, Response, ResponseExt, Result, Router, }; mod server; @@ -36,9 +36,5 @@ async fn main() -> Result<()> { .get("/plaintext", plaintext) .get("/json", json); - server::builder() - .http1_pipeline_flush(true) - .serve(ServiceMaker::from(app)) - .await - .map_err(Error::normal) + server::serve(app).await.map_err(Error::Boxed) } diff --git a/frameworks/Rust/viz/src/main_diesel.rs b/frameworks/Rust/viz/src/main_diesel.rs index a8212b505fd..688b1e207da 100644 --- a/frameworks/Rust/viz/src/main_diesel.rs +++ b/frameworks/Rust/viz/src/main_diesel.rs @@ -11,7 +11,7 @@ use nanorand::{Rng, WyRand}; use viz::{ header::{HeaderValue, SERVER}, types::State, - Request, RequestExt, Response, ResponseExt, Result, Router, ServiceMaker, + Request, RequestExt, Response, ResponseExt, Result, Router, }; mod db_diesel; @@ -89,19 +89,13 @@ async fn main() { let rng = WyRand::new(); - let service = ServiceMaker::from( - Router::new() - .get("/db", db) - .get("/fortunes", fortunes) - .get("/queries", queries) - .get("/updates", updates) - .with(State::new(pool)) - .with(State::new(rng)), - ); - - serve(service).await; -} + let app = Router::new() + .get("/db", db) + .get("/fortunes", fortunes) + .get("/queries", queries) + .get("/updates", updates) + .with(State::new(pool)) + .with(State::new(rng)); -async fn serve(service: ServiceMaker) { - server::builder().serve(service).await.unwrap() + server::serve(app).await.unwrap() } diff --git a/frameworks/Rust/viz/src/main_pg.rs b/frameworks/Rust/viz/src/main_pg.rs index abd3638b134..f7a0748ef57 100644 --- a/frameworks/Rust/viz/src/main_pg.rs +++ b/frameworks/Rust/viz/src/main_pg.rs @@ -6,7 +6,7 @@ use std::{ use viz::{ header::{HeaderValue, SERVER}, types::State, - Request, RequestExt, Response, ResponseExt, Result, Router, ServiceMaker, + Request, RequestExt, Response, ResponseExt, Result, Router, }; use yarte::Template; @@ -19,8 +19,8 @@ use db_pg::{get_conn, PgConnection}; #[derive(Template)] #[template(path = "fortune.hbs")] -pub struct FortunesTemplate<'a> { - pub fortunes: &'a Vec, +pub struct FortunesTemplate { + pub fortunes: Vec, } const DB_URL: &str = @@ -42,11 +42,9 @@ async fn fortunes(req: Request) -> Result { let fortunes = conn.tell_fortune().await?; - let buf = FortunesTemplate { - fortunes: &fortunes, - } - .call() - .expect("error rendering template"); + let buf = FortunesTemplate { fortunes } + .call() + .expect("error rendering template"); let mut res = Response::html(buf); res.headers_mut() @@ -107,8 +105,5 @@ async fn serve() { .get("/updates", updates) .with(State::new(conn)); - server::builder() - .serve(ServiceMaker::from(app)) - .await - .unwrap() + server::serve(app).await.unwrap() } diff --git a/frameworks/Rust/viz/src/main_sqlx.rs b/frameworks/Rust/viz/src/main_sqlx.rs index 9b150d13901..7685a9f6165 100644 --- a/frameworks/Rust/viz/src/main_sqlx.rs +++ b/frameworks/Rust/viz/src/main_sqlx.rs @@ -5,7 +5,6 @@ use viz::{ header::{HeaderValue, SERVER}, types::State, BytesMut, Error, Request, RequestExt, Response, ResponseExt, Result, Router, - ServiceMaker, }; mod db_sqlx; @@ -101,10 +100,7 @@ async fn main() -> Result<()> { .with(State::new(pool)) .with(State::new(rng)); - server::builder() - .serve(ServiceMaker::from(app)) - .await - .map_err(Error::normal) + server::serve(app).await.map_err(Error::Boxed) } markup::define! { diff --git a/frameworks/Rust/viz/src/models.rs b/frameworks/Rust/viz/src/models.rs index 016cb56bb63..b059bab4c23 100644 --- a/frameworks/Rust/viz/src/models.rs +++ b/frameworks/Rust/viz/src/models.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use serde::Serialize; #[derive(Serialize, Debug, yarte::Serialize)] @@ -11,5 +9,5 @@ pub struct World { #[derive(Serialize, Debug)] pub struct Fortune { pub id: i32, - pub message: Cow<'static, str>, + pub message: String, } diff --git a/frameworks/Rust/viz/src/models_diesel.rs b/frameworks/Rust/viz/src/models_diesel.rs index c0e3356b404..63711594223 100644 --- a/frameworks/Rust/viz/src/models_diesel.rs +++ b/frameworks/Rust/viz/src/models_diesel.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use diesel::Queryable; use sailfish::TemplateOnce; use serde::Serialize; @@ -13,7 +11,7 @@ pub struct World { #[derive(Serialize, Queryable, Debug)] pub struct Fortune { pub id: i32, - pub message: Cow<'static, str>, + pub message: String, } #[derive(TemplateOnce)] diff --git a/frameworks/Rust/viz/src/models_sqlx.rs b/frameworks/Rust/viz/src/models_sqlx.rs index 23ef27aa8c2..2f3657a9936 100644 --- a/frameworks/Rust/viz/src/models_sqlx.rs +++ b/frameworks/Rust/viz/src/models_sqlx.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use serde::{Deserialize, Serialize}; use sqlx::FromRow; @@ -12,5 +10,5 @@ pub struct World { #[derive(Debug, PartialEq, Deserialize, Serialize, FromRow)] pub struct Fortune { pub id: i32, - pub message: Cow<'static, str>, + pub message: String, } diff --git a/frameworks/Rust/viz/src/server.rs b/frameworks/Rust/viz/src/server.rs index 629ea202be8..d70c1de8531 100644 --- a/frameworks/Rust/viz/src/server.rs +++ b/frameworks/Rust/viz/src/server.rs @@ -1,19 +1,33 @@ +use std::error::Error; use std::io; use std::net::{Ipv4Addr, SocketAddr}; +use std::sync::Arc; -use hyper::server::conn::AddrIncoming; +use hyper::server::conn::http1::Builder; +use hyper_util::rt::TokioIo; use tokio::net::{TcpListener, TcpSocket}; +use viz::{Responder, Router, Tree}; -pub fn builder() -> hyper::server::Builder { +pub async fn serve(router: Router) -> Result<(), Box> { + let tree = Arc::::new(router.into()); let addr = SocketAddr::from((Ipv4Addr::UNSPECIFIED, 8080)); let listener = reuse_listener(addr).expect("couldn't bind to addr"); - let incoming = AddrIncoming::from_listener(listener).unwrap(); println!("Started viz server at 8080"); - viz::Server::builder(incoming) - .http1_only(true) - .tcp_nodelay(true) + loop { + let (tcp, _) = listener.accept().await?; + let io = TokioIo::new(tcp); + let tree = tree.clone(); + + tokio::task::spawn(async move { + Builder::new() + .pipeline_flush(true) + .serve_connection(io, Responder::>::new(tree, None)) + .with_upgrades() + .await + }); + } } fn reuse_listener(addr: SocketAddr) -> io::Result { diff --git a/frameworks/Rust/viz/viz-diesel.dockerfile b/frameworks/Rust/viz/viz-diesel.dockerfile index 0a12925e22e..c1ddd42ddd5 100644 --- a/frameworks/Rust/viz/viz-diesel.dockerfile +++ b/frameworks/Rust/viz/viz-diesel.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.75 RUN apt-get update -yqq && apt-get install -yqq cmake g++ diff --git a/frameworks/Rust/viz/viz-pg.dockerfile b/frameworks/Rust/viz/viz-pg.dockerfile index 94a47249193..69238ff1c62 100644 --- a/frameworks/Rust/viz/viz-pg.dockerfile +++ b/frameworks/Rust/viz/viz-pg.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.75 RUN apt-get update -yqq && apt-get install -yqq cmake g++ diff --git a/frameworks/Rust/viz/viz-sqlx.dockerfile b/frameworks/Rust/viz/viz-sqlx.dockerfile index d0045817729..087feee3c8e 100644 --- a/frameworks/Rust/viz/viz-sqlx.dockerfile +++ b/frameworks/Rust/viz/viz-sqlx.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.75 RUN apt-get update -yqq && apt-get install -yqq cmake g++ diff --git a/frameworks/Rust/viz/viz.dockerfile b/frameworks/Rust/viz/viz.dockerfile index 4fce0bf378d..bf54a7076c9 100644 --- a/frameworks/Rust/viz/viz.dockerfile +++ b/frameworks/Rust/viz/viz.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.72 +FROM rust:1.75 RUN apt-get update -yqq && apt-get install -yqq cmake g++ diff --git a/frameworks/Rust/warp-rust/Cargo.lock b/frameworks/Rust/warp-rust/Cargo.lock index b9a3dc06488..fbd9a71340e 100644 --- a/frameworks/Rust/warp-rust/Cargo.lock +++ b/frameworks/Rust/warp-rust/Cargo.lock @@ -969,9 +969,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "line-wrap" @@ -1069,14 +1069,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1889,7 +1889,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -2379,13 +2379,37 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -2394,42 +2418,84 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "xml-rs" version = "0.8.14" diff --git a/frameworks/Rust/xitca-web/Cargo.lock b/frameworks/Rust/xitca-web/Cargo.lock index 6a87ff4b1fb..fd001345246 100644 --- a/frameworks/Rust/xitca-web/Cargo.lock +++ b/frameworks/Rust/xitca-web/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", @@ -45,18 +45,17 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", "http", "http-body", - "hyper", + "http-body-util", "itoa", "matchit", "memchr", @@ -69,7 +68,6 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sync_wrapper", - "tokio", "tower", "tower-layer", "tower-service", @@ -77,17 +75,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", "http", "http-body", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper", "tower-layer", "tower-service", ] @@ -109,9 +110,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" @@ -121,9 +122,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -148,12 +149,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -163,9 +161,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -180,6 +178,41 @@ dependencies = [ "typenum", ] +[[package]] +name = "diesel" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c6fcf842f17f8c78ecf7c81d75c5ce84436b41ee07e03f490fbb5f5a8731d8" +dependencies = [ + "bitflags 2.4.2", + "byteorder", + "diesel_derives", + "itoa", + "pq-sys", + "r2d2", +] + +[[package]] +name = "diesel_derives" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8337737574f55a468005a83499da720f20c65586241ffea339db9ecdfd2b44" +dependencies = [ + "diesel_table_macro_syntax", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "diesel_table_macro_syntax" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +dependencies = [ + "syn", +] + [[package]] name = "digest" version = "0.10.7" @@ -199,14 +232,14 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", "redox_syscall", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -230,32 +263,23 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "futures-channel" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" -dependencies = [ - "futures-core", -] - [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-task", @@ -275,9 +299,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -292,9 +316,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hmac" @@ -307,18 +331,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.11" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -327,20 +351,26 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "http-range-header" -version = "0.3.1" +name = "http-body-util" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] [[package]] name = "httparse" @@ -354,29 +384,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "io-uring" version = "0.5.13" @@ -389,9 +396,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "itoap" @@ -401,25 +408,25 @@ checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "libmimalloc-sys" -version = "0.1.35" +name = "lock_api" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ - "cc", - "libc", + "autocfg", + "scopeguard", ] [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "matchit" @@ -439,18 +446,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "mimalloc" -version = "0.1.39" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" -dependencies = [ - "libmimalloc-sys", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" @@ -460,9 +458,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -474,7 +472,7 @@ source = "git+https://github.com/fakeshadow/mio.git?rev=52b72d372bfe5807755b7f5e dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -485,9 +483,9 @@ checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -504,18 +502,41 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] [[package]] name = "percent-encoding" @@ -525,18 +546,18 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", @@ -590,24 +611,44 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "pq-sys" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0052426df997c0cbd30789eb44ca097e3541717a7b8fa36b1c464ee7edebd" +dependencies = [ + "vcpkg", +] + [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] +[[package]] +name = "r2d2" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" +dependencies = [ + "log", + "parking_lot", + "scheduled-thread-pool", +] + [[package]] name = "rand" version = "0.8.5" @@ -640,9 +681,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] @@ -661,9 +702,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "sailfish" @@ -701,26 +742,41 @@ dependencies = [ "sailfish-compiler", ] +[[package]] +name = "scheduled-thread-pool" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" +dependencies = [ + "parking_lot", +] + [[package]] name = "scoped-tls" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + [[package]] name = "serde" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -729,9 +785,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -740,9 +796,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" dependencies = [ "itoa", "serde", @@ -789,6 +845,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + [[package]] name = "socket2" version = "0.4.10" @@ -801,12 +863,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -828,9 +890,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.39" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -860,9 +922,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "libc", @@ -870,8 +932,8 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", - "windows-sys", + "socket2 0.5.6", + "windows-sys 0.48.0", ] [[package]] @@ -899,7 +961,6 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite", - "tokio", "tower-layer", "tower-service", "tracing", @@ -907,17 +968,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", - "futures-core", - "futures-util", "http", "http-body", - "http-range-header", + "http-body-util", "pin-project-lite", "tower-layer", "tower-service", @@ -955,12 +1014,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - [[package]] name = "typenum" version = "1.17.0" @@ -969,9 +1022,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -981,27 +1034,24 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] -name = "version_check" -version = "0.9.4" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "want" -version = "0.3.1" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" @@ -1037,7 +1087,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", ] [[package]] @@ -1046,13 +1105,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -1061,46 +1135,99 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "xitca-codegen" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "866906a5f280481ef022ccdec1640730550304bb86b016815d9982fde2f48e3e" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "xitca-http" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1982607f88759de96dec5b234e9cf835d6a4995e395b65a201e656d0641974" dependencies = [ "futures-core", "http", @@ -1108,7 +1235,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.6", "tokio", "tokio-uring", "tracing", @@ -1120,8 +1247,9 @@ dependencies = [ [[package]] name = "xitca-io" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7581c12bcd8b2194271da2117926a577e4e974ab840c7a3f61cc187a249335c8" dependencies = [ "bytes", "tokio", @@ -1132,7 +1260,7 @@ dependencies = [ [[package]] name = "xitca-postgres" version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +source = "git+https://github.com/HFQR/xitca-web.git?rev=13a28c51a2f6e23e4e6b96e508a8af1e5e79d0b6#13a28c51a2f6e23e4e6b96e508a8af1e5e79d0b6" dependencies = [ "fallible-iterator", "percent-encoding", @@ -1147,18 +1275,20 @@ dependencies = [ [[package]] name = "xitca-router" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687a3fb0a32b89524fab7d780d4cc66942b8ee6a493a7f2ff78384fe677b8e09" dependencies = [ "xitca-unsafe-collection", ] [[package]] name = "xitca-server" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f48656d81909cb34fcf01288cdaf2bd77848d0f0dcbdc0c429b6ed376f78f4d5" dependencies = [ - "socket2 0.5.5", + "socket2 0.5.6", "tokio", "tokio-uring", "tracing", @@ -1170,12 +1300,14 @@ dependencies = [ [[package]] name = "xitca-service" version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a4a38548b14925111dd99560f0a10d1eb9e3e117fa5471c35387ed6f77b58c" [[package]] name = "xitca-unsafe-collection" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552a6bf21a5d0dc470644cb3b99f98f44bd414cd6fcca74610465d8196b1d23e" dependencies = [ "bytes", ] @@ -1186,11 +1318,10 @@ version = "0.1.0" dependencies = [ "atoi", "axum", + "diesel", "futures-core", "http-body", - "mimalloc", "nanorand", - "pin-project-lite", "sailfish", "serde", "serde_json", @@ -1203,19 +1334,25 @@ dependencies = [ "xitca-server", "xitca-service", "xitca-unsafe-collection", - "xitca-web 0.1.0 (git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e)", + "xitca-web 0.4.0", ] [[package]] name = "xitca-web" -version = "0.1.0" -source = "git+https://github.com/HFQR/xitca-web.git?rev=23ad63cbb3a853a548bd447cc59625a5d7c5833e#23ad63cbb3a853a548bd447cc59625a5d7c5833e" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfae98470b0f55b978ebdccd1317a658590aa6fecec4db61522adaa8e6943747" dependencies = [ "futures-core", + "http-body", "pin-project-lite", "serde", "serde_json", + "serde_urlencoded", "tokio", + "tower-layer", + "tower-service", + "xitca-codegen", "xitca-http", "xitca-server", "xitca-service", diff --git a/frameworks/Rust/xitca-web/Cargo.toml b/frameworks/Rust/xitca-web/Cargo.toml index 10af08ac491..8717e681c50 100644 --- a/frameworks/Rust/xitca-web/Cargo.toml +++ b/frameworks/Rust/xitca-web/Cargo.toml @@ -21,55 +21,67 @@ required-features = ["web"] [[bin]] name = "xitca-web-axum" path = "./src/main_axum.rs" -required-features = ["axum", "io-uring"] +required-features = ["axum", "io-uring", "pg-sync", "template"] + +[[bin]] +name = "xitca-web-sync" +path = "./src/main_sync.rs" +required-features = ["pg-orm", "template", "web-codegen"] [features] # pg optional -pg = ["xitca-postgres"] +pg = ["xitca-postgres/single-thread"] +# pg send/sync optional +pg-sync = ["xitca-postgres"] # pg io_uring optional -pg-iou = ["xitca-postgres/io-uring"] +pg-iou = ["pg", "xitca-postgres/io-uring"] +# pg orm optional +pg-orm = ["diesel"] # http router optional router = ["xitca-http/router"] # web optional web = ["xitca-web"] +# web codegen optional +web-codegen = ["xitca-web/codegen", "xitca-web/urlencoded"] # template optional template = ["sailfish"] # io-uring optional io-uring = ["xitca-http/io-uring", "xitca-server/io-uring"] # axum optional -axum = ["dep:axum", "http-body", "pin-project-lite", "tower", "tower-http"] +axum = ["dep:axum", "http-body", "tower", "tower-http", "xitca-web/tower-http-compat" ] [dependencies] -xitca-http = "0.1" -xitca-io = "0.1" -xitca-server = "0.1" +xitca-http = "0.4" +xitca-io = "0.2" +xitca-server = "0.2" xitca-service = "0.1" -xitca-unsafe-collection = "0.1" +xitca-unsafe-collection = "0.1.1" atoi = "2" serde = { version = "1" } serde_json = { version = "1" } # web optional -xitca-web = { version = "0.1", features = ["json"], optional = true } +xitca-web = { version = "0.4", features = ["json"], optional = true } # raw-pg optional -xitca-postgres = { version = "0.1", features = ["single-thread"], optional = true } +xitca-postgres = { version = "0.1", optional = true } + +# orm optional +diesel = { version = "2", features = ["postgres", "r2d2"], optional = true } # template optional sailfish = { version = "0.8", default-features = false, features = ["derive", "perf-inline"], optional = true } # axum optional -axum = { version = "0.6", optional = true } -http-body = { version = "0.4", optional = true } -pin-project-lite = { version = "0.2", optional = true } +axum = { version = "0.7", optional = true, default-features = false, features = ["json", "query"] } +http-body = { version = "1", optional = true } tower = { version = "0.4", optional = true } -tower-http = { version = "0.4", features = ["set-header"], optional = true } +tower-http = { version = "0.5", features = ["set-header"], optional = true } # stuff can not be used or not needed in wasi target [target.'cfg(not(target_family = "wasm"))'.dependencies] futures-core = { version = "0.3", default-features = false } -mimalloc = { version = "0.1", default-features = false } nanorand = { version = "0.7", default-features = false, features = ["tls"] } tokio = "1" @@ -80,13 +92,5 @@ codegen-units = 1 panic = "abort" [patch.crates-io] -xitca-http = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-io = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-router = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-server = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-service = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-unsafe-collection = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } -xitca-web = { git = "https://github.com/HFQR/xitca-web.git", rev = "23ad63cbb3a853a548bd447cc59625a5d7c5833e" } - +xitca-postgres = { git = "https://github.com/HFQR/xitca-web.git", rev = "13a28c51a2f6e23e4e6b96e508a8af1e5e79d0b6" } mio = { git = "https://github.com/fakeshadow/mio.git", rev = "52b72d372bfe5807755b7f5e3e1edf282954d6ba" } diff --git a/frameworks/Rust/xitca-web/benchmark_config.json b/frameworks/Rust/xitca-web/benchmark_config.json index 060cb47b354..f4c152eb729 100755 --- a/frameworks/Rust/xitca-web/benchmark_config.json +++ b/frameworks/Rust/xitca-web/benchmark_config.json @@ -67,10 +67,14 @@ "axum": { "json_url": "/json", "plaintext_url": "/plaintext", + "db_url": "/db", + "fortune_url": "/fortunes", + "query_url": "/queries?q=", + "update_url": "/updates?q=", "port": 8080, - "approach": "Realistic", - "classification": "Micro", - "database": "none", + "approach": "realistic", + "classification": "micro", + "database": "postgres", "framework": "axum [xitca]", "language": "rust", "orm": "raw", @@ -81,6 +85,28 @@ "display_name": "axum [xitca]", "notes": "", "versus": "" + }, + "sync": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "db_url": "/db", + "fortune_url": "/fortunes", + "query_url": "/queries?q=", + "update_url": "/updates?q=", + "port": 8080, + "approach": "realistic", + "classification": "micro", + "database": "postgres", + "framework": "xitca-web [sync]", + "language": "rust", + "orm": "full", + "platform": "none", + "webserver": "xitca-server", + "os": "linux", + "database_os": "linux", + "display_name": "xitca-web [sync]", + "notes": "", + "versus": "" } } ] diff --git a/frameworks/Rust/xitca-web/rust-toolchain.toml b/frameworks/Rust/xitca-web/rust-toolchain.toml deleted file mode 100644 index 3191ef83ece..00000000000 --- a/frameworks/Rust/xitca-web/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "nightly-2023-11-24" diff --git a/frameworks/Rust/xitca-web/src/db.rs b/frameworks/Rust/xitca-web/src/db.rs index 211931c1893..755dfaacf70 100644 --- a/frameworks/Rust/xitca-web/src/db.rs +++ b/frameworks/Rust/xitca-web/src/db.rs @@ -1,42 +1,34 @@ -use std::{cell::RefCell, collections::HashMap, fmt::Write, future::IntoFuture}; +use std::{collections::HashMap, fmt::Write}; -use xitca_postgres::{statement::Statement, AsyncIterator, Postgres}; +use xitca_postgres::{ + pipeline::Pipeline, statement::Statement, AsyncLendingIterator, SharedClient, +}; use xitca_unsafe_collection::no_hash::NoHashBuilder; use super::{ ser::{Fortune, Fortunes, World}, - util::{HandleResult, Rand}, + util::{HandleResult, Rand, DB_URL}, }; pub struct Client { - client: xitca_postgres::Client, - rng: RefCell, + client: SharedClient, + #[cfg(not(feature = "pg-sync"))] + rng: std::cell::RefCell, + #[cfg(feature = "pg-sync")] + rng: std::sync::Mutex, fortune: Statement, world: Statement, updates: HashMap, } -impl Drop for Client { - fn drop(&mut self) { - drop(self.fortune.clone().into_guarded(&self.client)); - drop(self.world.clone().into_guarded(&self.client)); - for (_, stmt) in std::mem::take(&mut self.updates) { - drop(stmt.into_guarded(&self.client)) - } - } -} - -pub async fn create(config: &str) -> HandleResult { - let (client, driver) = Postgres::new(config.to_string()).connect().await?; - - tokio::task::spawn_local(tokio::task::unconstrained(driver.into_future())); +pub async fn create() -> HandleResult { + let mut client = SharedClient::new(DB_URL.to_string()).await?; - let fortune = client.prepare("SELECT * FROM fortune", &[]).await?.leak(); + let fortune = client.prepare_cached("SELECT * FROM fortune", &[]).await?; let world = client - .prepare("SELECT * FROM world WHERE id=$1", &[]) - .await? - .leak(); + .prepare_cached("SELECT * FROM world WHERE id=$1", &[]) + .await?; let mut updates = HashMap::default(); @@ -56,13 +48,16 @@ pub async fn create(config: &str) -> HandleResult { q.pop(); q.push(')'); - let st = client.prepare(&q, &[]).await?.leak(); + let st = client.prepare_cached(&q, &[]).await?; updates.insert(num, st); } Ok(Client { client, - rng: RefCell::new(Rand::default()), + #[cfg(not(feature = "pg-sync"))] + rng: std::cell::RefCell::new(Rand::default()), + #[cfg(feature = "pg-sync")] + rng: std::sync::Mutex::new(Rand::default()), fortune, world, updates, @@ -70,32 +65,41 @@ pub async fn create(config: &str) -> HandleResult { } impl Client { + #[cfg(not(feature = "pg-sync"))] + fn borrow_rng_mut(&self) -> std::cell::RefMut<'_, Rand> { + self.rng.borrow_mut() + } + + #[cfg(feature = "pg-sync")] + fn borrow_rng_mut(&self) -> std::sync::MutexGuard<'_, Rand> { + self.rng.lock().unwrap() + } + pub async fn get_world(&self) -> HandleResult { - let id = self.rng.borrow_mut().gen_id(); + let id = self.borrow_rng_mut().gen_id(); self.client .query_raw(&self.world, [id]) .await? - .next() - .await - .ok_or_else(|| format!("World {id} does not exist"))? + .try_next() + .await? .map(|row| World::new(row.get_raw(0), row.get_raw(1))) - .map_err(Into::into) + .ok_or_else(|| "World does not exist".into()) } pub async fn get_worlds(&self, num: u16) -> HandleResult> { - let mut pipe = self.client.pipeline(); + let mut pipe = Pipeline::new(); { - let mut rng = self.rng.borrow_mut(); + let mut rng = self.borrow_rng_mut(); (0..num).try_for_each(|_| pipe.query_raw(&self.world, [rng.gen_id()]))?; } let mut worlds = Vec::new(); worlds.reserve(num as usize); - let mut res = pipe.run().await?; - while let Some(mut item) = res.next().await.transpose()? { - while let Some(row) = item.next().await.transpose()? { + let mut res = self.client.pipeline(pipe).await?; + while let Some(mut item) = res.try_next().await? { + while let Some(row) = item.try_next().await? { worlds.push(World::new(row.get_raw(0), row.get_raw(1))) } } @@ -109,10 +113,10 @@ impl Client { let mut params = Vec::new(); params.reserve(len * 3); - let mut pipe = self.client.pipeline(); + let mut pipe = Pipeline::new(); { - let mut rng = self.rng.borrow_mut(); + let mut rng = self.borrow_rng_mut(); (0..num).try_for_each(|_| { let w_id = rng.gen_id(); let r_id = rng.gen_id(); @@ -129,9 +133,9 @@ impl Client { worlds.reserve(len); let mut r_ids = params.into_iter().skip(1).step_by(2); - let mut res = pipe.run().await?; - while let Some(mut item) = res.next().await.transpose()? { - while let Some(row) = item.next().await.transpose()? { + let mut res = self.client.pipeline(pipe).await?; + while let Some(mut item) = res.try_next().await? { + while let Some(row) = item.try_next().await? { let r_id = r_ids.next().unwrap(); worlds.push(World::new(row.get_raw(0), r_id)) } @@ -145,7 +149,7 @@ impl Client { items.push(Fortune::new(0, "Additional fortune added at request time.")); let mut stream = self.client.query_raw::<[i32; 0]>(&self.fortune, []).await?; - while let Some(row) = stream.next().await.transpose()? { + while let Some(row) = stream.try_next().await? { items.push(Fortune::new(row.get_raw(0), row.get_raw::(1))); } items.sort_by(|it, next| it.message.cmp(&next.message)); diff --git a/frameworks/Rust/xitca-web/src/db_diesel.rs b/frameworks/Rust/xitca-web/src/db_diesel.rs new file mode 100644 index 00000000000..49a3e158e18 --- /dev/null +++ b/frameworks/Rust/xitca-web/src/db_diesel.rs @@ -0,0 +1,121 @@ +use std::sync::{Arc, Mutex}; + +use diesel::{prelude::*, r2d2}; + +use crate::{ + ser::{Fortune, Fortunes, World}, + util::{Error, HandleResult, Rand, DB_URL}, +}; + +pub type Pool = Arc<_Pool>; + +pub struct _Pool { + pool: r2d2::Pool>, + rng: Mutex, +} + +pub fn create() -> std::io::Result> { + r2d2::Builder::new() + .max_size(256) + .min_idle(Some(256)) + .test_on_check_out(false) + .idle_timeout(None) + .max_lifetime(None) + .build(r2d2::ConnectionManager::new(DB_URL)) + .map_err(std::io::Error::other) + .map(|pool| { + Arc::new(_Pool { + pool, + rng: Mutex::new(Rand::default()), + }) + }) +} + +#[cold] +#[inline(never)] +fn not_found() -> Error { + format!("world not found").into() +} + +impl _Pool { + pub fn get_world(&self) -> HandleResult { + use crate::schema::world::dsl::*; + + let w_id = self.rng.lock().unwrap().gen_id(); + let mut conn = self.pool.get()?; + world + .filter(id.eq(w_id)) + .load(&mut conn)? + .pop() + .ok_or_else(not_found) + } + + pub fn get_worlds(&self, num: u16) -> HandleResult> { + use crate::schema::world::dsl::*; + + let mut conn = self.pool.get()?; + (0..num) + .map(|_| { + let w_id = self.rng.lock().unwrap().gen_id(); + world + .filter(id.eq(w_id)) + .load::(&mut conn)? + .pop() + .ok_or_else(not_found) + }) + .collect() + } + + pub fn update(&self, num: u16) -> HandleResult> { + use crate::schema::world::dsl::*; + + let mut worlds = { + let mut conn = self.pool.get()?; + let worlds = (0..num) + .map(|_| { + let mut rng = self.rng.lock().unwrap(); + let w_id = rng.gen_id(); + let r_id = rng.gen_id(); + drop(rng); + world + .filter(id.eq(w_id)) + .load::(&mut conn)? + .pop() + .map(|mut w| { + w.randomnumber = r_id; + w + }) + .ok_or_else(not_found) + }) + .collect::>>()?; + + worlds.iter().try_for_each(|w| { + diesel::update(world) + .filter(id.eq(w.id)) + .set(randomnumber.eq(w.randomnumber)) + .execute(&mut conn) + .map(|_| ()) + })?; + + worlds + }; + + worlds.sort_by_key(|w| w.id); + + Ok(worlds) + } + + pub fn tell_fortune(&self) -> HandleResult { + use crate::schema::fortune::dsl::*; + + let mut items = { + let mut conn = self.pool.get()?; + fortune.load::(&mut conn)? + }; + + items.push(Fortune::new(0, "Additional fortune added at request time.")); + items.sort_by(|it, next| it.message.cmp(&next.message)); + + Ok(Fortunes::new(items)) + } +} diff --git a/frameworks/Rust/xitca-web/src/main.rs b/frameworks/Rust/xitca-web/src/main.rs index 2bc0d5fc720..632504dac5e 100755 --- a/frameworks/Rust/xitca-web/src/main.rs +++ b/frameworks/Rust/xitca-web/src/main.rs @@ -1,6 +1,3 @@ -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - mod db; mod ser; mod util; @@ -20,14 +17,12 @@ use xitca_http::{ }; use xitca_service::{fn_service, Service, ServiceExt}; -use self::{ - ser::{json_response, Message}, - util::{context_mw, HandleResult, QueryParse, SERVER_HEADER_VALUE}, -}; +use ser::{json_response, Message}; +use util::{context_mw, HandleResult, QueryParse, SERVER_HEADER_VALUE}; -type Response = http::Response>; type Request = http::Request>; -type Ctx<'a> = self::util::Ctx<'a, Request>; +type Response = http::Response>; +type Ctx<'a> = util::Ctx<'a, Request>; fn main() -> std::io::Result<()> { let service = Router::new() @@ -40,7 +35,6 @@ fn main() -> std::io::Result<()> { .enclosed_fn(middleware_fn) .enclosed(context_mw()) .enclosed(HttpServiceBuilder::h1().io_uring()); - xitca_server::Builder::new() .bind("xitca-web", "0.0.0.0:8080", service)? .build() diff --git a/frameworks/Rust/xitca-web/src/main_axum.rs b/frameworks/Rust/xitca-web/src/main_axum.rs index 1345569126d..571732a897c 100644 --- a/frameworks/Rust/xitca-web/src/main_axum.rs +++ b/frameworks/Rust/xitca-web/src/main_axum.rs @@ -1,32 +1,41 @@ //! show case of axum running on proper thread per core server with io-uring enabled. -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - +mod db; mod ser; mod util; +use std::sync::Arc; + use axum::{ - http::header::{HeaderValue, SERVER}, - response::IntoResponse, + extract::{Json, Query, State}, + http::{ + header::{HeaderValue, SERVER}, + StatusCode, + }, + response::{Html, IntoResponse, Response}, routing::{get, Router}, - Json, }; use tower_http::set_header::SetResponseHeaderLayer; -use crate::tower_compat::TowerHttp; +use crate::{db::Client, ser::Num, tower_compat::TowerHttp}; fn main() -> std::io::Result<()> { let service = TowerHttp::service(|| async { - Router::new() + let cli = db::create().await?; + let service = Router::new() .route("/plaintext", get(plain_text)) .route("/json", get(json)) + .route("/db", get(db)) + .route("/fortunes", get(fortunes)) + .route("/queries", get(queries)) + .route("/updates", get(updates)) + .with_state(Arc::new(cli)) .layer(SetResponseHeaderLayer::if_not_present( SERVER, HeaderValue::from_static("A"), - )) + )); + Ok(service) }); - xitca_server::Builder::new() .bind("xitca-axum", "0.0.0.0:8080", service)? .build() @@ -41,35 +50,56 @@ async fn json() -> impl IntoResponse { Json(ser::Message::new()) } +async fn db(State(cli): State>) -> impl IntoResponse { + cli.get_world().await.map(Json).map_err(Error) +} + +async fn fortunes(State(cli): State>) -> impl IntoResponse { + use sailfish::TemplateOnce; + cli.tell_fortune() + .await + .map_err(Error)? + .render_once() + .map(Html) + .map_err(|e| Error(Box::new(e))) +} + +async fn queries(State(cli): State>, Query(Num(num)): Query) -> impl IntoResponse { + cli.get_worlds(num).await.map(Json).map_err(Error) +} + +async fn updates(State(cli): State>, Query(Num(num)): Query) -> impl IntoResponse { + cli.update(num).await.map(Json).map_err(Error) +} + +struct Error(util::Error); + +impl IntoResponse for Error { + fn into_response(self) -> Response { + let mut res = self.0.to_string().into_response(); + *res.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + res + } +} + +// compat module between xitca-http and axum. mod tower_compat { - use std::{ - cell::RefCell, - convert::Infallible, - error, fmt, - future::Future, - io, - marker::PhantomData, - net::SocketAddr, - pin::Pin, - task::{Context, Poll}, - }; + use core::{cell::RefCell, fmt, future::Future, marker::PhantomData}; + + use std::net::SocketAddr; - use axum::extract::ConnectInfo; - use futures_core::stream::Stream; use http_body::Body; - use pin_project_lite::pin_project; use xitca_http::{ - body::none_body_hint, bytes::Bytes, h1::RequestBody, - http::{HeaderMap, Request, RequestExt, Response}, - BodyError, HttpServiceBuilder, + http::{Request, RequestExt, Response}, + HttpServiceBuilder, }; use xitca_io::net::io_uring::TcpStream; use xitca_service::{ fn_build, middleware::UncheckedReady, ready::ReadyService, Service, ServiceExt, }; - use xitca_unsafe_collection::fake_send_sync::FakeSend; + use xitca_web::service::tower_http_compat::{CompatReqBody, CompatResBody}; pub struct TowerHttp { service: RefCell, @@ -78,24 +108,25 @@ mod tower_compat { impl TowerHttp { pub fn service( - service: F, + func: F, ) -> impl Service< Response = impl ReadyService + Service<(TcpStream, SocketAddr)>, Error = impl fmt::Debug, > where F: Fn() -> Fut + Send + Sync + Clone, - Fut: Future, - S: tower::Service, Response = Response>, + Fut: Future>, + S: tower::Service< + Request, ()>>, + Response = Response, + >, S::Error: fmt::Debug, B: Body + Send + 'static, - B::Error: error::Error + Send + Sync, { fn_build(move |_| { - let service = service.clone(); + let func = func.clone(); async move { - let service = service().await; - Ok::<_, Infallible>(TowerHttp { + func().await.map(|service| TowerHttp { service: RefCell::new(service), _p: PhantomData, }) @@ -108,11 +139,12 @@ mod tower_compat { impl Service>> for TowerHttp where - S: tower::Service, Response = Response>, - B: Body + Send + 'static, - B::Error: error::Error + Send + Sync, + S: tower::Service< + Request, ()>>, + Response = Response, + >, { - type Response = Response>; + type Response = Response>; type Error = S::Error; async fn call( @@ -120,70 +152,10 @@ mod tower_compat { req: Request>, ) -> Result { let (parts, ext) = req.into_parts(); - let (ext, body) = ext.replace_body(()); - let body = _RequestBody { - body: FakeSend::new(body), - }; - let mut req = Request::from_parts(parts, body); - let _ = req.extensions_mut().insert(ConnectInfo(*ext.socket_addr())); + let req = Request::from_parts(parts, CompatReqBody::new(ext, ())); let fut = self.service.borrow_mut().call(req); let (parts, body) = fut.await?.into_parts(); - let body = ResponseBody { body }; - let res = Response::from_parts(parts, body); - Ok(res) - } - } - - pub struct _RequestBody { - body: FakeSend, - } - - impl Body for _RequestBody { - type Data = Bytes; - type Error = io::Error; - - fn poll_data( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll>> { - Pin::new(&mut *self.get_mut().body).poll_next(cx) - } - - fn poll_trailers( - self: Pin<&mut Self>, - _: &mut Context<'_>, - ) -> Poll, Self::Error>> { - Poll::Ready(Ok(None)) - } - } - - pin_project! { - pub struct ResponseBody { - #[pin] - body: B - } - } - - impl Stream for ResponseBody - where - B: Body, - B::Error: error::Error + Send + Sync + 'static, - { - type Item = Result; - - fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - self.project() - .body - .poll_data(cx) - .map_err(|e| BodyError::from(Box::new(e) as Box)) - } - - fn size_hint(&self) -> (usize, Option) { - if Body::is_end_stream(&self.body) { - return none_body_hint(); - } - let hint = Body::size_hint(&self.body); - (hint.lower() as _, hint.upper().map(|u| u as _)) + Ok(Response::from_parts(parts, CompatResBody::new(body))) } } } diff --git a/frameworks/Rust/xitca-web/src/main_iou.rs b/frameworks/Rust/xitca-web/src/main_iou.rs index 7aaa784cef1..789f71cf81b 100644 --- a/frameworks/Rust/xitca-web/src/main_iou.rs +++ b/frameworks/Rust/xitca-web/src/main_iou.rs @@ -1,9 +1,6 @@ // used as reference of if/how moving from epoll to io-uring(or mixture of the two) make sense for // network io. -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - mod db; mod ser; mod util; @@ -40,8 +37,8 @@ type Response = http::Response>; fn main() -> io::Result<()> { let service = fn_service(handler) .enclosed(context_mw()) - .enclosed(fn_build(|service| async { - Ok::<_, Infallible>(Http1IOU { + .enclosed(fn_build(|res: Result<_, _>| async { + res.map(|service| Http1IOU { service, date: DateTimeService::new(), }) diff --git a/frameworks/Rust/xitca-web/src/main_sync.rs b/frameworks/Rust/xitca-web/src/main_sync.rs new file mode 100644 index 00000000000..03f6c9ea3a3 --- /dev/null +++ b/frameworks/Rust/xitca-web/src/main_sync.rs @@ -0,0 +1,68 @@ +mod db_diesel; +mod schema; +mod ser; +mod util; + +use serde::Serialize; +use xitca_web::{ + codegen::route, + handler::{html::Html, json::Json, query::Query, state::StateOwn, text::Text}, + http::{header::SERVER, WebResponse}, + route::get, + App, +}; + +use db_diesel::Pool; +use ser::Num; +use util::{HandleResult, SERVER_HEADER_VALUE}; + +fn main() -> std::io::Result<()> { + App::new() + .with_state(db_diesel::create()?) + .at("/plaintext", get(Text("Hello, World!"))) + .at("/json", get(Json(ser::Message::new()))) + .at_typed(db) + .at_typed(fortunes) + .at_typed(queries) + .at_typed(updates) + .map(header) + .serve() + .bind("0.0.0.0:8080")? + .run() + .wait() +} + +fn header(mut res: WebResponse) -> WebResponse { + res.headers_mut().insert(SERVER, SERVER_HEADER_VALUE); + res +} + +#[route("/db", method = get)] +fn db(StateOwn(pool): StateOwn) -> HandleResult> { + pool.get_world().map(Json) +} + +#[route("/fortunes", method = get)] +fn fortunes(StateOwn(pool): StateOwn) -> HandleResult> { + use sailfish::TemplateOnce; + pool.tell_fortune()? + .render_once() + .map(Html) + .map_err(Into::into) +} + +#[route("/queries", method = get)] +fn queries( + Query(Num(num)): Query, + StateOwn(pool): StateOwn, +) -> HandleResult> { + pool.get_worlds(num).map(Json) +} + +#[route("/updates", method = get)] +fn updates( + Query(Num(num)): Query, + StateOwn(pool): StateOwn, +) -> HandleResult> { + pool.update(num).map(Json) +} diff --git a/frameworks/Rust/xitca-web/src/main_wasm.rs b/frameworks/Rust/xitca-web/src/main_wasm.rs index f9961afb6ce..4a38435a151 100644 --- a/frameworks/Rust/xitca-web/src/main_wasm.rs +++ b/frameworks/Rust/xitca-web/src/main_wasm.rs @@ -1,50 +1,31 @@ mod ser; mod util; -use std::{env, io, net::TcpListener, os::wasi::io::FromRawFd}; - use xitca_web::{ - dev::service::Service, - handler::{handler_service, json::Json}, - http::header::SERVER, - request::WebRequest, - response::WebResponse, + handler::{json::Json, text::Text}, + http::{header::SERVER, WebResponse}, route::get, App, }; -use self::util::SERVER_HEADER_VALUE; - -fn main() -> io::Result<()> { - let fd = env::var("FD_COUNT") +fn main() -> std::io::Result<()> { + let listener = std::env::var("FD_COUNT") .ok() - .and_then(|var| var.parse().ok()) + .and_then(|v| v.parse().ok()) + .map(|fd| unsafe { std::os::wasi::io::FromRawFd::from_raw_fd(fd) }) .expect("failed to parse FD_COUNT env"); - let listener = unsafe { TcpListener::from_raw_fd(fd) }; - App::new() - .at( - "/json", - get(handler_service(|| async { Json(ser::Message::new()) })), - ) - .at( - "/plaintext", - get(handler_service(|| async { "Hello, World!" })), - ) - .enclosed_fn(middleware_fn) + .at("/json", get(Json(ser::Message::new()))) + .at("/plaintext", get(Text("Hello, World!"))) + .map(header) .serve() .listen(listener)? .run() .wait() } -async fn middleware_fn(service: &S, ctx: WebRequest<'_>) -> Result -where - S: for<'r> Service, Response = WebResponse, Error = E>, -{ - service.call(ctx).await.map(|mut res| { - res.headers_mut().append(SERVER, SERVER_HEADER_VALUE); - res - }) +fn header(mut res: WebResponse) -> WebResponse { + res.headers_mut().append(SERVER, util::SERVER_HEADER_VALUE); + res } diff --git a/frameworks/Rust/xitca-web/src/schema.rs b/frameworks/Rust/xitca-web/src/schema.rs new file mode 100644 index 00000000000..758acfe9927 --- /dev/null +++ b/frameworks/Rust/xitca-web/src/schema.rs @@ -0,0 +1,13 @@ +diesel::table! { + world (id) { + id -> Integer, + randomnumber -> Integer, + } +} + +diesel::table! { + fortune (id) { + id -> Integer, + message -> Text, + } +} diff --git a/frameworks/Rust/xitca-web/src/ser.rs b/frameworks/Rust/xitca-web/src/ser.rs index 3985d4c7888..8e15ce71671 100644 --- a/frameworks/Rust/xitca-web/src/ser.rs +++ b/frameworks/Rust/xitca-web/src/ser.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; -use serde::{ser::SerializeStruct, Serialize, Serializer}; +use serde::{ser::SerializeStruct, Deserialize, Deserializer, Serialize, Serializer}; use xitca_http::{ body::Once, bytes::{BufMutWriter, Bytes, BytesMut}, @@ -11,6 +11,7 @@ use xitca_http::{ use crate::util::Error; +#[derive(Clone)] pub struct Message { message: &'static str, } @@ -24,6 +25,9 @@ impl Message { } } +pub struct Num(pub u16); + +#[cfg_attr(feature = "pg-orm", derive(diesel::Queryable))] pub struct World { pub id: i32, pub randomnumber: i32, @@ -36,6 +40,7 @@ impl World { } } +#[cfg_attr(feature = "pg-orm", derive(diesel::Queryable))] pub struct Fortune { pub id: i32, pub message: Cow<'static, str>, @@ -68,6 +73,73 @@ impl Fortunes { } } +impl<'de> Deserialize<'de> for Num { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + use core::{cmp, fmt}; + + use serde::de::{Error, MapAccess, Visitor}; + + const FIELDS: &'static [&'static str] = &["q"]; + + struct Field; + + impl<'de> Deserialize<'de> for Field { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct FieldVisitor; + + impl<'de> Visitor<'de> for FieldVisitor { + type Value = Field; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("`q`") + } + + fn visit_str(self, value: &str) -> Result + where + E: Error, + { + match value { + "q" => Ok(Field), + _ => Err(Error::unknown_field(value, FIELDS)), + } + } + } + + deserializer.deserialize_identifier(FieldVisitor) + } + } + + struct NumVisitor; + + impl<'de> Visitor<'de> for NumVisitor { + type Value = Num; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("struct Num") + } + + fn visit_map(self, mut map: V) -> Result + where + V: MapAccess<'de>, + { + map.next_key::()? + .ok_or_else(|| Error::missing_field("q"))?; + let q = map.next_value::().unwrap_or(1); + let q = cmp::min(500, cmp::max(1, q)); + Ok(Num(q)) + } + } + + deserializer.deserialize_struct("Num", FIELDS, NumVisitor) + } +} + impl Serialize for Message { fn serialize(&self, serializer: S) -> Result where diff --git a/frameworks/Rust/xitca-web/src/util.rs b/frameworks/Rust/xitca-web/src/util.rs index e9bc8695bd0..8c4cee9da98 100755 --- a/frameworks/Rust/xitca-web/src/util.rs +++ b/frameworks/Rust/xitca-web/src/util.rs @@ -1,8 +1,8 @@ #![allow(dead_code)] -use core::cmp; +use core::{cell::RefCell, cmp}; -use xitca_http::http::header::HeaderValue; +use xitca_http::{bytes::BytesMut, http::header::HeaderValue}; pub trait QueryParse { fn parse_query(self) -> u16; @@ -29,22 +29,15 @@ pub type Error = Box; pub type HandleResult = Result; -#[cfg(not(target_arch = "wasm32"))] -#[cfg(any(feature = "pg", feature = "pg-iou"))] -mod non_wasm { - use core::{cell::RefCell, future::Future, pin::Pin}; - - use xitca_http::{ - bytes::BytesMut, - util::middleware::context::{Context, ContextBuilder}, - }; +pub const DB_URL: &str = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"; - use super::*; - - use crate::db::{self, Client}; - - pub const DB_URL: &str = "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"; +pub struct State { + pub client: DB, + pub write_buf: RefCell, +} +#[cfg(not(target_arch = "wasm32"))] +mod non_wasm { #[derive(Default)] pub struct Rand(nanorand::WyRand); @@ -56,26 +49,39 @@ mod non_wasm { } } - pub type Ctx<'a, Req> = Context<'a, Req, State>; - - pub struct State { - pub client: Client, - pub write_buf: RefCell, + #[cfg(any(feature = "pg", feature = "pg-iou"))] + mod pg_state { + use core::{cell::RefCell, future::Future, pin::Pin}; + + use xitca_http::{ + bytes::BytesMut, + util::middleware::context::{Context, ContextBuilder}, + }; + + use crate::{ + db::{self, Client}, + util::{HandleResult, State}, + }; + + pub type Ctx<'a, Req> = Context<'a, Req, State>; + + pub fn context_mw( + ) -> ContextBuilder Pin>>>>> + { + ContextBuilder::new(|| { + Box::pin(async { + db::create().await.map(|client| State { + client, + write_buf: RefCell::new(BytesMut::new()), + }) + }) as _ + }) + } } - pub fn context_mw( - ) -> ContextBuilder Pin>>>> { - ContextBuilder::new(|| { - Box::pin(async { - db::create(DB_URL).await.map(|client| State { - client, - write_buf: RefCell::new(BytesMut::new()), - }) - }) as _ - }) - } + #[cfg(any(feature = "pg", feature = "pg-iou"))] + pub use pg_state::*; } #[cfg(not(target_arch = "wasm32"))] -#[cfg(any(feature = "pg", feature = "pg-iou"))] pub use non_wasm::*; diff --git a/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile b/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile index 7c45bef27fb..6c0422ea4ff 100644 --- a/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-axum.dockerfile @@ -1,9 +1,9 @@ -FROM rust:1.74 +FROM rust:1.76 ADD ./ /xitca-web WORKDIR /xitca-web -RUN cargo build --release --bin xitca-web-axum --features axum,io-uring +RUN cargo build --release --bin xitca-web-axum --features axum,io-uring,pg-sync,template EXPOSE 8080 diff --git a/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile b/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile index 4a79ed928bc..35e53b29db8 100644 --- a/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-iou.dockerfile @@ -1,4 +1,4 @@ -FROM rust:latest +FROM rust:1.76 ADD ./ /xitca-web WORKDIR /xitca-web diff --git a/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile b/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile new file mode 100644 index 00000000000..93f848de2ec --- /dev/null +++ b/frameworks/Rust/xitca-web/xitca-web-sync.dockerfile @@ -0,0 +1,10 @@ +FROM rust:1.76 + +ADD ./ /xitca-web +WORKDIR /xitca-web + +RUN cargo build --release --bin xitca-web-sync --features pg-orm,template,web-codegen + +EXPOSE 8080 + +CMD ./target/release/xitca-web-sync diff --git a/frameworks/Rust/xitca-web/xitca-web-wasm.dockerfile b/frameworks/Rust/xitca-web/xitca-web-wasm.dockerfile index 08b43318c88..d5611eb092d 100644 --- a/frameworks/Rust/xitca-web/xitca-web-wasm.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web-wasm.dockerfile @@ -1,7 +1,7 @@ ARG WASMTIME_VERSION=15.0.0 ARG WASM_TARGET=wasm32-wasi-preview1-threads -FROM rust:1.74 AS compile +FROM rust:1.76 AS compile ARG WASMTIME_VERSION ARG WASM_TARGET @@ -10,6 +10,7 @@ WORKDIR /tmp COPY / ./ RUN curl -LSs "https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-$(uname -m)-linux.tar.xz" | \ tar --strip-components=1 -Jx && \ +rustup default nightly && \ rustup target add ${WASM_TARGET} && \ cargo build --bin xitca-web-wasm --features web --release --target ${WASM_TARGET} diff --git a/frameworks/Rust/xitca-web/xitca-web.dockerfile b/frameworks/Rust/xitca-web/xitca-web.dockerfile index abbceb5e0ca..88ff778663c 100644 --- a/frameworks/Rust/xitca-web/xitca-web.dockerfile +++ b/frameworks/Rust/xitca-web/xitca-web.dockerfile @@ -1,4 +1,4 @@ -FROM rust:latest +FROM rust:1.76 ADD ./ /xitca-web WORKDIR /xitca-web diff --git a/frameworks/TypeScript/nest/package.json b/frameworks/TypeScript/nest/package.json index 219569e19e4..09416024d1b 100644 --- a/frameworks/TypeScript/nest/package.json +++ b/frameworks/TypeScript/nest/package.json @@ -32,7 +32,7 @@ "reflect-metadata": "0.1.13", "rimraf": "3.0.2", "rxjs": "6.5.4", - "typeorm": "0.2.29" + "typeorm": "0.3.0" }, "devDependencies": { "@nestjs/cli": "7.5.3", diff --git a/frameworks/Zig/zap/.gitignore b/frameworks/Zig/zap/.gitignore new file mode 100644 index 00000000000..170dc0f1403 --- /dev/null +++ b/frameworks/Zig/zap/.gitignore @@ -0,0 +1,2 @@ +zig-cache/**/*', +zig-out: 'zig-out/**/*', diff --git a/frameworks/Zig/zap/README.md b/frameworks/Zig/zap/README.md new file mode 100644 index 00000000000..71117a3400c --- /dev/null +++ b/frameworks/Zig/zap/README.md @@ -0,0 +1,25 @@ + +# [Zap](https://github.com/zigzap/zap) - Blazingly fast backends in zig + +## Description + +Zap is the zig microframework for web applications. + +## Test URLs + +### Test 1: JSON Encoding + + http://localhost:3000/json + +### Test 2: Plaintext + + http://localhost:3000/plaintext + +### Test 2: Single Row Query + + http://localhost:3000/db + +### Test 4: Fortunes (Template rendering) + + http://localhost:3000/fortunes + diff --git a/frameworks/Zig/zap/benchmark_config.json b/frameworks/Zig/zap/benchmark_config.json new file mode 100644 index 00000000000..0b77f27d77d --- /dev/null +++ b/frameworks/Zig/zap/benchmark_config.json @@ -0,0 +1,26 @@ +{ + "framework": "zap", + "tests": [{ + "default": { + "json_url": "/json", + "db_url": "/db", + "fortune_url": "/fortunes", + "plaintext_url": "/plaintext", + "port": 3000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "Postgres", + "framework": "Zap", + "language": "Zig", + "flavor": "None", + "orm": "Full", + "platform": "None", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "Zap (Zig)", + "notes": "", + "versus": "" + } + }] +} diff --git a/frameworks/Zig/zap/build.zig b/frameworks/Zig/zap/build.zig new file mode 100644 index 00000000000..70c740351a1 --- /dev/null +++ b/frameworks/Zig/zap/build.zig @@ -0,0 +1,99 @@ +const std = @import("std"); + +// Although this function looks imperative, note that its job is to +// declaratively construct a build graph that will be executed by an external +// runner. +pub fn build(b: *std.Build) void { + // Standard target options allows the person running `zig build` to choose + // what target to build for. Here we do not override the defaults, which + // means any target is allowed, and the default is native. Other options + // for restricting supported target set are available. + const target = b.standardTargetOptions(.{}); + + // Standard optimization options allow the person running `zig build` to select + // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do nots + // set a preferred release mode, allowing the user to decide how to optimize. + const optimize = b.standardOptimizeOption(.{}); + + const exe = b.addExecutable(.{ + .name = "zap", + // In this case the main source file is merely a path, however, in more + // complicated build scripts, this could be a generated file. + .root_source_file = .{ .path = "src/main.zig" }, + .target = target, + .optimize = optimize, + }); + + //exe.addPackagePath("random", "src/random.zig"); + + const zap = b.dependency("zap", .{ + .target = target, + .optimize = optimize, + .openssl = false, // set to true to enable TLS support + }); + exe.addModule("zap", zap.module("zap")); + + const pg = b.dependency("pg", .{ + .target = target, + .optimize = optimize, + }); + exe.addModule("pg", pg.module("pg")); + + const dig = b.dependency("dig", .{ + .target = target, + .optimize = optimize, + }); + exe.addModule("dns", dig.module("dns")); + + // const mustache = b.dependency("mustache", .{ + // .target = target, + // .optimize = optimize, + // }); + // exe.addModule("mustache", mustache.module("mustache")); + + exe.linkLibrary(zap.artifact("facil.io")); + + // This declares intent for the executable to be installed into the + // standard location when the user invokes the "install" step (the default + // step when running `zig build`). + b.installArtifact(exe); + + // This *creates* a Run step in the build graph, to be executed when another + // step is evaluated that depends on it. The next line below will establish + // such a dependency. + const run_cmd = b.addRunArtifact(exe); + + // By making the run step depend on the install step, it will be run from the + // installation directory rather than directly from within the cache directory. + // This is not necessary, however, if the application depends on other installed + // files, this ensures they will be present and in the expected location. + run_cmd.step.dependOn(b.getInstallStep()); + + // This allows the user to pass arguments to the application in the build + // command itself, like this: `zig build run -- arg1 arg2 etc` + if (b.args) |args| { + run_cmd.addArgs(args); + } + + // This creates a build step. It will be visible in the `zig build --help` menu, + // and can be selected like this: `zig build run` + // This will evaluate the `run` step rather than the default, which is "install". + const run_step = b.step("run", "Run the app"); + run_step.dependOn(&run_cmd.step); + + // Creates a step for unit testing. This only builds the test executable + // but does not run it. + const unit_tests = b.addTest(.{ + .root_source_file = .{ .path = "src/main.zig" }, + .target = target, + .optimize = optimize, + }); + + const run_unit_tests = b.addRunArtifact(unit_tests); + + // Similar to creating the run step earlier, this exposes a `test` step to + // the `zig build --help` menu, providing a way for the user to request + // running the unit tests. + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_unit_tests.step); +} diff --git a/frameworks/Zig/zap/build.zig.zon b/frameworks/Zig/zap/build.zig.zon new file mode 100644 index 00000000000..3abfe719e55 --- /dev/null +++ b/frameworks/Zig/zap/build.zig.zon @@ -0,0 +1,21 @@ +.{ + .name = "Zap testing", + .version = "0.1.0", + + .dependencies = .{ + // zap v0.5.1 + .zap = .{ + .url = "https://github.com/zigzap/zap/archive/refs/tags/v0.5.1.tar.gz", + .hash = "1220d4802fb09d4e99c0e7265f90d6f3cfdc3e5e31c1b05f0924ee2dd26d9d6dbbf4", + }, + .pg = .{ + .url = "https://github.com/karlseguin/pg.zig/archive/f3f4a0b3b9996bfb1bf9bd0bdd0d73b36e915a86.tar.gz", + .hash = "1220337202642ee66408a35f254549f22cf3a096c6fa6c28e6f87a0161d5a6c0f4ab" + }, + .dig = .{ + .url = "https://github.com/lun-4/zigdig/archive/2ec407ec3c7f347e747717977958e9ba339eb82f.tar.gz", + .hash = "1220dfdb3089dfe9a4e4bc1226fcff08d91d0c0853f287d98d8b81270da251790331" + }, + + } +} \ No newline at end of file diff --git a/frameworks/Zig/zap/run.sh b/frameworks/Zig/zap/run.sh new file mode 100644 index 00000000000..95c2266e8bd --- /dev/null +++ b/frameworks/Zig/zap/run.sh @@ -0,0 +1,3 @@ +echo "Waiting for ZAP to start..." + +zap \ No newline at end of file diff --git a/frameworks/Zig/zap/src/endpoints.zig b/frameworks/Zig/zap/src/endpoints.zig new file mode 100644 index 00000000000..aeeffbf4e0a --- /dev/null +++ b/frameworks/Zig/zap/src/endpoints.zig @@ -0,0 +1,334 @@ +const std = @import("std"); +const zap = @import("zap"); +const pg = @import("pg"); + +const Mustache = @import("zap").Mustache; +const Thread = std.Thread; +const Mutex = Thread.Mutex; + +const middleware = @import("middleware.zig"); + +const Message = struct { + message: []const u8, +}; + +const World = struct { + id: i32, + randomNumber: i32, +}; + +const Fortune = struct { + id: i32, + message: []const u8, +}; + +pub const FortunesEndpoint = struct { + ep: zap.Endpoint = undefined, + mustache: Mustache, + mutex: Mutex, + + const Self = @This(); + + pub fn init() Self { + const template = "Fortunes{{#fortunes}}{{/fortunes}}
idmessage
{{id}}{{message}}
"; + const mustache = Mustache.fromData(template) catch unreachable; + + return .{ + .ep = zap.Endpoint.init(.{ + .path = "/fortunes", + .get = get, + }), + .mustache = mustache, + .mutex = Mutex{}, + }; + } + + pub fn deinit(self: *Self) void { + self.mustache.deinit(); + } + + pub fn endpoint(self: *Self) *zap.Endpoint { + return &self.ep; + } + + fn compareStrings(_: void, lhs: []const u8, rhs: []const u8) bool { + return std.mem.order(u8, lhs, rhs).compare(std.math.CompareOperator.lt); + } + + fn cmpFortuneByMessage(_: void, a: Fortune, b: Fortune) bool { + return std.mem.order(u8, a.message, b.message).compare(std.math.CompareOperator.lt); + } + + fn getFortunes(pool: *pg.Pool) ![]const Fortune { + var conn = try pool.acquire(); + defer conn.release(); + + var rows = try conn.query("SELECT id, message FROM Fortune", .{}); + rows.deinit(); + + var fortunes = std.ArrayList(Fortune).init(middleware.SharedAllocator.getAllocator()); + defer fortunes.deinit(); + + while (try rows.next()) |row| { + var fortune = Fortune{ .id = row.get(i32, 0), .message = row.get([]const u8, 1) }; + _ = try fortunes.append(fortune); + } + + var fortune = Fortune{ .id = 0, .message = "Additional fortune added at request time." }; + _ = try fortunes.append(fortune); + + var fortunes_slice = try fortunes.toOwnedSlice(); + std.mem.sort(Fortune, fortunes_slice, {}, cmpFortuneByMessage); + + return fortunes_slice; + } + + fn getFortunesHtml(self: *Self, pool: *pg.Pool) ![]const u8 { + var fortunes = try getFortunes(pool); + + self.mutex.lock(); + const ret = self.mustache.build(.{ .fortunes = fortunes }); + defer ret.deinit(); + self.mutex.unlock(); + + const raw = ret.str().?; + + // std.debug.print("mustache output {s}\n", .{raw}); + + var html = try deescapeHtml(raw); + + // std.debug.print("html output {s}\n", .{html}); + + return html; + } + + pub fn get(ep: *zap.Endpoint, req: zap.Request) void { + const self = @fieldParentPtr(Self, "ep", ep); + + if (!checkPath(ep, req)) return; + + req.setHeader("content-type", "text/html; charset=utf-8") catch return; + + var pool: *pg.Pool = undefined; + + const maybe_context: ?*middleware.Context = req.getUserContext(middleware.Context); + if (maybe_context) |context| { + if (context.pg) |cpg| { + pool = cpg.pool; + } + } + + var fortunes_html = getFortunesHtml(self, pool) catch return; + + req.sendBody(fortunes_html) catch return; + + return; + } +}; + +pub const DbEndpoint = struct { + ep: zap.Endpoint = undefined, + mutex: Mutex, + const Self = @This(); + + pub fn init() Self { + return .{ + .ep = zap.Endpoint.init(.{ + .path = "/db", + .get = get, + }), + .mutex = Mutex{}, + }; + } + + pub fn endpoint(self: *Self) *zap.Endpoint { + return &self.ep; + } + + pub fn get(ep: *zap.Endpoint, req: zap.Request) void { + const self = @fieldParentPtr(Self, "ep", ep); + + if (!checkPath(ep, req)) return; + + req.setContentType(.JSON) catch return; + + var random_number: u32 = 0; + var pool: *pg.Pool = undefined; + + const maybe_context: ?*middleware.Context = req.getUserContext(middleware.Context); + if (maybe_context) |context| { + if (context.prng) |prng| { + if (context.pg) |cpg| { + pool = cpg.pool; + + self.mutex.lock(); + random_number = 1 + (prng.rnd.random().uintAtMost(u32, 9999)); + self.mutex.unlock(); + } + } + } + + // std.debug.print("Attempting to return random: {}\n", .{random_number}); + + if (random_number == 0) { + return; + } + + var conn = pool.acquire() catch return; + defer conn.release(); + + var row_result = conn.row("SELECT id, randomNumber FROM World WHERE id = $1", .{random_number}) catch |err| { + std.debug.print("Error querying database: {}\n", .{err}); + return; + }; + var row = row_result.?; + defer row.deinit(); + + var world = World{ .id = row.get(i32, 0), .randomNumber = row.get(i32, 1) }; + + var buf: [100]u8 = undefined; + var json_to_send: []const u8 = undefined; + if (zap.stringifyBuf(&buf, world, .{})) |json_message| { + json_to_send = json_message; + } else { + json_to_send = "null"; + } + + req.sendBody(json_to_send) catch return; + + return; + } +}; + +pub const PlaintextEndpoint = struct { + ep: zap.Endpoint = undefined, + const Self = @This(); + + pub fn init() Self { + return .{ + .ep = zap.Endpoint.init(.{ + .path = "/plaintext", + .get = get, + }), + }; + } + + pub fn endpoint(self: *Self) *zap.Endpoint { + return &self.ep; + } + + pub fn get(ep: *zap.Endpoint, req: zap.Request) void { + const self = @fieldParentPtr(Self, "ep", ep); + _ = self; + + if (!checkPath(ep, req)) return; + + req.setContentType(.TEXT) catch return; + + req.sendBody("Hello, World!") catch return; + return; + } +}; + +pub const JsonEndpoint = struct { + ep: zap.Endpoint = undefined, + const Self = @This(); + + pub fn init() Self { + return .{ + .ep = zap.Endpoint.init(.{ + .path = "/json", + .get = get, + }), + }; + } + + pub fn endpoint(self: *Self) *zap.Endpoint { + return &self.ep; + } + + pub fn get(ep: *zap.Endpoint, req: zap.Request) void { + const self = @fieldParentPtr(Self, "ep", ep); + _ = self; + + if (!checkPath(ep, req)) return; + + req.setContentType(.JSON) catch return; + + var message = Message{ .message = "Hello, World!" }; + + var buf: [100]u8 = undefined; + var json_to_send: []const u8 = undefined; + if (zap.stringifyBuf(&buf, message, .{})) |json_message| { + json_to_send = json_message; + } else { + json_to_send = "null"; + } + + req.sendBody(json_to_send) catch return; + return; + } +}; + +fn checkPath(ep: *zap.Endpoint, req: zap.Request) bool { + if (!std.mem.eql(u8, ep.settings.path, req.path.?)) { + // std.debug.print("Path mismatch: {s} != {s}\n", .{ ep.settings.path, req.path.? }); + + return false; + } + + // std.debug.print("Path match: {s} == {s}\n", .{ ep.settings.path, req.path.? }); + + return true; +} + +fn deescapeHtml(input: []const u8) ![]const u8 { + var output = std.ArrayList(u8).init(middleware.SharedAllocator.getAllocator()); + defer output.deinit(); + + var i: usize = 0; + while (i < input.len) { + if (std.mem.startsWith(u8, input[i..], " ")) { + try output.append(' '); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], """)) { + try output.append('"'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], "&")) { + try output.append('&'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], "'")) { + try output.append('\''); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], "(")) { + try output.append('('); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], ")")) { + try output.append(')'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], "+")) { + try output.append('+'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], ",")) { + try output.append(','); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], ".")) { + try output.append('.'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], "/")) { + try output.append('/'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], ":")) { + try output.append(':'); + i += 5; + } else if (std.mem.startsWith(u8, input[i..], ";")) { + try output.append(';'); + i += 5; + } else { + try output.append(input[i]); + i += 1; + } + } + + return output.toOwnedSlice(); +} diff --git a/frameworks/Zig/zap/src/main.zig b/frameworks/Zig/zap/src/main.zig new file mode 100644 index 00000000000..489fb5d5b7e --- /dev/null +++ b/frameworks/Zig/zap/src/main.zig @@ -0,0 +1,95 @@ +const std = @import("std"); +const zap = @import("zap"); +const pg = @import("pg"); +const regex = @import("regex"); +const dns = @import("dns"); +const pool = @import("pool.zig"); + +const endpoints = @import("endpoints.zig"); +const middleware = @import("middleware.zig"); + +const RndGen = std.rand.DefaultPrng; +const Allocator = std.mem.Allocator; +const Pool = pg.Pool; + +pub fn main() !void { + var gpa = std.heap.GeneralPurposeAllocator(.{ + .thread_safe = true, + }){}; + + var tsa = std.heap.ThreadSafeAllocator{ + .child_allocator = gpa.allocator(), + }; + + var allocator = tsa.allocator(); + + var pg_pool = try pool.initPool(allocator); + defer pg_pool.deinit(); + + var rnd = std.rand.DefaultPrng.init(blk: { + var seed: u64 = undefined; + try std.os.getrandom(std.mem.asBytes(&seed)); + break :blk seed; + }); + + middleware.SharedAllocator.init(allocator); + + // create the endpoint + var dbEndpoint = endpoints.DbEndpoint.init(); + var plaintextEndpoint = endpoints.PlaintextEndpoint.init(); + var jsonEndpoint = endpoints.JsonEndpoint.init(); + var fortunesEndpoint = endpoints.FortunesEndpoint.init(); + + // we wrap the endpoint with a middleware handler + var jsonEndpointHandler = zap.Middleware.EndpointHandler(middleware.Handler, middleware.Context).init( + jsonEndpoint.endpoint(), // the endpoint + null, // no other handler (we are the last in the chain) + false, // break on finish. See EndpointHandler for this. Not applicable here. + ); + + var plaintextEndpointHandler = zap.Middleware.EndpointHandler(middleware.Handler, middleware.Context).init( + plaintextEndpoint.endpoint(), + jsonEndpointHandler.getHandler(), + false, + ); + + var fortunesEndpointHandler = zap.Middleware.EndpointHandler(middleware.Handler, middleware.Context).init( + fortunesEndpoint.endpoint(), // the endpoint + plaintextEndpointHandler.getHandler(), // no other handler (we are the last in the chain) + false, + ); + + var dbEndpointHandler = zap.Middleware.EndpointHandler(middleware.Handler, middleware.Context).init( + dbEndpoint.endpoint(), // the endpoint + fortunesEndpointHandler.getHandler(), // no other handler (we are the last in the chain) + false, + ); + + var headerHandler = middleware.HeaderMiddleWare.init(dbEndpointHandler.getHandler()); + var prngHandler = middleware.PrngMiddleWare.init(headerHandler.getHandler(), &rnd); + var pgHandler = middleware.PgMiddleWare.init(prngHandler.getHandler(), pg_pool); + + var listener = try zap.Middleware.Listener(middleware.Context).init( + .{ + .on_request = null, // must be null + .port = 3000, + .log = false, + .max_clients = 100000, + }, + pgHandler.getHandler(), + + middleware.SharedAllocator.getAllocator, + ); + try listener.listen(); + + const cpuCount = @as(i16, @intCast(std.Thread.getCpuCount() catch 1)); + + std.debug.print("Listening on 0.0.0.0:3000 on {d} threads\n", .{cpuCount}); + + // start worker threads + zap.start(.{ + .threads = 16 * cpuCount, + .workers = 1, + }); +} + diff --git a/frameworks/Zig/zap/src/middleware.zig b/frameworks/Zig/zap/src/middleware.zig new file mode 100644 index 00000000000..20c01b7ffde --- /dev/null +++ b/frameworks/Zig/zap/src/middleware.zig @@ -0,0 +1,129 @@ +const std = @import("std"); +const zap = @import("zap"); +const pg = @import("pg"); + +// just a way to share our allocator via callback +pub const SharedAllocator = struct { + // static + var allocator: std.mem.Allocator = undefined; + + const Self = @This(); + + // just a convenience function + pub fn init(a: std.mem.Allocator) void { + allocator = a; + } + + // static function we can pass to the listener later + pub fn getAllocator() std.mem.Allocator { + return allocator; + } +}; + +// create a combined context struct +pub const Context = struct { + prng: ?PrngMiddleWare.Prng = null, + pg: ?PgMiddleWare.Pg = null, +}; + +pub const Handler = zap.Middleware.Handler(Context); + +pub const HeaderMiddleWare = struct { + handler: Handler, + + const Self = @This(); + + pub fn init(other: ?*Handler) Self { + return .{ + .handler = Handler.init(onRequest, other), + }; + } + + // we need the handler as a common interface to chain stuff + pub fn getHandler(self: *Self) *Handler { + return &self.handler; + } + + // note that the first parameter is of type *Handler, not *Self !!! + pub fn onRequest(handler: *Handler, req: zap.Request, context: *Context) bool { + // this is how we would get our self pointer + var self = @fieldParentPtr(Self, "handler", handler); + _ = self; + + req.setHeader("Server", "Zap") catch return false; + + // continue in the chain + return handler.handleOther(req, context); + } +}; + +pub const PrngMiddleWare = struct { + handler: Handler, + rnd: *std.rand.DefaultPrng, + + const Self = @This(); + + const Prng = struct { + rnd: *std.rand.DefaultPrng = undefined, + }; + + pub fn init(other: ?*Handler, rnd: *std.rand.DefaultPrng) Self { + return .{ + .handler = Handler.init(onRequest, other), + .rnd = rnd, + }; + } + + // we need the handler as a common interface to chain stuff + pub fn getHandler(self: *Self) *Handler { + return &self.handler; + } + + // note that the first parameter is of type *Handler, not *Self !!! + pub fn onRequest(handler: *Handler, req: zap.Request, context: *Context) bool { + + // this is how we would get our self pointer + var self = @fieldParentPtr(Self, "handler", handler); + + context.prng = Prng{ .rnd = self.rnd }; + + // continue in the chain + return handler.handleOther(req, context); + } +}; + +pub const PgMiddleWare = struct { + handler: Handler, + pool: *pg.Pool, + + const Self = @This(); + + const Pg = struct { + pool: *pg.Pool = undefined, + }; + + pub fn init(other: ?*Handler, pool: *pg.Pool) Self { + return .{ + .handler = Handler.init(onRequest, other), + .pool = pool, + }; + } + + // we need the handler as a common interface to chain stuff + pub fn getHandler(self: *Self) *Handler { + return &self.handler; + } + + // note that the first parameter is of type *Handler, not *Self !!! + pub fn onRequest(handler: *Handler, req: zap.Request, context: *Context) bool { + + // this is how we would get our self pointer + var self = @fieldParentPtr(Self, "handler", handler); + + // do our work: fill in the user field of the context + context.pg = Pg{ .pool = self.pool }; + + // continue in the chain + return handler.handleOther(req, context); + } +}; diff --git a/frameworks/Zig/zap/src/pool.zig b/frameworks/Zig/zap/src/pool.zig new file mode 100644 index 00000000000..7241780a464 --- /dev/null +++ b/frameworks/Zig/zap/src/pool.zig @@ -0,0 +1,78 @@ +const std = @import("std"); +const pg = @import("pg"); +const regex = @import("regex"); +const dns = @import("dns"); + +const Allocator = std.mem.Allocator; +const Pool = pg.Pool; +const ArrayList = std.ArrayList; +const Regex = regex.Regex; + +pub fn initPool(allocator: Allocator) !*pg.Pool { + const info = try parsePostgresConnStr(); + std.debug.print("Cconnection info: {s}:{s}@{s}:{d}/{s}\n", .{ info.username, info.password, info.hostname, info.port, info.database }); + + const hostname = std.os.getenv("PG_HOST") orelse "localhost"; + var addresses = try dns.helpers.getAddressList(hostname, allocator); + defer addresses.deinit(); + + var hostAddress = std.net.Address.parseIp("127.0.0.1", 0) catch unreachable; + + for (addresses.addrs) |address| { + hostAddress = address; + } + + std.debug.print("tfb hostname {}\n", .{hostAddress.in}); + + const host = try addressAsString(hostAddress); + + var pg_pool = try Pool.init(allocator, .{ .size = 28, .connect = .{ + .port = info.port, + .host = host, + }, .auth = .{ + .username = info.username, + .database = info.database, + .password = info.password, + }, .timeout = 10_000,}); + + return pg_pool; +} + +pub const ConnectionInfo = struct { + username: []const u8, + password: []const u8, + hostname: []const u8, + port: u16, + database: []const u8, +}; + +fn addressAsString(address: std.net.Address) ![]const u8 { + const bytes = @as(*const [4]u8, @ptrCast(&address.in.sa.addr)); + + var buffer: [256]u8 = undefined; + var source = std.io.StreamSource{ .buffer = std.io.fixedBufferStream(&buffer) }; + var writer = source.writer(); + + //try writer.writeAll("Hello, World!"); + + try writer.print("{}.{}.{}.{}", .{ + bytes[0], + bytes[1], + bytes[2], + bytes[3], + }); + + const output = source.buffer.getWritten(); + + return output; +} + +fn parsePostgresConnStr() !ConnectionInfo { + return ConnectionInfo{ + .username = std.os.getenv("PG_USER") orelse "benchmarkdbuser", + .password = std.os.getenv("PG_PASS") orelse "benchmarkdbpass", + .hostname = std.os.getenv("PG_HOST") orelse "localhost", // , + .port = try std.fmt.parseInt(u16, std.os.getenv("PG_PORT") orelse "5432", 0), + .database = std.os.getenv("PG_DB") orelse "hello_world", + }; +} diff --git a/frameworks/Zig/zap/zap.dockerfile b/frameworks/Zig/zap/zap.dockerfile new file mode 100644 index 00000000000..580f037bcef --- /dev/null +++ b/frameworks/Zig/zap/zap.dockerfile @@ -0,0 +1,42 @@ +#FROM ziglang/static-base:llvm15-aarch64-3 as build +FROM buddyspencer/ziglang:0.11.0-r3 as build + +WORKDIR /zap + +COPY src src + +COPY build.zig.zon build.zig.zon +COPY build.zig build.zig + +RUN apk update +RUN apk add yaml-dev sqlite-dev +RUN apk add bind-tools +RUN apk add --no-cache bash +RUN dig +short localhost | head -n 1 +RUN zig build -Doptimize=ReleaseFast --prefix-exe-dir /usr/bin +RUN zig version +RUN ls + +EXPOSE 3000 + +CMD ["sh", "run.sh"] + +FROM alpine:3.19 + +WORKDIR /zap + +ENV PG_USER=benchmarkdbuser +ENV PG_PASS=benchmarkdbpass +ENV PG_DB=hello_world +ENV PG_HOST=tfb-database +ENV PG_PORT=5432 + +COPY run.sh run.sh + +RUN apk update + +COPY --from=build /usr/bin/zap /usr/bin/zap + +EXPOSE 3000 + +CMD ["sh", "run.sh"] \ No newline at end of file diff --git a/toolset/databases/mongodb/mongodb.dockerfile b/toolset/databases/mongodb/mongodb.dockerfile index 1dc7f21cca7..4fe163b8070 100644 --- a/toolset/databases/mongodb/mongodb.dockerfile +++ b/toolset/databases/mongodb/mongodb.dockerfile @@ -1,4 +1,4 @@ -FROM mongo:6.0 +FROM mongo:7.0 ENV MONGO_INITDB_DATABASE=hello_world diff --git a/toolset/databases/mysql/mysql.dockerfile b/toolset/databases/mysql/mysql.dockerfile index 01a58b4234c..196085811a1 100644 --- a/toolset/databases/mysql/mysql.dockerfile +++ b/toolset/databases/mysql/mysql.dockerfile @@ -1,4 +1,4 @@ -FROM mysql:8.0 +FROM mysql:8.3 ENV MYSQL_ROOT_PASSWORD=root ENV MYSQL_USER=benchmarkdbuser diff --git a/toolset/databases/postgres/config.sh b/toolset/databases/postgres/config.sh old mode 100644 new mode 100755 index ba42d10eec9..ea3d95e4b7c --- a/toolset/databases/postgres/config.sh +++ b/toolset/databases/postgres/config.sh @@ -1 +1,5 @@ -cat /tmp/postgresql.conf >> $PGDATA/postgresql.conf +#!/bin/bash + +set -e + +cat /tmp/postgresql.conf >> "${PGDATA}/postgresql.conf" diff --git a/toolset/databases/postgres/create-postgres-database.sql b/toolset/databases/postgres/create-postgres-database.sql deleted file mode 100644 index 9a8a08ec2ab..00000000000 --- a/toolset/databases/postgres/create-postgres-database.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass'; - -ALTER USER benchmarkdbuser WITH SUPERUSER; - -CREATE DATABASE hello_world WITH TEMPLATE = template0 ENCODING 'UTF8'; diff --git a/toolset/databases/postgres/pg_hba.conf b/toolset/databases/postgres/pg_hba.conf deleted file mode 100644 index ac4b3621dc2..00000000000 --- a/toolset/databases/postgres/pg_hba.conf +++ /dev/null @@ -1,100 +0,0 @@ -# PostgreSQL Client Authentication Configuration File -# =================================================== -# -# Refer to the "Client Authentication" section in the PostgreSQL -# documentation for a complete description of this file. A short -# synopsis follows. -# -# This file controls: which hosts are allowed to connect, how clients -# are authenticated, which PostgreSQL user names they can use, which -# databases they can access. Records take one of these forms: -# -# local DATABASE USER METHOD [OPTIONS] -# host DATABASE USER ADDRESS METHOD [OPTIONS] -# hostssl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] -# -# (The uppercase items must be replaced by actual values.) -# -# The first field is the connection type: "local" is a Unix-domain -# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, -# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a -# plain TCP/IP socket. -# -# DATABASE can be "all", "sameuser", "samerole", "replication", a -# database name, or a comma-separated list thereof. The "all" -# keyword does not match "replication". Access to replication -# must be enabled in a separate record (see example below). -# -# USER can be "all", a user name, a group name prefixed with "+", or a -# comma-separated list thereof. In both the DATABASE and USER fields -# you can also write a file name prefixed with "@" to include names -# from a separate file. -# -# ADDRESS specifies the set of hosts the record matches. It can be a -# host name, or it is made up of an IP address and a CIDR mask that is -# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that -# specifies the number of significant bits in the mask. A host name -# that starts with a dot (.) matches a suffix of the actual host name. -# Alternatively, you can write an IP address and netmask in separate -# columns to specify the set of hosts. Instead of a CIDR-address, you -# can write "samehost" to match any of the server's own IP addresses, -# or "samenet" to match any address in any subnet that the server is -# directly connected to. -# -# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", -# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert". Note that -# "password" sends passwords in clear text; "md5" is preferred since -# it sends encrypted passwords. -# -# OPTIONS are a set of options for the authentication in the format -# NAME=VALUE. The available options depend on the different -# authentication methods -- refer to the "Client Authentication" -# section in the documentation for a list of which options are -# available for which authentication methods. -# -# Database and user names containing spaces, commas, quotes and other -# special characters must be quoted. Quoting one of the keywords -# "all", "sameuser", "samerole" or "replication" makes the name lose -# its special character, and just match a database or username with -# that name. -# -# This file is read on server startup and when the postmaster receives -# a SIGHUP signal. If you edit the file on a running system, you have -# to SIGHUP the postmaster for the changes to take effect. You can -# use "pg_ctl reload" to do that. - -# Put your actual configuration here -# ---------------------------------- -# -# If you want to allow non-local connections, you need to add more -# "host" records. In that case you will also need to make PostgreSQL -# listen on a non-local interface via the listen_addresses -# configuration parameter, or via the -i or -h command line switches. - - - - -# DO NOT DISABLE! -# If you change this first entry you will need to make sure that the -# database superuser can access the database using some other method. -# Noninteractive access to all databases is required during automatic -# maintenance (custom daily cronjobs, replication, and similar tasks). -# -# Database administrative login by Unix domain socket -local all postgres peer - -# TYPE DATABASE USER ADDRESS METHOD - -# "local" is for Unix domain socket connections only -local all all peer -# IPv4 local connections: -host all all 127.0.0.1/32 md5 -# IPv6 local connections: -host all all ::1/128 md5 -# Allow replication connections from localhost, by a user with the -# replication privilege. -#local replication postgres peer -#host replication postgres 127.0.0.1/32 md5 -#host replication postgres ::1/128 md5 -host all all 0.0.0.0/0 md5 diff --git a/toolset/databases/postgres/postgres.dockerfile b/toolset/databases/postgres/postgres.dockerfile index 836e4465e8b..4a23b39ee70 100644 --- a/toolset/databases/postgres/postgres.dockerfile +++ b/toolset/databases/postgres/postgres.dockerfile @@ -1,16 +1,14 @@ -FROM postgres:15-bullseye +FROM postgres:16-bookworm -ENV POSTGRES_USER=benchmarkdbuser -ENV POSTGRES_PASSWORD=benchmarkdbpass -ENV POSTGRES_DB=hello_world +ENV PGDATA=/ssd/postgresql \ + POSTGRES_DB=hello_world \ + POSTGRES_HOST_AUTH_METHOD=md5 \ + POSTGRES_INITDB_ARGS=--auth-host=md5 \ + POSTGRES_PASSWORD=benchmarkdbpass \ + POSTGRES_USER=benchmarkdbuser -ENV POSTGRES_HOST_AUTH_METHOD=md5 -ENV POSTGRES_INITDB_ARGS=--auth-host=md5 -ENV PGDATA=/ssd/postgresql +COPY postgresql.conf /tmp/ -COPY postgresql-min.conf /tmp/postgresql.conf - -COPY create-postgres.sql /docker-entrypoint-initdb.d/ -COPY config.sh /docker-entrypoint-initdb.d/ +COPY config.sh create-postgres.sql /docker-entrypoint-initdb.d/ COPY 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf diff --git a/toolset/databases/postgres/postgresql-min.conf b/toolset/databases/postgres/postgresql-min.conf deleted file mode 100644 index 1e91048d027..00000000000 --- a/toolset/databases/postgres/postgresql-min.conf +++ /dev/null @@ -1,143 +0,0 @@ -# See postgresql.conf.sample for a full conf file - -listen_addresses = '*' # what IP address(es) to listen on; -max_connections = 2000 # (change requires restart) - -ssl = false # (change requires restart) - -# - Memory - -# values from: http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-pgbench -# details: http://www.postgresql.org/docs/9.4/static/runtime-config-resource.html -# http://www.postgresql.org/docs/9.4/static/runtime-config-wal.html -# http://www.postgresql.org/docs/9.4/static/runtime-config-query.html -shared_buffers = 256MB # min 128kB -work_mem = 64MB # min 64kB -maintenance_work_mem = 512MB # min 1MB -# checkpoint_segments = 64 -checkpoint_completion_target = 0.9 -effective_cache_size = 8GB - -# when executed on the SSD (otherwise 4) -random_page_cost = 2 - -shared_preload_libraries = 'pg_stat_statements' # (change requires restart) -pg_stat_statements.track = all -pg_stat_statements.max = 500000 -track_activity_query_size = 2048 - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -wal_level = minimal # minimal, archive, or hot_standby - -# WARNING: disabling synchronous commit may be dangerous in certain cases. -# See http://www.postgresql.org/docs/current/static/runtime-config-wal.html -# for details. -synchronous_commit = off - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Master Server - - -# These settings are ignored on a standby server - -max_wal_senders = 0 # max number of walsender processes - # (change requires restart) - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -log_line_prefix = '%t ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = '(defaults to server environment setting)' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'en_US.UTF-8' # locale for system error message - # strings -#lc_monetary = 'en_US.UTF-8' # locale for monetary formatting -#lc_numeric = 'en_US.UTF-8' # locale for number formatting -#lc_time = 'en_US.UTF-8' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.english' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -max_pred_locks_per_transaction = 256 # min 10 - # (change requires restart) - diff --git a/toolset/databases/postgres/postgresql.conf b/toolset/databases/postgres/postgresql.conf index fd90cd2b15b..c241696206d 100644 --- a/toolset/databases/postgres/postgresql.conf +++ b/toolset/databases/postgres/postgresql.conf @@ -1,108 +1,10 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '/ssd/postgresql' # use data in another directory - # (change requires restart) -hba_file = '/etc/postgresql/PG_VERSION/main/pg_hba.conf' # host-based authentication file - # (change requires restart) -ident_file = '/etc/postgresql/PG_VERSION/main/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '/var/run/postgresql/PG_VERSION-main.pid' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - +# For a full conf file see: +# https://github.com/TechEmpower/FrameworkBenchmarks/blob/d8f043d183d1ccbba41157bd57314ef61059edb8/toolset/databases/postgres/postgresql.conf.sample listen_addresses = '*' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost', '*' = all - # (change requires restart) -port = 5432 # (change requires restart) max_connections = 2000 # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -#superuser_reserved_connections = 3 # (change requires restart) -unix_socket_directories = '/var/run/postgresql' # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - -#authentication_timeout = 1min # 1s-600s ssl = false # (change requires restart) -#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers - # (change requires restart) -#ssl_renegotiation_limit = 512MB # amount of data between renegotiations -password_encryption = md5 -#db_user_namespace = off - -# Kerberos and GSSAPI -#krb_server_keyfile = '' -#krb_srvname = 'postgres' # (Kerberos only) -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ # - Memory - # values from: http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-pgbench @@ -119,47 +21,11 @@ effective_cache_size = 8GB # when executed on the SSD (otherwise 4) random_page_cost = 2 -#shared_buffers = 32MB # min 128kB - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -#work_mem = 1MB # min 64kB -#maintenance_work_mem = 16MB # min 1MB -#max_stack_depth = 2MB # min 100kB - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) shared_preload_libraries = 'pg_stat_statements' # (change requires restart) pg_stat_statements.track = all pg_stat_statements.max = 500000 track_activity_query_size = 2048 -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0ms # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000. 0 disables prefetching - - #------------------------------------------------------------------------------ # WRITE AHEAD LOG #------------------------------------------------------------------------------ @@ -167,45 +33,12 @@ track_activity_query_size = 2048 # - Settings - wal_level = minimal # minimal, archive, or hot_standby - # (change requires restart) -#fsync = on # turns forced synchronization on or off # WARNING: disabling synchronous commit may be dangerous in certain cases. # See http://www.postgresql.org/docs/current/static/runtime-config-wal.html # for details. synchronous_commit = off -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - #------------------------------------------------------------------------------ # REPLICATION #------------------------------------------------------------------------------ @@ -216,185 +49,11 @@ synchronous_commit = off max_wal_senders = 0 # max number of walsender processes # (change requires restart) -#wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed -#replication_timeout = 60s # in milliseconds; 0 disables -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all - -# - Standby Servers - - -# These settings are ignored on a master server - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 128MB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - #------------------------------------------------------------------------------ # ERROR REPORTING AND LOGGING #------------------------------------------------------------------------------ -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -#silent_mode = off # Run server silently. - # DO NOT USE without syslog or - # logging_collector - # (change requires restart) - - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off log_line_prefix = '%t ' # special values: # %a = application name # %u = user name @@ -415,64 +74,6 @@ log_line_prefix = '%t ' # special values: # processes # %% = '%' # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = '(defaults to server environment setting)' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - #------------------------------------------------------------------------------ # CLIENT CONNECTION DEFAULTS @@ -498,7 +99,7 @@ log_line_prefix = '%t ' # special values: # - Locale and Formatting - -datestyle = 'iso, mdy' +#datestyle = 'iso, mdy' #intervalstyle = 'postgres' #timezone = '(defaults to server environment setting)' #timezone_abbreviations = 'Default' # Select the set of available time zone @@ -513,14 +114,14 @@ datestyle = 'iso, mdy' # encoding # These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.UTF-8' # locale for system error message +#lc_messages = 'en_US.UTF-8' # locale for system error message # strings -lc_monetary = 'en_US.UTF-8' # locale for monetary formatting -lc_numeric = 'en_US.UTF-8' # locale for number formatting -lc_time = 'en_US.UTF-8' # locale for time formatting +#lc_monetary = 'en_US.UTF-8' # locale for monetary formatting +#lc_numeric = 'en_US.UTF-8' # locale for number formatting +#lc_time = 'en_US.UTF-8' # locale for time formatting # default configuration for text search -default_text_search_config = 'pg_catalog.english' +#default_text_search_config = 'pg_catalog.english' # - Other Defaults - @@ -541,37 +142,3 @@ default_text_search_config = 'pg_catalog.english' max_pred_locks_per_transaction = 256 # min 10 # (change requires restart) -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -#custom_variable_classes = '' # list of custom variable class names diff --git a/toolset/databases/postgres/postgresql.conf.sample b/toolset/databases/postgres/postgresql.conf.sample deleted file mode 100644 index ed322b6f46c..00000000000 --- a/toolset/databases/postgres/postgresql.conf.sample +++ /dev/null @@ -1,813 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -#listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) -#reserved_connections = 0 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/tmp' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = scram-sha-256 # scram-sha-256 or md5 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' -#krb_caseins_users = off - -# - SSL - - -#ssl = off -#ssl_ca_file = '' -#ssl_cert_file = 'server.crt' -#ssl_crl_file = '' -#ssl_crl_dir = '' -#ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -#shared_buffers = 128MB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#huge_page_size = 0 # zero for system default - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -#work_mem = 4MB # min 64kB -#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -#maintenance_work_mem = 64MB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -#dynamic_shared_memory_type = posix # the default is usually the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) -#min_dynamic_shared_memory = 0MB # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 2 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 0 # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#backend_flush_after = 0 # measured in pages, 0 disables -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -#max_worker_processes = 8 # (change requires restart) -#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers -#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers -#max_parallel_workers = 8 # maximum number of max_worker_processes that - # can be used in parallel operations -#parallel_leader_participation = on -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) - - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_compression = off # enables compression of full-page writes; - # off, pglz, lz4, zstd, or on -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d -#checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 0 # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables -#max_wal_size = 1GB -#min_wal_size = 80MB - -# - Prefetching during recovery - - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_library = '' # library to use to archive a WAL file - # (empty string indicates archive_command should - # be used) -#archive_command = '' # command to use to archive a WAL file - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a WAL file switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived WAL file - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the primary and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Primary Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a primary server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from primary - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers -#max_parallel_apply_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_async_append = on -#enable_bitmapscan = on -#enable_gathermerge = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_incremental_sort = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_memoize = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_presorted_aggregate = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -#effective_cache_size = 4GB - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#jit = on # allow JIT compilation -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan -#recursive_worktable_factor = 10.0 # range 0.001-1000000 - - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, jsonlog, syslog, and - # eventlog, depending on platform. - # csvlog and jsonlog require - # logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr, jsonlog, - # and csvlog into log files. Required - # to be on for csvlogs and jsonlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (Windows): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - -#log_startup_progress_interval = 10s # Time between progress updates for - # long-running startup operations. - # 0 disables the feature, > 0 indicates - # the interval in milliseconds. - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_autovacuum_min_duration = 10min # log autovacuum activity; - # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#log_checkpoints = on -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '%m [%p] ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %P = process ID of parallel group leader - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %Q = query ID (0 if none or not computed) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_recovery_conflict_waits = off # log standby recovery conflict waits - # >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = 'GMT' - -# - Process Title - - -#cluster_name = '' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Cumulative Query and Index Statistics - - -#track_activities = on -#track_activity_query_size = 1024 # (change requires restart) -#track_counts = on -#track_io_timing = off -#track_wal_io_timing = off -#track_functions = none # none, pl, all -#stats_fetch_consistency = cache - - -# - Monitoring - - -#compute_query_id = auto -#log_statement_stats = off -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#search_path = '"$user", public' # schema names -#row_security = on -#default_table_access_method = 'heap' -#default_tablespace = '' # a tablespace name, '' uses the default -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_table_age = 150000000 -#vacuum_freeze_min_age = 50000000 -#vacuum_failsafe_age = 1600000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_failsafe_age = 1600000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_pending_list_limit = 4MB -#createrole_self_grant = '' # set and/or inherit - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = 'GMT' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'C' # locale for system error message - # strings -#lc_monetary = 'C' # locale for monetary formatting -#lc_numeric = 'C' # locale for number formatting -#lc_time = 'C' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.simple' - -# - Shared Library Preloading - - -#local_preload_libraries = '' -#session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#gin_fuzzy_search_limit = 0 - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -#include_dir = '...' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here \ No newline at end of file