diff --git a/frameworks/C++/paozhu/paozhu.dockerfile b/frameworks/C++/paozhu/paozhu.dockerfile index 8086f6eafe6..7381d0e9ac9 100644 --- a/frameworks/C++/paozhu/paozhu.dockerfile +++ b/frameworks/C++/paozhu/paozhu.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 RUN apt-get update -yqq && apt-get install -yqq apt-utils software-properties-common wget unzip cmake git RUN apt-get install -yqq gcc g++ openssl libssl-dev zlib1g-dev build-essential locales @@ -18,37 +18,95 @@ WORKDIR / # RUN wget https://github.com/hggq/paozhu/releases/download/v1.5.8/benchmark.zip RUN git clone https://github.com/hggq/paozhu # RUN unzip benchmark.zip -RUN rm -Rf ./paozhu/controller -RUN rm -Rf ./paozhu/libs -RUN mkdir ./paozhu/libs -RUN mkdir ./paozhu/libs/types +# RUN rm -Rf ./paozhu/controller +# RUN rm -Rf ./paozhu/libs +# RUN rm -Rf ./paozhu/view +# RUN rm -Rf ./paozhu/viewsrc +# RUN rm -Rf ./paozhu/orm +# RUN rm -Rf ./paozhu/models +# RUN rm -Rf ./paozhu/common -RUN mkdir ./paozhu/controller -RUN mkdir ./paozhu/controller/include -RUN mkdir ./paozhu/controller/src -COPY ./paozhu_benchmark/controller/include/techempower.h ./paozhu/controller/include/ -COPY ./paozhu_benchmark/controller/src/techempower.cpp ./paozhu/controller/src/ -COPY ./paozhu_benchmark/libs/types/techempower_json.h ./paozhu/libs/types/ -COPY ./paozhu_benchmark/libs/types/techempower_json_jsonreflect.cpp ./paozhu/libs/types/ +# COPY ./paozhu_benchmark/controller ./paozhu/ +# COPY ./paozhu_benchmark/libs ./paozhu/ +# COPY ./paozhu_benchmark/view ./paozhu/ +# COPY ./paozhu_benchmark/viewsrc ./paozhu/ -COPY ./paozhu_benchmark/common/autocontrolmethod.hpp ./paozhu/common/ -COPY ./paozhu_benchmark/common/reghttpmethod_pre.hpp ./paozhu/common/ -COPY ./paozhu_benchmark/common/reghttpmethod.hpp ./paozhu/common/ -COPY ./paozhu_benchmark/common/json_reflect_headers.h ./paozhu/common/ +# COPY ./paozhu_benchmark/orm ./paozhu/ +# COPY ./paozhu_benchmark/models ./paozhu/ +# COPY ./paozhu_benchmark/common ./paozhu/ + +# RUN ls -l ./paozhu +# RUN pwd +# RUN mkdir ./paozhu/common +# RUN mkdir ./paozhu/libs +# RUN mkdir ./paozhu/libs/types +# COPY ./paozhu_benchmark/libs/types/techempower_json.h ./paozhu/libs/types/ +# COPY ./paozhu_benchmark/libs/types/techempower_json_jsonreflect.cpp ./paozhu/libs/types/ + +# RUN mkdir ./paozhu/controller +# RUN mkdir ./paozhu/controller/include +# RUN mkdir ./paozhu/controller/src + +# COPY ./paozhu_benchmark/controller/include/techempower.h ./paozhu/controller/include/ +# COPY ./paozhu_benchmark/controller/src/techempower.cpp ./paozhu/controller/src/ + + +# COPY ./paozhu_benchmark/common/autocontrolmethod.hpp ./paozhu/common/ +# COPY ./paozhu_benchmark/common/reghttpmethod_pre.hpp ./paozhu/common/ +# COPY ./paozhu_benchmark/common/reghttpmethod.hpp ./paozhu/common/ +# COPY ./paozhu_benchmark/common/json_reflect_headers.h ./paozhu/common/ + +# COPY ./paozhu_benchmark/common/cost_define.h ./paozhu/common/ +# COPY ./paozhu_benchmark/common/autorestfulpaths.hpp ./paozhu/common/ +# COPY ./paozhu_benchmark/common/websockets_method_reg.hpp ./paozhu/common/ +# COPY ./paozhu_benchmark/common/httphook.cpp ./paozhu/common/ COPY ./paozhu_benchmark/conf/server.conf ./paozhu/conf/server.conf COPY ./paozhu_benchmark/conf/orm.conf ./paozhu/conf/orm.conf + +# must use testbenchmark.cpp to test benchmark COPY ./paozhu_benchmark/CMakeLists.txt ./paozhu/CMakeLists.txt +# RUN mkdir ./paozhu/view +# RUN mkdir ./paozhu/view/techempower + +# COPY ./paozhu_benchmark/view/techempower/fortunes.html ./paozhu/view/techempower/ + +# RUN mkdir ./paozhu/viewsrc +# RUN mkdir ./paozhu/viewsrc/include +# RUN mkdir ./paozhu/viewsrc/view +# RUN mkdir ./paozhu/viewsrc/view/techempower + +# COPY ./paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp ./paozhu/viewsrc/view/techempower/ +# COPY ./paozhu_benchmark/viewsrc/include/viewsrc.h ./paozhu/viewsrc/include/ +# COPY ./paozhu_benchmark/viewsrc/include/regviewmethod.hpp ./paozhu/viewsrc/include/ + + + +# RUN mkdir ./paozhu/orm +# RUN mkdir ./paozhu/orm/include + + +# COPY ./paozhu_benchmark/orm/orm.h ./paozhu/orm/ +# COPY ./paozhu_benchmark/orm/include/fortunebase.h ./paozhu/orm/include/ +# COPY ./paozhu_benchmark/orm/include/worldbase.h ./paozhu/orm/include/ + +# RUN mkdir ./paozhu/models +# RUN mkdir ./paozhu/models/include + +# COPY ./paozhu_benchmark/models/include/Fortune.h ./paozhu/models/include/ +# COPY ./paozhu_benchmark/models/include/World.h ./paozhu/models/include/ +# COPY ./paozhu_benchmark/models/World.cpp ./paozhu/models/ +# COPY ./paozhu_benchmark/models/Fortune.cpp ./paozhu/models/ + WORKDIR /paozhu RUN unzip asio.zip RUN cmake . -B build -DCMAKE_BUILD_TYPE=Release RUN cmake --build build - EXPOSE 8888 -CMD ./bin/paozhu +CMD ./bin/paozhu \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/CMakeLists.txt b/frameworks/C++/paozhu/paozhu_benchmark/CMakeLists.txt index b8bf972dbc2..611a71394bb 100755 --- a/frameworks/C++/paozhu/paozhu_benchmark/CMakeLists.txt +++ b/frameworks/C++/paozhu/paozhu_benchmark/CMakeLists.txt @@ -7,21 +7,27 @@ set(ENABLE_BOOST OFF CACHE BOOL "choose ON to enable") set(ENABLE_GD OFF CACHE BOOL "choose ON to enable") set(ENABLE_WIN_VCPKG OFF CACHE BOOL "choose ON to enable") -if (ENABLE_GD STREQUAL "ON") - list(FIND VCPKG_MANIFEST_FEATURES "gd" index) - if (index EQUAL -1) - message(STATUS "Auto append features: gd") - list(APPEND VCPKG_MANIFEST_FEATURES "gd") - endif () -endif () +if(ENABLE_VCPKG) + set(vcpkg_root $ENV{VCPKG_ROOT}) + if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND vcpkg_root) + set(CMAKE_TOOLCHAIN_FILE "${vcpkg_root}/scripts/buildsystems/vcpkg.cmake") + endif() +endif() -if (ENABLE_BOOST STREQUAL "ON") - list(FIND VCPKG_MANIFEST_FEATURES "boost" index) - if (index EQUAL -1) - message(STATUS "Auto append features: boost") - list(APPEND VCPKG_MANIFEST_FEATURES "boost") - endif () -endif () +macro(auto_enable_vcpkg_feature opt feature) + if(${opt}) + list(FIND VCPKG_MANIFEST_FEATURES ${feature} index) + if(index EQUAL -1) + message(STATUS "Auto append features: ${feature}") + list(APPEND VCPKG_MANIFEST_FEATURES ${feature}) + endif() + endif() +endmacro() + +if(ENABLE_VCPKG) + auto_enable_vcpkg_feature(ENABLE_GD "gd") + auto_enable_vcpkg_feature(ENABLE_BOOST "boost") +endif() PROJECT(Paozhu_web_framework) set(CMAKE_CXX_STANDARD 20) @@ -59,7 +65,7 @@ endif () if(${mode} AND (CMAKE_BUILD_TYPE STREQUAL "Debug")) if(CMAKE_SYSTEM_NAME MATCHES "Windows") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE -DDEBUG ${BOOST_OPEN} ${GD_OPEN}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE -DBENCHMARK -DDEBUG ${BOOST_OPEN} ${GD_OPEN}") if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") @@ -67,20 +73,20 @@ if(${mode} AND (CMAKE_BUILD_TYPE STREQUAL "Debug")) endif () else() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread -g -fsanitize=address -DASIO_STANDALONE -DDEBUG ${BOOST_OPEN} ${GD_OPEN} -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread -g -fsanitize=address -DASIO_STANDALONE -DBENCHMARK -DDEBUG ${BOOST_OPEN} ${GD_OPEN} -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) endif () message("Debug mode:${CMAKE_CXX_FLAGS_DEBUG}") elseif(${mode} AND (CMAKE_BUILD_TYPE STREQUAL "Release")) if (CMAKE_SYSTEM_NAME MATCHES "Windows") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE ${BOOST_OPEN} ${GD_OPEN} -O3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASIO_STANDALONE ${BOOST_OPEN} ${GD_OPEN} -DBENCHMARK -O3") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread") endif () else () set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wextra -O3") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -DASIO_STANDALONE ${BOOST_OPEN} ${GD_OPEN} -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -DASIO_STANDALONE ${BOOST_OPEN} ${GD_OPEN} -DBENCHMARK -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) file(MAKE_DIRECTORY /usr/local/etc/paozhu) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/conf/ DESTINATION /usr/local/etc/paozhu/) endif () @@ -89,7 +95,7 @@ elseif(${mode} AND (CMAKE_BUILD_TYPE STREQUAL "Release")) else() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra") message("Debug mode:${CMAKE_CXX_FLAGS_DEBUG}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread -g -fsanitize=address -DASIO_STANDALONE -DDEBUG ${BOOST_OPEN} ${GD_OPEN} -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread -g -fsanitize=address -DASIO_STANDALONE -DBENCHMARK -DDEBUG ${BOOST_OPEN} ${GD_OPEN} -I/usr/local/include -I/usr/local/mysql/include -I/usr/include -I/usr/include/mysql " ) if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") @@ -117,13 +123,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/viewsrc/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/websockets/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty) - file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty) -endif () -#EXECUTE_PROCESS(COMMAND rm ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty) +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_pre) + file(REMOVE_RECURSE ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_pre) +endif() set(PAOZHU_PRE paozhu_pre) add_executable(${PAOZHU_PRE} ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/autopickmethod.cpp ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpserver/src/md5.cpp) -add_executable(paozhu_empty ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/autoemptymethod.cpp) @@ -138,6 +142,22 @@ file(GLOB_RECURSE src_list ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) foreach(cppfile IN LISTS controller_list) string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/controller/src/" "" cppfilename ${cppfile}) + string(FIND ${cppfilename} "/" strpos) + if(${strpos} GREATER_EQUAL "0" ) + string(REGEX MATCHALL "([A-Za-z0-9._-]+)/" npaths ${cppfilename} ) + set(fullpaths "") + string(APPEND fullpaths "${CMAKE_CURRENT_SOURCE_DIR}/controller/include/") + foreach(onepathname ${npaths}) + string(REPLACE "/" "" toucpath ${onepathname}) + string(APPEND fullpaths ${toucpath}) + if (IS_DIRECTORY "${fullpaths}") + else() + message("mkdir ${fullpaths}") + file(MAKE_DIRECTORY "${fullpaths}") + endif() + string(APPEND fullpaths "/") + endforeach() + endif() string(REGEX REPLACE ".cpp" "" cppbasename ${cppfilename}) # message(${cppbasename}) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/controller/include/${cppbasename}.h") @@ -169,6 +189,7 @@ include_sub_directories_recursively(${CMAKE_CURRENT_SOURCE_DIR}/models) include_sub_directories_recursively(${CMAKE_CURRENT_SOURCE_DIR}/controller/include) include_sub_directories_recursively(${CMAKE_CURRENT_SOURCE_DIR}/libs) include_sub_directories_recursively(${CMAKE_CURRENT_SOURCE_DIR}/include) +include_sub_directories_recursively(${CMAKE_CURRENT_SOURCE_DIR}/common) add_executable(paozhu_cli ${CMAKE_CURRENT_SOURCE_DIR}/vendor/httpcli/http_cli.cpp) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) @@ -181,15 +202,12 @@ else() endif() if (ENABLE_WIN_VCPKG STREQUAL "ON") -else () +else() add_custom_command( - TARGET paozhu_empty paozhu - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_pre - PRE_BUILD + TARGET paozhu_pre POST_BUILD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ COMMAND echo "-- controls method --" COMMAND ${PAOZHU_PRE} ${CMAKE_CURRENT_SOURCE_DIR}/ - COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/bin/paozhu_empty ) endif() @@ -265,7 +283,7 @@ else () if(USE_STANDALONE_ASIO) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -set(ASIO_PATH "/usr/local/opt/asio/include" "/usr/local/include") +set(ASIO_PATH "/usr/local/opt/asio/include" "/usr/local/include" "/opt/homebrew/opt/asio" ${CMAKE_CURRENT_SOURCE_DIR}/asio) else() set(ASIO_PATH ${CMAKE_CURRENT_SOURCE_DIR}/asio "/usr/include") endif() @@ -324,19 +342,54 @@ if(ZLIB_FOUND) target_link_libraries(paozhu z) endif() -find_path(MYSQL_ROOT_DIR mysql) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + if (IS_DIRECTORY "/usr/local/mysql/include") + MESSAGE( STATUS "/usr/local/mysql") + set(MYSQL_INCLUDE_DIR "/usr/local/mysql/include") + include_sub_directories_recursively(/usr/local/mysql/include) + endif() + + if (IS_DIRECTORY "/usr/local/opt/mysql-client") + MESSAGE( STATUS "/usr/local/opt/mysql-client") + set(MYSQL_INCLUDE_DIR "/usr/local/opt/mysql-client/include") + include_sub_directories_recursively(/usr/local/opt/mysql-client/include) + endif() + + if (IS_DIRECTORY "/opt/homebrew/opt/mysql") + MESSAGE( STATUS "/opt/homebrew/opt/mysql") + set(MYSQL_INCLUDE_DIR "/opt/homebrew/opt/mysql/include") + include_sub_directories_recursively(/opt/homebrew/opt/mysql/include) + endif() + + + if (IS_DIRECTORY "/opt/homebrew/opt/mysql-client") + MESSAGE( STATUS "/opt/homebrew/opt/mysql-client") + set(MYSQL_INCLUDE_DIR "/opt/homebrew/opt/mysql-client/include") + include_sub_directories_recursively(/opt/homebrew/opt/mysql-client/include) + endif() + MESSAGE( STATUS "MYSQL_ROOT_DIR = ${MYSQL_ROOT_DIR} ") +else() + find_path(MYSQL_ROOT_DIR mysql) +endif() + + +FIND_PATH(MYSQL_INCLUDE_DIR NAMES mysql.h + PATHS /usr/local/include/mysql /usr/include/mysql /opt/homebrew/opt/mysql/include /usr/local/opt/mysql-client/include /opt/homebrew/opt/mysql-client/include +) + MESSAGE( STATUS "MYSQL_ROOT_DIR = ${MYSQL_ROOT_DIR} ") find_package_handle_standard_args(mysql REQUIRED_VARS MYSQL_ROOT_DIR) -FIND_PATH(MYSQL_INCLUDE_DIR mysql.h - /usr/local/include/mysql - /usr/include/mysql - /usr/local/mysql/include -) + +if(NOT MYSQL_INCLUDE_DIR) + message(STATUS "Could not find \"mysql.h\" from searching ") +endif() + SET(MYSQL_NAMES mysqlclient) FIND_LIBRARY(MYSQL_LIBRARY NAMES ${MYSQL_NAMES} - PATHS /usr/lib /usr/local/lib /usr/local/mysql/lib + PATHS /usr/lib /usr/local/lib /usr/local/mysql/lib /usr/local/opt/mysql/lib /opt/homebrew/opt/mysql/lib /opt/homebrew/opt/mysql-client/lib PATH_SUFFIXES mysql ) @@ -371,7 +424,17 @@ if(ENABLE_GD STREQUAL "ON") message("---ENABLE_GD-----") if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(GD_ROOT_DIR "/usr/local/opt/gd/lib") + + if (IS_DIRECTORY "/usr/local/opt/gd/lib") + MESSAGE( STATUS "/usr/local/opt/gd/lib") + set(GD_ROOT_DIR "/usr/local/opt/gd/lib") + include_sub_directories_recursively(/usr/local/opt/gd/include) + endif() + if (IS_DIRECTORY "/opt/homebrew/opt/gd/lib") + MESSAGE( STATUS "/opt/homebrew/opt/gd/lib") + set(GD_ROOT_DIR "/opt/homebrew/opt/gd/lib") + include_sub_directories_recursively(/opt/homebrew/opt/gd/include) + endif() else() set(GD_ROOT_DIR "${sys_so_path}") endif() @@ -393,7 +456,18 @@ endif() message(STATUS "GD Graphics Library at: ${GD_LIB_DIR}") if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -set(QR_ROOT_DIR "/usr/local/opt/qrencode/lib") + + if (IS_DIRECTORY "/usr/local/opt/qrencode/lib") + MESSAGE( STATUS "/usr/local/opt/qrencode/lib") + set(QR_ROOT_DIR "/usr/local/opt/qrencode/lib") + include_sub_directories_recursively(/usr/local/opt/qrencode/include) + endif() + if (IS_DIRECTORY "/opt/homebrew/opt/qrencode/lib") + MESSAGE( STATUS "/opt/homebrew/opt/qrencode/lib") + set(QR_ROOT_DIR "/opt/homebrew/opt/qrencode/lib") + include_sub_directories_recursively(/opt/homebrew/opt/qrencode/include) + endif() + else() set(QR_ROOT_DIR "${sys_so_path}") endif() @@ -422,7 +496,18 @@ target_link_libraries(paozhu ${GD_LIB_DIR}) target_link_libraries(paozhu ${QR_LIB_DIR}) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -set(PNG_ROOT_DIR "/usr/local/opt/libpng/lib") + + if (IS_DIRECTORY "/usr/local/opt/libpng/lib") + MESSAGE( STATUS "/usr/local/opt/libpng/lib") + set(PNG_ROOT_DIR "/usr/local/opt/libpng/lib") + include_sub_directories_recursively(/usr/local/opt/libpng/include) + endif() + if (IS_DIRECTORY "/opt/homebrew/opt/libpng/lib") + MESSAGE( STATUS "/opt/homebrew/opt/libpng/lib") + set(PNG_ROOT_DIR "/opt/homebrew/opt/libpng/lib") + include_sub_directories_recursively(/opt/homebrew/opt/libpng/include) + endif() + else() set(PNG_ROOT_DIR "${sys_so_path}") endif() @@ -435,7 +520,18 @@ find_library(PNG_LIB_DIR target_link_libraries(paozhu ${PNG_LIB_DIR}) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(FREETYPE_ROOT_DIR "/usr/local/opt/freetype/lib") + + if (IS_DIRECTORY "/usr/local/opt/freetype/lib") + MESSAGE( STATUS "/usr/local/opt/freetype/lib") + set(FREETYPE_ROOT_DIR "/usr/local/opt/freetype/lib") + include_sub_directories_recursively(/usr/local/opt/freetype/include) + endif() + if (IS_DIRECTORY "/opt/homebrew/opt/freetype/lib") + MESSAGE( STATUS "/opt/homebrew/opt/freetype/lib") + set(FREETYPE_ROOT_DIR "/opt/homebrew/opt/freetype/lib") + include_sub_directories_recursively(/opt/homebrew/opt/freetype/include) + endif() + else() set(FREETYPE_ROOT_DIR "${sys_so_path}") endif() @@ -450,7 +546,15 @@ target_link_libraries(paozhu ${FREETYPE_LIB_DIR}) endif() if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(BROTLI_ROOT_DIR "/usr/local/opt/brotli/lib") + if (IS_DIRECTORY "/usr/local/opt/brotli/lib") + set(BROTLI_ROOT_DIR "/usr/local/opt/brotli/lib") + INCLUDE_DIRECTORIES("/usr/local/opt/brotli/include") + endif() +# set(BROTLI_ROOT_DIR "/usr/local/opt/brotli/lib") + if (IS_DIRECTORY "/opt/homebrew/opt/brotli/lib") + set(BROTLI_ROOT_DIR "/opt/homebrew/opt/brotli/lib") + INCLUDE_DIRECTORIES("/opt/homebrew/opt/brotli/include") + endif() else() set(BROTLI_ROOT_DIR "${sys_so_path}") endif() @@ -505,4 +609,4 @@ endif () if (CMAKE_SYSTEM_NAME MATCHES "Windows") target_link_libraries(paozhu ws2_32) target_link_libraries(paozhu_cli ws2_32) -endif () \ No newline at end of file +endif () diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/autocontrolmethod.hpp b/frameworks/C++/paozhu/paozhu_benchmark/common/autocontrolmethod.hpp index faddf242daa..46d8979692a 100755 --- a/frameworks/C++/paozhu/paozhu_benchmark/common/autocontrolmethod.hpp +++ b/frameworks/C++/paozhu/paozhu_benchmark/common/autocontrolmethod.hpp @@ -44,6 +44,16 @@ namespace http } + + void _initauto_domain_httpmethodregto(std::map> &domain_methodcallback) + { + struct regmethold_t temp; + std::map methodcallback; + std::map>::iterator domain_iterator; + + + } + } #endif diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/autorestfulpaths.hpp b/frameworks/C++/paozhu/paozhu_benchmark/common/autorestfulpaths.hpp new file mode 100755 index 00000000000..dabbdbda827 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/common/autorestfulpaths.hpp @@ -0,0 +1,40 @@ + +#ifndef __HTTP_AUTO_REG_CONTROL_HTTPRESTFUL_HPP +#define __HTTP_AUTO_REG_CONTROL_HTTPRESTFUL_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include "httppeer.h" + + + +namespace http +{ + void _initauto_control_httprestful_paths(std::map> &restfulmethod) + { + + + if(restfulmethod.size()) + {} + + + } + + void _initauto_domain_httprestful_paths(std::map>> &restfulmethod) + { + std::map> temp_path; + std::map>>::iterator domain_iterator; + + domain_iterator=restfulmethod.begin(); + temp_path.clear(); + + + } + +} + +#endif + + \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/cost_define.h b/frameworks/C++/paozhu/paozhu_benchmark/common/cost_define.h new file mode 100755 index 00000000000..47fb182f0e0 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/common/cost_define.h @@ -0,0 +1,9 @@ +#pragma once +#ifndef _CONST_DEFINE_FUNC_H +#define _CONST_DEFINE_FUNC_H + +#define CONST_MONEY_PART 1000000 +#define CONST_HTTP_HEADER_BODY_SIZE 16384 +#define CONST_PHP_BODY_POST_SIZE 16777216 + +#endif \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/httphook.cpp b/frameworks/C++/paozhu/paozhu_benchmark/common/httphook.cpp new file mode 100755 index 00000000000..3440c23f84b --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/common/httphook.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "httppeer.h" +namespace http +{ +std::map _block_ip_tables; +std::map _block_host_tables; +bool check_blockip(const std::string &client_ip) +{ + if (client_ip.size() > 0) + { + return false; + } + return false; +} +bool hook_host_http1(std::shared_ptr peer) +{ + if (peer->host.size() > 0) + { + return false; + } + return false; +} +bool hook_host_http2(std::shared_ptr peer) +{ + if (peer->host.size() > 0) + { + return false; + } + return false; +} +}// namespace http diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/json_reflect_headers.h b/frameworks/C++/paozhu/paozhu_benchmark/common/json_reflect_headers.h old mode 100644 new mode 100755 diff --git a/frameworks/C++/paozhu/paozhu_benchmark/common/websockets_method_reg.hpp b/frameworks/C++/paozhu/paozhu_benchmark/common/websockets_method_reg.hpp new file mode 100755 index 00000000000..b8e9c718ea9 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/common/websockets_method_reg.hpp @@ -0,0 +1,19 @@ +#pragma once +#include +#include "httppeer.h" +#include "websockets.h" +#include "mywebsockets.hpp" +#include "websockets_callback.h" +namespace http +{ +void _initwebsocketmethodregto(WEBSOCKET_REG &methodcallback) +{ + + methodcallback.emplace("wstest", [](std::weak_ptr p) -> std::shared_ptr + { return http::mywebsockets::create(p); }); + // methodcallback.emplace("looptest",[](std::weak_ptr p)->std::shared_ptr{ + // return http::loopwebsockets::create(p); + // }); +} + +}// namespace http \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/conf/server.conf b/frameworks/C++/paozhu/paozhu_benchmark/conf/server.conf index e76a18093e9..9013265e678 100755 --- a/frameworks/C++/paozhu/paozhu_benchmark/conf/server.conf +++ b/frameworks/C++/paozhu/paozhu_benchmark/conf/server.conf @@ -3,7 +3,7 @@ threadmax=1024 threadmin=5 httpport=8888 httpsport=4430 -cothreadnum=8 ;Coroutines run on thread num +cothreadnum=16 ;Coroutines run on thread num http2_enable=0 debug_enable=1 @@ -13,6 +13,9 @@ certificate_chain_file=localhost.pem private_key_file=localhost.key tmp_dh_file=dh4096.pem reboot_password=e10adc3949ba59abbe56e057f20f883e ;md5(md5("123456")+"rand_char"+md5("123456")) +reboot_cron =w1h5 ;MDSW+Hhours reboot process M month D day S season (1 4 7 10) W week +clean_cron =m5t600 ;5-minute interval clean 600 seconds ago inactive connection +links_restart_process =n9998877ts1te5 ;More than 15000 connections, restart the process from 1:00 am to 5:00 am session_type=1 ;session save type 0.file 1.memory 2.redis 3.memcache 4.reserve static_file_compress_cache=1 ;1 enable, Cache static file compress(gzip,br) content to cache directory modelspath=/root/benchmark/models @@ -39,4 +42,7 @@ method_after= show_visitinfo=0 upload_max_size=16777216 - +siteid=0 +groupid=0 +alias_domain= +init_func= \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/models/Fortune.cpp b/frameworks/C++/paozhu/paozhu_benchmark/models/Fortune.cpp new file mode 100755 index 00000000000..160924992af --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/models/Fortune.cpp @@ -0,0 +1,16 @@ +#include "mysqlmodel.hpp" +#include "fortunebase.h" +#include "Fortune.h" + +/* 如果此文件存在不会自动覆盖,没有则会自动生成。 +*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */ + + + namespace orm{ + + + Fortune::Fortune(std::string dbtag):mysqlclientDB(dbtag){} + Fortune::Fortune():mysqlclientDB(){} + + + } diff --git a/frameworks/C++/paozhu/paozhu_benchmark/models/World.cpp b/frameworks/C++/paozhu/paozhu_benchmark/models/World.cpp new file mode 100755 index 00000000000..aa18f46cab6 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/models/World.cpp @@ -0,0 +1,16 @@ +#include "mysqlmodel.hpp" +#include "worldbase.h" +#include "World.h" + +/* 如果此文件存在不会自动覆盖,没有则会自动生成。 +*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */ + + + namespace orm{ + + + World::World(std::string dbtag):mysqlclientDB(dbtag){} + World::World():mysqlclientDB(){} + + + } diff --git a/frameworks/C++/paozhu/paozhu_benchmark/models/include/Fortune.h b/frameworks/C++/paozhu/paozhu_benchmark/models/include/Fortune.h new file mode 100755 index 00000000000..27865161b32 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/models/include/Fortune.h @@ -0,0 +1,16 @@ +#ifndef ORM_DEFAULT_FORTUNE_H +#define ORM_DEFAULT_FORTUNE_H +#include "mysqlmodel.hpp" +#include "fortunebase.h" + +/* 如果此文件存在不会自动覆盖,没有则会自动生成。 +*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */ + + namespace orm { + class Fortune : public mysqlclientDB{ + public: + Fortune(std::string dbtag); + Fortune(); + }; +}; +#endif diff --git a/frameworks/C++/paozhu/paozhu_benchmark/models/include/World.h b/frameworks/C++/paozhu/paozhu_benchmark/models/include/World.h new file mode 100755 index 00000000000..ba44dee7888 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/models/include/World.h @@ -0,0 +1,16 @@ +#ifndef ORM_DEFAULT_WORLD_H +#define ORM_DEFAULT_WORLD_H +#include "mysqlmodel.hpp" +#include "worldbase.h" + +/* 如果此文件存在不会自动覆盖,没有则会自动生成。 +*If this file exists, it will not be overwritten automatically. If not, it will be generated automatically. */ + + namespace orm { + class World : public mysqlclientDB{ + public: + World(std::string dbtag); + World(); + }; +}; +#endif diff --git a/frameworks/C++/paozhu/paozhu_benchmark/orm/include/fortunebase.h b/frameworks/C++/paozhu/paozhu_benchmark/orm/include/fortunebase.h new file mode 100755 index 00000000000..8a09ecc4564 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/orm/include/fortunebase.h @@ -0,0 +1,2687 @@ +#ifndef ORM_DEFAULT_FORTUNEBASEMATA_H +#define ORM_DEFAULT_FORTUNEBASEMATA_H +/* +*This file is auto create from cli +*本文件为自动生成 Fri, 26 Jan 2024 02:59:30 GMT +***/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mysql.h" +namespace orm { + + +struct fortunebase +{ + struct meta{ + unsigned int id= 0; // + std::string message=""; // + } data; + std::vector record; +std::string _rmstag="default";//this value must be default or tag value, tag in mysqlconnect config file . +std::vector _keypos{0x00}; +MYSQL_ROW _row; +std::vector::iterator begin(){ return record.begin(); } +std::vector::iterator end(){ return record.end(); } +std::vector::const_iterator begin() const{ return record.begin(); } +std::vector::const_iterator end() const{ return record.end(); } +const std::array colnames={"id","message"}; +const std::array colnamestype= {3,253}; +std::string tablename="fortune"; +std::string modelname="Fortune"; + + unsigned char findcolpos(const std::string &coln){ + if(coln.size()==0) + { + return 255; + } + unsigned char bi=coln[0]; + + + if(bi<91&&bi>64){ + bi+=32; + } + switch(coln[0]){ + + + case 'i': + return 0; +break; +case 'm': + return 1; +break; + + } + return 255; + } + + int size(){ return record.size(); } + + std::string getPKname(){ + return "id"; +} + + void record_reset() + { + record.clear(); + } + void data_reset(){ + fortunebase::meta metatemp; + data = metatemp; + } + + std::string soft_remove_sql([[maybe_unused]] const std::string &fieldsql){ + std::string temp; + + return temp; + } + void _setColnamevalue() + { + for(unsigned char i=0;i<_keypos.size();i++) + { + switch(_keypos[i]){ + case 0: + try{ + data.id=std::stoul(_row[i]); + }catch (...) { + data.id=0; + } + break; + case 1: + try{ + data.message.append((_row[i]==NULL?"":_row[i])); + }catch (...) { + data.message.clear(); + } + break; + default: + { } + + + } + + if(i>210){ + break; + } + } + } + void _addnewrowvalue(){ + fortunebase::meta metatemp; + + for(unsigned char i=0;i<_keypos.size();i++){ + + switch(_keypos[i]){ + + case 0: + try{ + metatemp.id=std::stoul(_row[i]); + }catch (...) { + metatemp.id=0; + } + break; + case 1: + try{ + metatemp.message.append((_row[i]==NULL?"":_row[i])); + }catch (...) { + metatemp.message.clear(); + } + break; + default: + { } + + + } + if(i>210){ + break; + } + } + record.emplace_back(std::move(metatemp)); + } + + inline std::string stringaddslash(std::string &content){ + std::string temp; + for(unsigned int i=0;i0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES ("; + + if(data.id==0){ +tempsql<<"null"; + }else{ + tempsql<0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES ("; + + if(insert_data.id==0){ +tempsql<<"null"; + }else{ + tempsql< &insert_data){ + unsigned int j=0; + std::ostringstream tempsql; + tempsql<<"INSERT INTO "; + tempsql<0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES "; + + for(unsigned int i=0;i0) + { + tempsql<<","; + } + tempsql<<"("; + + + if(insert_data[i].id==0){ + tempsql<<"null"; + }else{ + tempsql< keypos; + for(;jj0){ + unsigned char bpos_i=findcolpos(keyname); + #ifdef DEBUG + if (bpos_i == 254) + { + std::cout << "\033[1m\033[31m-----------\n" + << keyname << " not in " << tablename << " table Field.\n-----------\033[0m" + << std::endl; + } +#endif + keypos.emplace_back(bpos_i); + keyname.clear(); + } + for(jj=0;jj0){ tempsql<<","; } +if(data.id==0){ + tempsql<<"`id`=0"; + }else{ + tempsql<<"`id`="<0){ tempsql<<","; } +tempsql<<"`message`='"< 0) + { + tempsql << "`,`"; + } + else + { + tempsql << "`"; + } + tempsql << colnames[j]; + } + if (j > 0) + { + tempsql << "`"; + } + tempsql << ") VALUES "; + + for (unsigned int i = 0; i < record.size(); i++) + { + if (i > 0) + { + tempsql << ",\n"; + } + tempsql << "("; + if(record[i].id==0){ + tempsql<<"null"; + }else{ + tempsql< 0) + { + tempsql << "`,`"; + } + else + { + tempsql << "`"; + } + tempsql << colnames[j]; + } + if (j > 0) + { + tempsql << "`"; + } + tempsql << ") VALUES "; + + for (unsigned int i = 0; i < record.size(); i++) + { + if (i > 0) + { + tempsql << ",\n"; + } + tempsql << "("; + if(record[i].id==0){ + tempsql<<"null"; + }else{ + tempsql<0){ + for(;jj0) + { + tempsql<<","; + } + tempsql<0){ + if(findcolpos(keyname)<255) + { + if(j>0) + { + tempsql<<","; + } + tempsql< data_toarray(std::string fileld=""){ + std::vector temparray; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>1){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj data_tomap(std::string fileld=""){ + std::map tempsql; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>1){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ tempsql<<","; } +if(data.id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +tempsql<<"\"message\":\""< list_content; + for(;json_offset0) + { + data=metatemp; + } + if(json_offset>=json_content.size()) + { + break; + } + for(;json_offset=json_content.size()) + { + break; + } + json_value_name.clear(); + if(json_content[json_offset]==0x22) + { + + temp_offset=json_offset; + json_value_name=http::jsonstring_to_utf8(&json_content[json_offset],json_content.size()-json_offset,temp_offset); + json_offset=temp_offset; + if(json_content[json_offset]==0x22) + { + json_offset+=1; + } + } + else + { + if(json_content[json_offset]!='{'&&json_content[json_offset]!=']') + { + for(;json_offset1) + { + data=record[0]; + } + } + else + { + if(json_content[json_offset]=='{') + { + json_offset+=1; + std::string json_key_name,json_value_name; + + + for(;json_offset=json_content.size()) + { + break; + } + json_value_name.clear(); + if(json_content[json_offset]==0x22) + { + + temp_offset=json_offset; + json_value_name=http::jsonstring_to_utf8(&json_content[json_offset],json_content.size()-json_offset,temp_offset); + json_offset=temp_offset; + if(json_content[json_offset]==0x22) + { + json_offset+=1; + } + } + else + { + if(json_content[json_offset]!='{'&&json_content[json_offset]!=']') + { + for(;json_offset keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ + tempsql<<",{"; + }else{ + tempsql<<"{"; + } + + for(jj=0;jj0){ tempsql<<","; } +if(record[n].id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +tempsql<<"\"message\":\""< func,std::string fileld=""){ + std::ostringstream tempsql; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ + tempsql<<",{"; + }else{ + tempsql<<"{"; + } + tempsql<0){ tempsql<<","; } +if(record[n].id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +tempsql<<"\"message\":\""< getRecord(){ + return record; +} + + + template::value,bool>::type = true> + T& ref_meta([[maybe_unused]] std::string key_name) + { + if(key_name=="message") + { + return data.message; + } + return nullptr; + } + + + template,bool>::type = true> + T& ref_meta([[maybe_unused]] std::string key_name) + { + if(key_name=="id") + { + return data.id; + } + return nullptr; + } + + + template,bool>::type = true > + T& ref_meta([[maybe_unused]] std::string key_name) + { + return nullptr; + } + + template,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + case 0: + a.emplace_back(iter.id); + break; + + } + } + + return a; + } + + template,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + return a; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] std::string keyname) + { + + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + + case 0: + return data.id; + break; + } + return 0; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] fortunebase::meta & iter,[[maybe_unused]] std::string keyname) + { + + + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + case 0: + return iter.id; + break; + + } + + return 0; + } + + template,bool>::type = true > + T getVal(std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + + } + + + return 0.0; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] fortunebase::meta & iter,std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + + } + + + + return 0.0; + } + + template::value,bool>::type = true > + std::string getVal(std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + case 1: + return data.message; + break; + + } + return ""; + } + + template::value,bool>::type = true > + std::string getVal([[maybe_unused]] fortunebase::meta & iter,std::string keyname) + { + + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + case 1: + return iter.message; + break; + + } + + + + return ""; + } + + template::value,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + a.emplace_back(iter.message); + break; + } + } + + return a; + } + + std::string getstrCol(std::string keyname,[[maybe_unused]] bool isyinhao=false) + { + std::ostringstream a; + + unsigned char kpos; + kpos=findcolpos(keyname); + int j=0; + if(isyinhao&&record.size()>0) + { + a<<'"'; + } + for(auto &iter:record) + { + if(j>0) + { + if(isyinhao) + { + a<<"\",\""; + }else{ + a<<','; + } + } + switch(kpos) + { + + case 0: + a<0){ + a<<'"'; + } + + return a.str(); + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + std::string ktemp,vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ + case 1: + vtemp=iter.message; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + + return a; + } + + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + std::string ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + std::string vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + case 1: + vtemp=iter.message; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + std::string ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template,bool>::type = true > + std::map getmapRows([[maybe_unused]] std::string keyname) + { + std::map a; + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a.emplace(iter.id,iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true > + std::map getmapRows([[maybe_unused]] std::string keyname) + { + std::map a; + + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + a.emplace(iter.message,iter); + break; + + } + //a.emplace(ktemp,iter); + } + + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + std::string ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ + + } + + a.emplace_back(ktemp,vtemp); + } + + + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + + } + + a.emplace_back(ktemp,vtemp); + } + + + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + case 1: + vtemp=iter.message; + break; + + } + + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + + } + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + + } + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + switch(vpos){ +case 1: + vtemp=iter.message; + break; + + } + + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template,bool>::type = true > + std::vector> getvecRows([[maybe_unused]] std::string keyname) + { + std::vector> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a.emplace_back(iter.id,iter); + break; + + } + } + + return a; + } + template::value,bool>::type = true > + std::vector> getvecRows([[maybe_unused]] std::string keyname) + { + std::vector> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + a.emplace_back(iter.message,iter); + break; + + } + } + + + return a; + } + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + case 1: + a[ktemp][vtemp].emplace_back(iter.message); + break; + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + case 1: + a[ktemp][vtemp].emplace_back(iter.message); + break; + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + + } + } + + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + } + + switch(dpos){ + case 1: + a[ktemp][vtemp].emplace_back(iter.message); + break; + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + + } + } + + + return a; + } + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 1: + vtemp=iter.message; + break; + } + + switch(dpos){ + case 1: + a[ktemp][vtemp].emplace_back(iter.message); + break; + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 1: + a[ktemp].emplace_back(iter.message); + break; + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + + } + } + + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 0: + a[ktemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 1: + a[ktemp].emplace_back(iter.message); + break; + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 0: + a[ktemp].emplace_back(iter.id); + break; + + } + } + + return a; + } + + template,bool>::type = true> + std::map> getgroupRows([[maybe_unused]] std::string keyname) + { + std::map> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a[iter.id].emplace_back(iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true> + std::map> getgroupRows([[maybe_unused]] std::string keyname) + { + std::map> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + a[iter.message].emplace_back(iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 1: + a[ktemp][iter.message].emplace_back(iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 1: + ktemp=iter.message; + break; + } + + switch(vpos){ + case 0: + a[ktemp][iter.id].emplace_back(iter); + break; + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 0: + a[ktemp][iter.id].emplace_back(iter); + break; + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + } + + switch(vpos){ + case 1: + a[ktemp][iter.message].emplace_back(iter); + break; + + } + } + + return a; + } + + }; + + +} +#endif + \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/orm/include/worldbase.h b/frameworks/C++/paozhu/paozhu_benchmark/orm/include/worldbase.h new file mode 100755 index 00000000000..2bba08096e2 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/orm/include/worldbase.h @@ -0,0 +1,2509 @@ +#ifndef ORM_DEFAULT_WORLDBASEMATA_H +#define ORM_DEFAULT_WORLDBASEMATA_H +/* +*This file is auto create from cli +*本文件为自动生成 Fri, 26 Jan 2024 02:59:30 GMT +***/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "mysql.h" +namespace orm { + + +struct worldbase +{ + struct meta{ + unsigned int id= 0; // + int randomnumber= 0; // + } data; + std::vector record; +std::string _rmstag="default";//this value must be default or tag value, tag in mysqlconnect config file . +std::vector _keypos{0x00}; +MYSQL_ROW _row; +std::vector::iterator begin(){ return record.begin(); } +std::vector::iterator end(){ return record.end(); } +std::vector::const_iterator begin() const{ return record.begin(); } +std::vector::const_iterator end() const{ return record.end(); } +const std::array colnames={"id","randomnumber"}; +const std::array colnamestype= {3,3}; +std::string tablename="world"; +std::string modelname="World"; + + unsigned char findcolpos(const std::string &coln){ + if(coln.size()==0) + { + return 255; + } + unsigned char bi=coln[0]; + + + if(bi<91&&bi>64){ + bi+=32; + } + switch(coln[0]){ + + + case 'i': + return 0; +break; +case 'r': + return 1; +break; + + } + return 255; + } + + int size(){ return record.size(); } + + std::string getPKname(){ + return "id"; +} + + void record_reset() + { + record.clear(); + } + void data_reset(){ + worldbase::meta metatemp; + data = metatemp; + } + + std::string soft_remove_sql([[maybe_unused]] const std::string &fieldsql){ + std::string temp; + + return temp; + } + void _setColnamevalue() + { + for(unsigned char i=0;i<_keypos.size();i++) + { + switch(_keypos[i]){ + case 0: + try{ + data.id=std::stoul(_row[i]); + }catch (...) { + data.id=0; + } + break; + case 1: + try{ + data.randomnumber=std::stoi(_row[i]); + }catch (...) { + data.randomnumber=0; + } + break; + default: + { } + + + } + + if(i>210){ + break; + } + } + } + void _addnewrowvalue(){ + worldbase::meta metatemp; + + for(unsigned char i=0;i<_keypos.size();i++){ + + switch(_keypos[i]){ + + case 0: + try{ + metatemp.id=std::stoul(_row[i]); + }catch (...) { + metatemp.id=0; + } + break; + case 1: + try{ + metatemp.randomnumber=std::stoi(_row[i]); + }catch (...) { + metatemp.randomnumber=0; + } + break; + default: + { } + + + } + if(i>210){ + break; + } + } + record.emplace_back(std::move(metatemp)); + } + + inline std::string stringaddslash(std::string &content){ + std::string temp; + for(unsigned int i=0;i0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES ("; + + if(data.id==0){ +tempsql<<"null"; + }else{ + tempsql<0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES ("; + + if(insert_data.id==0){ +tempsql<<"null"; + }else{ + tempsql< &insert_data){ + unsigned int j=0; + std::ostringstream tempsql; + tempsql<<"INSERT INTO "; + tempsql<0){ + tempsql<<"`,`"; + }else{ + tempsql<<"`"; + } + tempsql<0){ + tempsql<<"`"; + } + tempsql<<") VALUES "; + + for(unsigned int i=0;i0) + { + tempsql<<","; + } + tempsql<<"("; + + + if(insert_data[i].id==0){ + tempsql<<"null"; + }else{ + tempsql<0){ + unsigned char bpos_i=findcolpos(keyname); + #ifdef DEBUG + if (bpos_i == 254) + { + std::cout << "\033[1m\033[31m-----------\n" + << keyname << " not in " << tablename << " table Field.\n-----------\033[0m" + << std::endl; + } +#endif + keypos.emplace_back(bpos_i); + keyname.clear(); + } + for(jj=0;jj0){ tempsql<<","; } +if(data.id==0){ + tempsql<<"`id`=0"; + }else{ + tempsql<<"`id`="<0){ tempsql<<","; } +if(data.randomnumber==0){ + tempsql<<"`randomnumber`=0"; + }else{ + tempsql<<"`randomnumber`="< 0) + { + tempsql << "`,`"; + } + else + { + tempsql << "`"; + } + tempsql << colnames[j]; + } + if (j > 0) + { + tempsql << "`"; + } + tempsql << ") VALUES "; + + for (unsigned int i = 0; i < record.size(); i++) + { + if (i > 0) + { + tempsql << ",\n"; + } + tempsql << "("; + if(record[i].id==0){ + tempsql<<"null"; + }else{ + tempsql< 0) + { + tempsql << "`,`"; + } + else + { + tempsql << "`"; + } + tempsql << colnames[j]; + } + if (j > 0) + { + tempsql << "`"; + } + tempsql << ") VALUES "; + + for (unsigned int i = 0; i < record.size(); i++) + { + if (i > 0) + { + tempsql << ",\n"; + } + tempsql << "("; + if(record[i].id==0){ + tempsql<<"null"; + }else{ + tempsql<0){ + for(;jj0) + { + tempsql<<","; + } + tempsql<0){ + if(findcolpos(keyname)<255) + { + if(j>0) + { + tempsql<<","; + } + tempsql< data_toarray(std::string fileld=""){ + std::vector temparray; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>1){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj data_tomap(std::string fileld=""){ + std::map tempsql; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>1){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ tempsql<<","; } +if(data.id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +if(data.randomnumber==0){ + tempsql<<"\"randomnumber\":0"; + }else{ + tempsql<<"\"randomnumber\":"< list_content; + for(;json_offset0) + { + data=metatemp; + } + if(json_offset>=json_content.size()) + { + break; + } + for(;json_offset=json_content.size()) + { + break; + } + json_value_name.clear(); + if(json_content[json_offset]==0x22) + { + + temp_offset=json_offset; + json_value_name=http::jsonstring_to_utf8(&json_content[json_offset],json_content.size()-json_offset,temp_offset); + json_offset=temp_offset; + if(json_content[json_offset]==0x22) + { + json_offset+=1; + } + } + else + { + if(json_content[json_offset]!='{'&&json_content[json_offset]!=']') + { + for(;json_offset1) + { + data=record[0]; + } + } + else + { + if(json_content[json_offset]=='{') + { + json_offset+=1; + std::string json_key_name,json_value_name; + + + for(;json_offset=json_content.size()) + { + break; + } + json_value_name.clear(); + if(json_content[json_offset]==0x22) + { + + temp_offset=json_offset; + json_value_name=http::jsonstring_to_utf8(&json_content[json_offset],json_content.size()-json_offset,temp_offset); + json_offset=temp_offset; + if(json_content[json_offset]==0x22) + { + json_offset+=1; + } + } + else + { + if(json_content[json_offset]!='{'&&json_content[json_offset]!=']') + { + for(;json_offset keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ + tempsql<<",{"; + }else{ + tempsql<<"{"; + } + + for(jj=0;jj0){ tempsql<<","; } +if(record[n].id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +if(record[n].randomnumber==0){ + tempsql<<"\"randomnumber\":0"; + }else{ + tempsql<<"\"randomnumber\":"< func,std::string fileld=""){ + std::ostringstream tempsql; + std::string keyname; + unsigned char jj=0; + std::vector keypos; + if(fileld.size()>0){ + for(;jj0){ + keypos.emplace_back(findcolpos(keyname)); + keyname.clear(); + } + }else{ + for(jj=0;jj0){ + tempsql<<",{"; + }else{ + tempsql<<"{"; + } + tempsql<0){ tempsql<<","; } +if(record[n].id==0){ + tempsql<<"\"id\":0"; + }else{ + tempsql<<"\"id\":"<0){ tempsql<<","; } +if(record[n].randomnumber==0){ + tempsql<<"\"randomnumber\":0"; + }else{ + tempsql<<"\"randomnumber\":"< getRecord(){ + return record; +} + + + template::value,bool>::type = true> + T& ref_meta([[maybe_unused]] std::string key_name) + { + return nullptr; + } + + + template,bool>::type = true> + T& ref_meta([[maybe_unused]] std::string key_name) + { + if(key_name=="id") + { + return data.id; + } + if(key_name=="randomnumber") + { + return data.randomnumber; + } + return nullptr; + } + + + template,bool>::type = true > + T& ref_meta([[maybe_unused]] std::string key_name) + { + return nullptr; + } + + template,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + case 0: + a.emplace_back(iter.id); + break; + case 1: + a.emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + return a; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] std::string keyname) + { + + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + + case 0: + return data.id; + break; + case 1: + return data.randomnumber; + break; + } + return 0; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] worldbase::meta & iter,[[maybe_unused]] std::string keyname) + { + + + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + case 0: + return iter.id; + break; + case 1: + return iter.randomnumber; + break; + + } + + return 0; + } + + template,bool>::type = true > + T getVal(std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + + } + + + return 0.0; + } + + template,bool>::type = true > + T getVal([[maybe_unused]] worldbase::meta & iter,std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + switch(kpos) + { + + } + + + + return 0.0; + } + + template::value,bool>::type = true > + std::string getVal(std::string keyname) + { + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + + } + return ""; + } + + template::value,bool>::type = true > + std::string getVal([[maybe_unused]] worldbase::meta & iter,std::string keyname) + { + + unsigned char kpos; + kpos=findcolpos(keyname); + + switch(kpos) + { + + + } + + + + return ""; + } + + template::value,bool>::type = true > + std::vector getCol([[maybe_unused]] std::string keyname) + { + std::vector a; + + + + return a; + } + + std::string getstrCol(std::string keyname,[[maybe_unused]] bool isyinhao=false) + { + std::ostringstream a; + + unsigned char kpos; + kpos=findcolpos(keyname); + int j=0; + if(isyinhao&&record.size()>0) + { + a<<'"'; + } + for(auto &iter:record) + { + if(j>0) + { + if(isyinhao) + { + a<<"\",\""; + }else{ + a<<','; + } + } + switch(kpos) + { + + case 0: + a<0){ + a<<'"'; + } + + return a.str(); + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + return a; + } + + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; +case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + std::string vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + std::string ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map getCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + + } + if(ktemp.size()>0) + { + a.emplace(ktemp,vtemp); + } + } + + return a; + } + + template,bool>::type = true > + std::map getmapRows([[maybe_unused]] std::string keyname) + { + std::map a; + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a.emplace(iter.id,iter); + break; + case 1: + a.emplace(iter.randomnumber,iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true > + std::map getmapRows([[maybe_unused]] std::string keyname) + { + std::map a; + + + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + + } + + a.emplace_back(ktemp,vtemp); + } + + + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + + } + + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + + switch(kpos) + { + + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + + } + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + + } + a.emplace_back(ktemp,vtemp); + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::vector> getvecCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::vector> a; + + return a; + } + + template,bool>::type = true > + std::vector> getvecRows([[maybe_unused]] std::string keyname) + { + std::vector> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a.emplace_back(iter.id,iter); + break; +case 1: + a.emplace_back(iter.randomnumber,iter); + break; + + } + } + + return a; + } + template::value,bool>::type = true > + std::vector> getvecRows([[maybe_unused]] std::string keyname) + { + std::vector> a; + + + return a; + } + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + case 1: + a[ktemp][vtemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + } + + switch(dpos){ + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + case 1: + a[ktemp][vtemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + template,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + } + + switch(dpos){ + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + for(auto &iter:record) + { + switch(kpos) + { + + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + + } + } + + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + //D vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + case 1: + a[ktemp][vtemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + } + + switch(vpos){ + case 0: + vtemp=iter.id; + break; + case 1: + vtemp=iter.randomnumber; + break; + } + + switch(dpos){ + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + return a; + } + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + unsigned char kpos,vpos,dpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + dpos=findcolpos(dataname); + T ktemp; + U vtemp; + // D dtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + } + + switch(vpos){ + } + + switch(dpos){ + case 0: + a[ktemp][vtemp].emplace_back(iter.id); + break; + case 1: + a[ktemp][vtemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname,[[maybe_unused]] std::string dataname) + { + std::map>> a; + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + + return a; + } + + template::value,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + } + + switch(vpos){ + case 0: + a[ktemp].emplace_back(iter.id); + break; + case 1: + a[ktemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map> getgroupCols([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + //U vtemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + case 0: + a[ktemp].emplace_back(iter.id); + break; + case 1: + a[ktemp].emplace_back(iter.randomnumber); + break; + + } + } + + return a; + } + + template,bool>::type = true> + std::map> getgroupRows([[maybe_unused]] std::string keyname) + { + std::map> a; + + unsigned char kpos; + kpos=findcolpos(keyname); + + for(auto &iter:record) + { + switch(kpos) + { + + case 0: + a[iter.id].emplace_back(iter); + break; + case 1: + a[iter.randomnumber].emplace_back(iter); + break; + + } + } + + return a; + } + + template::value,bool>::type = true> + std::map> getgroupRows([[maybe_unused]] std::string keyname) + { + std::map> a; + + return a; + } + + template::value,bool>::type = true, typename std::enable_if::value,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + return a; + } + + template::value,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + } + + switch(vpos){ + case 0: + a[ktemp][iter.id].emplace_back(iter); + break; + case 1: + a[ktemp][iter.randomnumber].emplace_back(iter); + break; + + } + } + + + return a; + } + + template,bool>::type = true,typename std::enable_if,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + case 0: + a[ktemp][iter.id].emplace_back(iter); + break; + case 1: + a[ktemp][iter.randomnumber].emplace_back(iter); + break; + + } + } + + return a; + } + + template,bool>::type = true,typename std::enable_if::value,bool>::type = true> + std::map>> getgroupRows([[maybe_unused]] std::string keyname,[[maybe_unused]] std::string valname) + { + std::map>> a; + + + unsigned char kpos,vpos; + kpos=findcolpos(keyname); + vpos=findcolpos(valname); + T ktemp; + + for(auto &iter:record) + { + + switch(kpos) + { + + case 0: + ktemp=iter.id; + break; + case 1: + ktemp=iter.randomnumber; + break; + } + + switch(vpos){ + + } + } + + return a; + } + + }; + + +} +#endif + \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/orm/orm.h b/frameworks/C++/paozhu/paozhu_benchmark/orm/orm.h new file mode 100755 index 00000000000..816b9ae4dc9 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/orm/orm.h @@ -0,0 +1,4 @@ +/*build this file time Tue, 20 Dec 2022 11:40:56 GMT*/ + +#include "Fortune.h" +#include "World.h" diff --git a/frameworks/C++/paozhu/paozhu_benchmark/view/techempower/fortunes.html b/frameworks/C++/paozhu/paozhu_benchmark/view/techempower/fortunes.html new file mode 100755 index 00000000000..b9079541143 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/view/techempower/fortunes.html @@ -0,0 +1,5 @@ +Fortunes<%c + for(auto &a:obj["list"].as_array()){ +%><%c + } +%>
idmessage
<%c echo<<%c echo<
\ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/regviewmethod.hpp b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/regviewmethod.hpp new file mode 100755 index 00000000000..98a52eeada1 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/regviewmethod.hpp @@ -0,0 +1,26 @@ +#ifndef __HTTP_REG_VIEW_METHOD_HPP +#define __HTTP_REG_VIEW_METHOD_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include +#include +#include "request.h" +#include "viewso_param.h" +#include "viewmethold_reg.h" +#include "viewsrc.h" + +namespace http +{ + void _initview_method_regto(VIEW_REG &_viewmetholdreg) + { + //create time: Mon, 30 Dec 2024 15:45:45 GMT + + _viewmetholdreg.emplace("techempower/fortunes",http::view::techempower::fortunes); + + } +} +#endif \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/viewsrc.h b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/viewsrc.h new file mode 100755 index 00000000000..8991765bf19 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/include/viewsrc.h @@ -0,0 +1,26 @@ +#ifndef __HTTP_VIEWSRC_ALL_METHOD_H +#define __HTTP_VIEWSRC_ALL_METHOD_H + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include +#include +#include "request.h" +#include "viewso_param.h" + +namespace http { +namespace view { + +namespace techempower{ + + std::string fortunes(const struct view_param &vinfo,http::OBJ_VALUE &obj); +} + + +} + +} +#endif \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp new file mode 100755 index 00000000000..b29f89356b5 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "request.h" +#include "datetime.h" +#include "cookie.h" +#include "urlcode.h" +#include "loadviewso.h" +#include "viewso_param.h" +#include "http_so_common_api.h" +#include "viewsrc.h" +//g++ viewsrc/view/techempower/fortunes.cpp +namespace http { + +namespace view { + namespace techempower{ + std::string fortunes([[maybe_unused]] const struct view_param &vinfo,[[maybe_unused]] http::OBJ_VALUE &obj) + { + + std::ostringstream echo; + + + echo<<"Fortunes"; + + for(auto &a:obj["list"].as_array()){ + + echo<<""; + + } + + echo<<"
idmessage
"; + echo<"; + echo<
"; + + return echo.str(); + } + + } + } + } + \ No newline at end of file diff --git a/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/loopwebsockets.hpp b/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/loopwebsockets.hpp new file mode 100755 index 00000000000..388449b6a33 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/loopwebsockets.hpp @@ -0,0 +1,66 @@ +#include +#include +#include + +#include "orm.h" +#include "httppeer.h" +#include "websockets.h" + +namespace http +{ + +class loopwebsockets : public websockets_api +{ + public: + unsigned int outcount = 0; + loopwebsockets(std::weak_ptr p) : websockets_api(4, 0, p) {} + ~loopwebsockets() { std::cout << "~loopwebsockets" << std::endl; } + + public: + void onopen() { std::cout << "onopen" << std::endl; } + void onclose() { std::cout << "onclose" << std::endl; } + void onpong() {} + void pushloop() + { + std::shared_ptr peer = weakpeer.lock(); + if (peer) + { + std::cout << "timeloop:" << std::endl; + std::string aa = "looptests"; + std::string outhello; + peer->ws->makeWSText(aa, outhello); + peer->send(outhello); + + // peer->send(aa); + if (outcount == 4) + { + timeloop_num = 0; + outcount = 0; + return; + } + outcount++; + } + else + { + std::cout << "peer is die!" << std::endl; + } + } + void onfiles(std::string_view filename) { std::cout << "--------onfiles:--------" << filename << std::endl; } + void onmessage(std::string_view data) + { + std::cout << "onmessage:" << data << std::endl; + std::shared_ptr peer = weak_peer.lock(); + if (peer) + { + std::string outhello; + peer->ws->makeWSText(data, outhello); + peer->send(outhello); + } + } + static std::shared_ptr create(std::weak_ptr p) + { + return std::make_shared(p); + } +}; + +}// namespace http diff --git a/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/mywebsockets.hpp b/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/mywebsockets.hpp new file mode 100755 index 00000000000..4ebd42b88f3 --- /dev/null +++ b/frameworks/C++/paozhu/paozhu_benchmark/websockets/include/mywebsockets.hpp @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "orm.h" +#include "httppeer.h" +#include "websockets.h" +#include "terminal_color.h" +// g++ -shared -fPIC mywebsockets.cpp -o mywebsockets.so +namespace http +{ + +class mywebsockets : public websockets_api +{ + public: + // unsigned int timeloop_num; + // unsigned char state; + unsigned int outcount = 0; + mywebsockets(std::weak_ptr p) : websockets_api(4, 0, p) {} + ~mywebsockets() { DEBUG_LOG(" ~mywebsockets "); } + + public: + void onopen() { DEBUG_LOG(" onopen "); } + void onclose() { DEBUG_LOG(" onclose "); } + void onpong() {} + void pushloop() + { + std::shared_ptr peer = weak_peer.lock(); + if (peer) + { + DEBUG_LOG(" timeloop "); + std::string aa = "This server push msg or subscribe msg"; + std::string outhello; + peer->ws->makeWSText(aa.data(), aa.length(), outhello); + peer->send(outhello); + + // peer->send(aa); + if (outcount == 4) + { + timeloop_num = 0; + outcount = 0; + return; + } + outcount++; + } + else + { + DEBUG_LOG(" peer is die! "); + } + } + + void onfiles([[maybe_unused]] std::string_view filename) { DEBUG_LOG("onfiles %zu", filename.size()); } + void onmessage(std::string_view data) + { + std::ostringstream oss; + oss << std::this_thread::get_id(); + oss << " onmessage:" << data << std::endl; + std::string temp = oss.str(); + DEBUG_LOG("%s", temp.c_str()); + std::shared_ptr peer = weak_peer.lock(); + if (peer) + { + std::string outhello; + if(data=="html") + { + std::string html_data="

Websocket test 测试h3

"; + peer->ws->makeWSText(html_data, outhello); + } + else + { + peer->ws->makeWSText(data, outhello); + } + + peer->send(outhello); + } + } + static std::shared_ptr create(std::weak_ptr p) + { + return std::make_shared(p); + } +}; + +}// namespace http \ No newline at end of file diff --git a/frameworks/C/h2o/src/event_loop.c b/frameworks/C/h2o/src/event_loop.c index d5e138348de..5e49f246d60 100644 --- a/frameworks/C/h2o/src/event_loop.c +++ b/frameworks/C/h2o/src/event_loop.c @@ -32,13 +32,16 @@ #include #include #include +#include #include #include "error.h" #include "event_loop.h" #include "global_data.h" #include "thread.h" +#include "utility.h" +#define CONN_NUM_SAMPLE_PERIOD 2500 #define DEFAULT_TCP_FASTOPEN_QUEUE_LEN 4096 static void accept_connection(h2o_socket_t *listener, const char *err); @@ -72,6 +75,7 @@ static void accept_connection(h2o_socket_t *listener, const char *err) if (!sock) break; + ctx->event_loop.accepted_conn_num++; ctx->event_loop.conn_num++; sock->on_close.cb = on_close_connection; sock->on_close.data = &ctx->event_loop.conn_num; @@ -277,11 +281,36 @@ static void start_accept_polling(const config_t *config, void event_loop(struct thread_context_t *ctx) { + uint64_t last_sample = 0; + while (!ctx->shutdown || ctx->event_loop.conn_num) { h2o_evloop_run(ctx->event_loop.h2o_ctx.loop, INT32_MAX); process_messages(&ctx->global_thread_data->h2o_receiver, &ctx->event_loop.local_messages); + + const uint64_t now = h2o_now(ctx->event_loop.h2o_ctx.loop); + + if (now - last_sample > CONN_NUM_SAMPLE_PERIOD || last_sample > now) { + const size_t i = ctx->event_loop.conn_num_sample_idx; + + ctx->event_loop.conn_num_sample[i] = ctx->event_loop.conn_num; + ctx->event_loop.conn_num_sample_idx = + (i + 1) % ARRAY_SIZE(ctx->event_loop.conn_num_sample); + last_sample = now; + } } + + flockfile(stdout); + printf("Thread %ld statistics:\nAccepted connections: %zu\nConnection number samples: %zu", + syscall(SYS_gettid), + ctx->event_loop.accepted_conn_num, + *ctx->event_loop.conn_num_sample); + + for (size_t i = 1; i < ARRAY_SIZE(ctx->event_loop.conn_num_sample); i++) + printf(",%zu", ctx->event_loop.conn_num_sample[i]); + + putc_unlocked('\n', stdout); + funlockfile(stdout); } void free_event_loop(event_loop_t *event_loop, h2o_multithread_receiver_t *h2o_receiver) diff --git a/frameworks/C/h2o/src/event_loop.h b/frameworks/C/h2o/src/event_loop.h index cff091154c7..41a1f3b920f 100644 --- a/frameworks/C/h2o/src/event_loop.h +++ b/frameworks/C/h2o/src/event_loop.h @@ -27,6 +27,8 @@ #include "global_data.h" +#define CONN_NUM_SAMPLES 512 + typedef enum { SHUTDOWN, TASK @@ -41,6 +43,9 @@ typedef struct { h2o_accept_ctx_t h2o_accept_ctx; h2o_context_t h2o_ctx; h2o_linklist_t local_messages; + size_t accepted_conn_num; + size_t conn_num_sample[CONN_NUM_SAMPLES]; + size_t conn_num_sample_idx; } event_loop_t; typedef struct { diff --git a/frameworks/Crystal/amber/README.md b/frameworks/Crystal/amber/README.md index 470813e8c34..3bb70081119 100644 --- a/frameworks/Crystal/amber/README.md +++ b/frameworks/Crystal/amber/README.md @@ -8,17 +8,12 @@ This is the [Amber](https://amberframework.org) test of the Framework Benchmarks The purpose of Amber is not to create yet another framework, but to take advantage of the beautiful Crystal language capabilities and provide engineers an efficient, cohesive, and well maintain web framework for the crystal community that embraces the language philosophies, conventions, and guides. -Amber Crystal borrows concepts that already have been battle tested, successful, and embrace new concepts through team and community collaboration and analysis, that aligns with Crystal philosophies. +Amber borrows concepts that already have been battle tested, successful, and embrace new concepts through team and community collaboration and analysis, that aligns with Crystal philosophies. -## Contributors +Updated for Amber 1.4.1 and Crystal 1.14.0 -- Dru Jensen [drujensen](https://github.com/drujensen) -- Elias Perez [eliasjpr](https://github.com/eliasjpr) -- Isaac Sloan [elorest](https://github.com/elorest) -- Faustino Aguilar [faustinoaq](https://github.com/faustinoaq) -- Nick Franken [fridgerator](https://github.com/fridgerator) -- Mark Siemers [marksiemers](https://github.com/marksiemers) -- Robert Carpenter [robacarp](https://github.com/robacarp) +## Contributors +- Seth Tucker [crimson-knight](https://github.com/crimson-knight) See more [Amber contributors](https://github.com/amberframework/amber/graphs/contributors) diff --git a/frameworks/Crystal/amber/config/initializers/database.cr b/frameworks/Crystal/amber/config/initializers/database.cr index 04240c59a66..cf60c82de5a 100644 --- a/frameworks/Crystal/amber/config/initializers/database.cr +++ b/frameworks/Crystal/amber/config/initializers/database.cr @@ -1,7 +1,7 @@ require "granite/adapter/pg" -cpu_count = System.cpu_count -pool_size = 56 // cpu_count +cpu_count = System.cpu_count - 1 # Always leave 1 core for the system +pool_size = cpu_count * 4 # 4x the number of cores, should be plenty of room for concurrency database_url = ENV["DATABASE_URL"] url = "#{database_url}?initial_pool_size=#{pool_size}&max_idle_pool_size=#{pool_size}" diff --git a/frameworks/Crystal/amber/shard.lock b/frameworks/Crystal/amber/shard.lock index 635edcb60c1..4fb6d6ef1e4 100644 --- a/frameworks/Crystal/amber/shard.lock +++ b/frameworks/Crystal/amber/shard.lock @@ -28,10 +28,6 @@ shards: 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 @@ -44,22 +40,10 @@ shards: 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: 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 @@ -74,7 +58,7 @@ shards: micrate: git: https://github.com/amberframework/micrate.git - version: 0.15.0 + version: 0.15.1 mysql: git: https://github.com/crystal-lang/crystal-mysql.git @@ -82,7 +66,7 @@ shards: optarg: git: https://github.com/amberframework/optarg.git - version: 0.9.3 + version: 0.9.5 pg: git: https://github.com/will/crystal-pg.git @@ -96,10 +80,6 @@ shards: 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: git: https://github.com/luckyframework/shell-table.cr.git version: 0.9.3 @@ -116,10 +96,6 @@ shards: 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 c48994d4d4e..4b75672f88d 100644 --- a/frameworks/Crystal/amber/shard.yml +++ b/frameworks/Crystal/amber/shard.yml @@ -15,26 +15,10 @@ dependencies: github: amberframework/amber 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.23.3 diff --git a/frameworks/Crystal/spider-gazelle/shard.lock b/frameworks/Crystal/spider-gazelle/shard.lock index 5069278751c..a73d29d085c 100644 --- a/frameworks/Crystal/spider-gazelle/shard.lock +++ b/frameworks/Crystal/spider-gazelle/shard.lock @@ -2,11 +2,11 @@ version: 2.0 shards: action-controller: git: https://github.com/spider-gazelle/action-controller.git - version: 5.6.2 + version: 7.4.3 active-model: git: https://github.com/spider-gazelle/active-model.git - version: 4.2.3 + version: 4.3.2 backtracer: git: https://github.com/sija/backtracer.cr.git @@ -14,27 +14,23 @@ shards: db: git: https://github.com/crystal-lang/crystal-db.git - version: 0.11.0 + version: 0.13.1 eventbus: git: https://github.com/spider-gazelle/eventbus.git - version: 0.9.9+git.commit.086b2ba92475b88e8481b0387eb56c735cbfd7bd + version: 1.0.0+git.commit.af63536d718348885a553dc4aa6debccc2946289 exception_page: git: https://github.com/crystal-loot/exception_page.git - version: 0.3.0 - - future: - git: https://github.com/crystal-community/future.cr.git - version: 1.0.0 + version: 0.5.0 habitat: git: https://github.com/luckyframework/habitat.git - version: 0.4.7 + version: 0.4.9 hot_topic: git: https://github.com/jgaskins/hot_topic.git - version: 0.1.0+git.commit.c4577d949221d535f29162343bf503b578308954 + version: 0.1.0+git.commit.3c901e77b6e000930398738260a2944b6f5785dc http-params-serializable: git: https://github.com/place-labs/http-params-serializable.git @@ -42,7 +38,7 @@ shards: json-schema: git: https://github.com/spider-gazelle/json-schema.git - version: 1.3.0 + version: 1.3.1 kilt: git: https://github.com/jeromegn/kilt.git @@ -50,21 +46,21 @@ shards: lucky_router: git: https://github.com/luckyframework/lucky_router.git - version: 0.5.2 + version: 0.6.0 pg: git: https://github.com/will/crystal-pg.git - version: 0.26.0 + version: 0.28.0 pg-orm: git: https://github.com/spider-gazelle/pg-orm.git - version: 1.0.0+git.commit.2bbafec9579f175880281279d33168360176540c + version: 1.1.2+git.commit.9b340ee269cd4a10ed6c5b51235cbaf45fc380e1 pool: git: https://github.com/ysbaddaden/pool.git - version: 0.3.0 + version: 0.2.4 redis: git: https://github.com/stefanwille/crystal-redis.git - version: 2.8.3 + version: 2.9.1 diff --git a/frameworks/Crystal/spider-gazelle/spider-gazelle.dockerfile b/frameworks/Crystal/spider-gazelle/spider-gazelle.dockerfile index 5962a201dc1..c836b434c44 100644 --- a/frameworks/Crystal/spider-gazelle/spider-gazelle.dockerfile +++ b/frameworks/Crystal/spider-gazelle/spider-gazelle.dockerfile @@ -1,5 +1,4 @@ -FROM 84codes/crystal:1.7.2-alpine -RUN apk add --update --no-cache bash gmp-dev +FROM crystallang/crystal:1.14.0 WORKDIR /usr/src/app @@ -10,7 +9,7 @@ COPY run.sh run.sh # Build App RUN shards build --release --no-debug -ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=56&max_idle_pool_size=56 +ENV DATABASE_URL postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world?initial_pool_size=5&max_idle_pool_size=5 ENV SG_ENV production diff --git a/frameworks/Java/httpserver-robaho/pom.xml b/frameworks/Java/httpserver-robaho/pom.xml index ce9dc2cd27e..2888eba5693 100644 --- a/frameworks/Java/httpserver-robaho/pom.xml +++ b/frameworks/Java/httpserver-robaho/pom.xml @@ -40,7 +40,7 @@ io.github.robaho httpserver - 1.0.6 + 1.0.17 compile diff --git a/frameworks/Java/smart-socket/pom.xml b/frameworks/Java/smart-socket/pom.xml index a4107b3d3e8..afdeea27141 100644 --- a/frameworks/Java/smart-socket/pom.xml +++ b/frameworks/Java/smart-socket/pom.xml @@ -11,7 +11,7 @@ 21 21 2.17.1 - 2.5 + 2.7 5.0.0 0.9.23 diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java index 9dda965e0be..4875d68c8d8 100755 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/Bootstrap.java @@ -11,11 +11,11 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import org.smartboot.Message; -import org.smartboot.http.server.HttpBootstrap; -import org.smartboot.http.server.HttpRequest; -import org.smartboot.http.server.HttpResponse; -import org.smartboot.http.server.HttpServerHandler; -import org.smartboot.http.server.handler.HttpRouteHandler; +import tech.smartboot.feat.core.server.HttpRequest; +import tech.smartboot.feat.core.server.HttpResponse; +import tech.smartboot.feat.core.server.HttpServer; +import tech.smartboot.feat.core.server.HttpServerHandler; +import tech.smartboot.feat.core.server.handler.HttpRouteHandler; import javax.sql.DataSource; @@ -25,9 +25,9 @@ public class Bootstrap { public static void main(String[] args) { int cpuNum = Runtime.getRuntime().availableProcessors(); // 定义服务器接受的消息类型以及各类消息对应的处理器 - HttpBootstrap bootstrap = new HttpBootstrap(); + HttpServer bootstrap = new HttpServer(); bootstrap.configuration() - .threadNum(cpuNum) + .threadNum(cpuNum + 1) .headerLimiter(0) .readBufferSize(1024 * 4) .writeBufferSize(1024 * 4); 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 b20525ec571..31a7d546119 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 @@ -5,7 +5,7 @@ import com.jsoniter.spi.JsonException; import com.jsoniter.spi.Slice; import jakarta.servlet.http.HttpServletResponse; -import org.smartboot.http.server.HttpResponse; +import tech.smartboot.feat.core.server.HttpResponse; import java.io.IOException; diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/MultipleQueriesHandler.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/MultipleQueriesHandler.java index 61b9f66b344..ac4807a9284 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/MultipleQueriesHandler.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/MultipleQueriesHandler.java @@ -1,9 +1,10 @@ package org.smartboot.http; -import org.smartboot.http.common.utils.NumberUtils; -import org.smartboot.http.server.HttpRequest; -import org.smartboot.http.server.HttpResponse; -import org.smartboot.http.server.HttpServerHandler; + +import tech.smartboot.feat.core.common.utils.NumberUtils; +import tech.smartboot.feat.core.server.HttpRequest; +import tech.smartboot.feat.core.server.HttpResponse; +import tech.smartboot.feat.core.server.HttpServerHandler; import javax.sql.DataSource; import java.io.IOException; diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/SingleQueryHandler.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/SingleQueryHandler.java index b69495d1a5e..52a96b9ca57 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/SingleQueryHandler.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/SingleQueryHandler.java @@ -1,8 +1,9 @@ package org.smartboot.http; -import org.smartboot.http.server.HttpRequest; -import org.smartboot.http.server.HttpResponse; -import org.smartboot.http.server.HttpServerHandler; + +import tech.smartboot.feat.core.server.HttpRequest; +import tech.smartboot.feat.core.server.HttpResponse; +import tech.smartboot.feat.core.server.HttpServerHandler; import javax.sql.DataSource; import java.io.IOException; diff --git a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/UpdateHandler.java b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/UpdateHandler.java index 065bed5a9a6..3217adea343 100644 --- a/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/UpdateHandler.java +++ b/frameworks/Java/smart-socket/src/main/java/org/smartboot/http/UpdateHandler.java @@ -1,9 +1,10 @@ package org.smartboot.http; -import org.smartboot.http.common.utils.NumberUtils; -import org.smartboot.http.server.HttpRequest; -import org.smartboot.http.server.HttpResponse; -import org.smartboot.http.server.HttpServerHandler; + +import tech.smartboot.feat.core.common.utils.NumberUtils; +import tech.smartboot.feat.core.server.HttpRequest; +import tech.smartboot.feat.core.server.HttpResponse; +import tech.smartboot.feat.core.server.HttpServerHandler; import javax.sql.DataSource; import java.io.IOException; diff --git a/frameworks/Java/solon/pom.xml b/frameworks/Java/solon/pom.xml index d483a51b397..30701fd2661 100644 --- a/frameworks/Java/solon/pom.xml +++ b/frameworks/Java/solon/pom.xml @@ -5,7 +5,7 @@ org.noear solon-parent - 3.0.4 + 3.0.5 hello @@ -21,7 +21,12 @@ org.noear - solon-web + solon-lib + + + + org.noear + solon-boot-smarthttp diff --git a/frameworks/JavaScript/ultimate-express/package-lock.json b/frameworks/JavaScript/ultimate-express/package-lock.json index f8bd80e2dd1..8359c81b60a 100644 --- a/frameworks/JavaScript/ultimate-express/package-lock.json +++ b/frameworks/JavaScript/ultimate-express/package-lock.json @@ -13,7 +13,7 @@ "lru-cache": "^10.0.1", "mariadb": "^3.2.0", "postgres": "^3.3.5", - "ultimate-express": "^1.3.9" + "ultimate-express": "^1.3.17" } }, "node_modules/@fastify/merge-json-schemas": { @@ -201,17 +201,25 @@ "node": ">= 0.8" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "license": "MIT", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "dependencies": { - "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -221,10 +229,9 @@ } }, "node_modules/cookie": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.1.tgz", - "integrity": "sha512-Xd8lFX4LM9QEEwxQpF9J9NTUh8pmdJO0cyRJhFiDoLTk2eH8FXlRv2IFGYVadZpqI3j8fhNrSdKCeYPxiAhLXw==", - "license": "MIT", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", "engines": { "node": ">=18" } @@ -238,23 +245,6 @@ "node": ">=6.6.0" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/denque": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", @@ -264,6 +254,19 @@ "node": ">=0.10" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -274,13 +277,9 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "engines": { "node": ">= 0.4" } @@ -289,7 +288,17 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, "engines": { "node": ">= 0.4" } @@ -377,22 +386,25 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "license": "MIT", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -401,35 +413,22 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gopd": { + "node_modules/get-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "license": "MIT", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "dependencies": { - "get-intrinsic": "^1.1.3" + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.4" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "license": "MIT", + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "engines": { "node": ">= 0.4" }, @@ -438,10 +437,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "license": "MIT", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -453,7 +451,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -519,6 +516,14 @@ "node": ">= 14" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -568,7 +573,6 @@ "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -603,10 +607,9 @@ } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "license": "BSD-3-Clause", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", + "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", "dependencies": { "side-channel": "^1.0.6" }, @@ -647,33 +650,66 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "license": "MIT", + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dependencies": { - "define-data-property": "^1.1.4", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "license": "MIT", + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -711,17 +747,16 @@ } }, "node_modules/ultimate-express": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/ultimate-express/-/ultimate-express-1.3.9.tgz", - "integrity": "sha512-jr4TMDsQM2nlG/1VMkesy70kTLIVecUeX8dzkh0JoSQ2wilhUaVbCM3I6qvKCNHD+UsYXI6QFhgKmSum1k19hw==", - "license": "Apache-2.0", + "version": "1.3.17", + "resolved": "https://registry.npmjs.org/ultimate-express/-/ultimate-express-1.3.17.tgz", + "integrity": "sha512-LRqSl+wE9xtuP+S03wSZXmYoQwyCXohGzL8zy3aQs4CChfnbDOQ9tbZwz4iCineUGwp7LFj7h5Oi1eqWiB6XGw==", "dependencies": { "@types/express": "^4.0.0", "accepts": "^1.3.8", - "acorn": "^8.12.1", + "acorn": "^8.14.0", "bytes": "^3.1.2", - "cookie": "^1.0.1", - "cookie-signature": "^1.2.1", + "cookie": "^1.0.2", + "cookie-signature": "^1.2.2", "encodeurl": "^2.0.0", "etag": "^1.8.1", "fast-querystring": "^1.1.2", @@ -730,12 +765,12 @@ "mime-types": "^2.1.35", "ms": "^2.1.3", "proxy-addr": "^2.0.7", - "qs": "^6.13.0", + "qs": "^6.13.1", "range-parser": "^1.2.1", "statuses": "^2.0.1", - "tseep": "^1.2.2", + "tseep": "^1.3.1", "type-is": "^1.6.18", - "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.49.0", + "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.51.0", "vary": "^1.1.2" }, "engines": { diff --git a/frameworks/JavaScript/ultimate-express/package.json b/frameworks/JavaScript/ultimate-express/package.json index 552f0bbf287..292933b7185 100644 --- a/frameworks/JavaScript/ultimate-express/package.json +++ b/frameworks/JavaScript/ultimate-express/package.json @@ -12,7 +12,7 @@ "lru-cache": "^10.0.1", "mariadb": "^3.2.0", "postgres": "^3.3.5", - "ultimate-express": "^1.3.9" + "ultimate-express": "^1.3.17" }, "type": "module" } diff --git a/frameworks/JavaScript/ultimate-express/ultimate-express-mysql.dockerfile b/frameworks/JavaScript/ultimate-express/ultimate-express-mysql.dockerfile index 30c2079f2ab..37d0fe86351 100644 --- a/frameworks/JavaScript/ultimate-express/ultimate-express-mysql.dockerfile +++ b/frameworks/JavaScript/ultimate-express/ultimate-express-mysql.dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM node:20-slim +FROM node:22-slim WORKDIR /app @@ -15,4 +15,4 @@ USER node EXPOSE 8080 -CMD ["node", "clustered.js"] \ No newline at end of file +CMD ["node", "clustered.js"] diff --git a/frameworks/JavaScript/ultimate-express/ultimate-express-postgres.dockerfile b/frameworks/JavaScript/ultimate-express/ultimate-express-postgres.dockerfile index ebf6591a379..6212cefbf1d 100644 --- a/frameworks/JavaScript/ultimate-express/ultimate-express-postgres.dockerfile +++ b/frameworks/JavaScript/ultimate-express/ultimate-express-postgres.dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM node:20-slim +FROM node:22-slim WORKDIR /app @@ -15,4 +15,4 @@ USER node EXPOSE 8080 -CMD ["node", "clustered.js"] \ No newline at end of file +CMD ["node", "clustered.js"] diff --git a/frameworks/JavaScript/ultimate-express/ultimate-express.dockerfile b/frameworks/JavaScript/ultimate-express/ultimate-express.dockerfile index 3defb8423fb..52aa5a3ea55 100644 --- a/frameworks/JavaScript/ultimate-express/ultimate-express.dockerfile +++ b/frameworks/JavaScript/ultimate-express/ultimate-express.dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM node:20-slim +FROM node:22-slim WORKDIR /app @@ -13,4 +13,4 @@ USER node EXPOSE 8080 -CMD ["node", "clustered.js"] \ No newline at end of file +CMD ["node", "clustered.js"] diff --git a/frameworks/Kotlin/hexagon/build.gradle b/frameworks/Kotlin/hexagon/build.gradle index d1f77b2b178..f739a6f3418 100644 --- a/frameworks/Kotlin/hexagon/build.gradle +++ b/frameworks/Kotlin/hexagon/build.gradle @@ -1,7 +1,7 @@ plugins { - id "org.jetbrains.kotlin.jvm" version "2.0.20" apply false - id "org.graalvm.buildtools.native" version "0.10.3" apply false + id "org.jetbrains.kotlin.jvm" version "2.0.21" apply false + id "org.graalvm.buildtools.native" version "0.10.4" apply false } version = "1.0.0" @@ -9,13 +9,13 @@ description = "TFB benchmark" group = "com.hexagonkt" ext { - hexagonVersion = "3.7.0" - jettyVersion = "12.0.13" - nettyVersion = "4.1.113.Final" + hexagonVersion = "3.7.3" + jettyVersion = "12.0.16" + nettyVersion = "4.1.116.Final" - hikariVersion = "5.1.0" + hikariVersion = "6.2.1" postgresqlVersion = "42.7.4" - vertxVersion = "4.5.10" + vertxVersion = "4.5.11" cache2kVersion = "2.6.1.Final" applicationClass = "com.hexagonkt.BenchmarkKt" @@ -30,5 +30,5 @@ subprojects { } tasks.wrapper { - gradleVersion = "8.10" + gradleVersion = "8.10.2" } diff --git a/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar b/frameworks/Kotlin/hexagon/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7..a4b76b9530d 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 9355b415575..df97d72b8b9 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.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon-pgclient.dockerfile index f11c4e7b2bd..2ad89ca5713 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/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build +FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist # # RUNTIME # -FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl +FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl ARG PROJECT=hexagon_helidon_pgclient ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile index 27177de5eb9..632cc8720b5 100644 --- a/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-helidon.dockerfile @@ -1,7 +1,7 @@ # # BUILD # -FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-22-cds-musl AS build +FROM docker.io/bellsoft/liberica-runtime-container:jdk-all-23-cds-musl AS build USER root WORKDIR /hexagon @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test installDist # # RUNTIME # -FROM docker.io/bellsoft/liberica-runtime-container:jre-22-musl +FROM docker.io/bellsoft/liberica-runtime-container:jre-23-musl ARG PROJECT=hexagon_helidon_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile index 42f28071128..dfc6c521a1d 100644 --- a/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile +++ b/frameworks/Kotlin/hexagon/hexagon-tomcat.dockerfile @@ -12,7 +12,7 @@ RUN ./gradlew --quiet -x test war # # RUNTIME # -FROM docker.io/tomcat:11.0.0-jre21-temurin-noble +FROM docker.io/tomcat:11-jre21-temurin-noble ARG MODULE=/hexagon/hexagon_tomcat_postgresql ENV POSTGRESQL_DB_HOST tfb-database diff --git a/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt b/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt index 510abda0295..2b09d73f6f5 100644 --- a/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt +++ b/frameworks/Kotlin/hexagon/store_pgclient/src/main/kotlin/BenchmarkPgClientStore.kt @@ -19,9 +19,10 @@ class BenchmarkPgClientStore( ) : BenchmarkStore(settings) { companion object { - private const val SELECT_WORLD: String = "select * from world where id = $1" + private const val LOAD_WORLDS: String = "select id, randomNumber from world" + private const val SELECT_WORLD: String = "select id, randomNumber from world where id = $1" private const val UPDATE_WORLD: String = "update world set randomNumber = $1 where id = $2" - private const val SELECT_ALL_FORTUNES: String = "select * from fortune" + private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune" } private val connectOptions: PgConnectOptions by lazy { @@ -81,13 +82,12 @@ class BenchmarkPgClientStore( .toCompletionStage() .toCompletableFuture() .get() - } } override fun initWorldsCache(cache: Cache) { dataSource - .preparedQuery("select * from world") + .preparedQuery(LOAD_WORLDS) .execute() .map { rowSet -> rowSet.map { row -> diff --git a/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt b/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt index 501a4d9ce34..14558b1a2bd 100644 --- a/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt +++ b/frameworks/Kotlin/hexagon/store_sql/src/main/kotlin/BenchmarkSqlStore.kt @@ -16,9 +16,10 @@ class BenchmarkSqlStore( ) : BenchmarkStore(settings) { companion object { - private const val SELECT_WORLD: String = "select * from world where id = ?" + private const val LOAD_WORLDS: String = "select id, randomNumber from world" + private const val SELECT_WORLD: String = "select id, randomNumber from world where id = ?" private const val UPDATE_WORLD: String = "update world set randomNumber = ? where id = ?" - private const val SELECT_ALL_FORTUNES: String = "select * from fortune" + private const val SELECT_ALL_FORTUNES: String = "select id, message from fortune" } private val dataSource: HikariDataSource by lazy { @@ -63,19 +64,17 @@ class BenchmarkSqlStore( override fun replaceWorlds(worlds: List) { dataSource.connection.use { con: Connection -> val stmtSelect = con.prepareStatement(SELECT_WORLD) - val stmtUpdate = con.prepareStatement(UPDATE_WORLD) - worlds.forEach { - val worldId = it.id - val newRandomNumber = it.randomNumber - - stmtSelect.setInt(1, worldId) + stmtSelect.setInt(1, it.id) val rs = stmtSelect.executeQuery() rs.next() rs.getInt(2) // Read 'randomNumber' to comply with Test type 5, point 6 + } - stmtUpdate.setInt(1, newRandomNumber) - stmtUpdate.setInt(2, worldId) + val stmtUpdate = con.prepareStatement(UPDATE_WORLD) + worlds.forEach { + stmtUpdate.setInt(1, it.randomNumber) + stmtUpdate.setInt(2, it.id) stmtUpdate.executeUpdate() } } @@ -83,7 +82,7 @@ class BenchmarkSqlStore( override fun initWorldsCache(cache: Cache) { dataSource.connection.use { con: Connection -> - val stmtSelect = con.prepareStatement("select * from world") + val stmtSelect = con.prepareStatement(LOAD_WORLDS) val rs = stmtSelect.executeQuery() while (rs.next()) { diff --git a/frameworks/Kotlin/ktor/benchmark_config.json b/frameworks/Kotlin/ktor/benchmark_config.json index 3a213a240ba..5a9b1816736 100644 --- a/frameworks/Kotlin/ktor/benchmark_config.json +++ b/frameworks/Kotlin/ktor/benchmark_config.json @@ -25,6 +25,29 @@ "notes": "http://ktor.io/", "versus": "netty" }, + "r2dbc": { + "plaintext_url": "/plaintext", + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "update_url": "/updates?queries=", + "fortune_url": "/fortunes", + + "port": 9090, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "ktor", + "language": "Kotlin", + "orm": "Raw", + "platform": "Netty", + "webserver": "None", + "os": "Linux", + "database_os": "Linux", + "display_name": "ktor-netty-r2dbc", + "notes": "http://ktor.io/", + "versus": "netty" + }, "jetty": { "plaintext_url": "/plaintext", "json_url": "/json", diff --git a/frameworks/Kotlin/ktor/ktor-asyncdb/build.gradle.kts b/frameworks/Kotlin/ktor/ktor-asyncdb/build.gradle.kts index 61cedf013ce..029a0973171 100644 --- a/frameworks/Kotlin/ktor/ktor-asyncdb/build.gradle.kts +++ b/frameworks/Kotlin/ktor/ktor-asyncdb/build.gradle.kts @@ -1,6 +1,6 @@ plugins { application - kotlin("jvm") version "1.9.22" + kotlin("jvm") version "2.0.21" kotlin("plugin.serialization") version "2.0.0" id("com.github.johnrengelman.shadow") version "8.1.0" } @@ -17,8 +17,7 @@ application { } val ktor_version = "2.3.12" -val kotlinx_serialization_version = "1.6.3" -val vertx_pg_client = "4.5.8" +val kotlinx_serialization_version = "1.7.3" dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinx_serialization_version") @@ -26,11 +25,17 @@ dependencies { implementation("io.ktor:ktor-server-netty:$ktor_version") implementation("io.ktor:ktor-server-default-headers:$ktor_version") implementation("io.ktor:ktor-server-html-builder:$ktor_version") - implementation("com.github.jasync-sql:jasync-postgresql:2.2.0") + implementation("com.github.jasync-sql:jasync-postgresql:2.2.4") +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } } tasks.shadowJar { - archiveBaseName.set("bench") + archiveBaseName.set("ktor-asyncdb") archiveClassifier.set("") archiveVersion.set("") } diff --git a/frameworks/Kotlin/ktor/ktor-asyncdb/gradle.properties b/frameworks/Kotlin/ktor/ktor-asyncdb/gradle.properties index 5790d58ceda..9408f64fb4d 100644 --- a/frameworks/Kotlin/ktor/ktor-asyncdb/gradle.properties +++ b/frameworks/Kotlin/ktor/ktor-asyncdb/gradle.properties @@ -1,4 +1,4 @@ kotlin.code.style=official -kotlin_version=1.9.22 +kotlin_version=2.0.21 ktor_version=2.3.12 diff --git a/frameworks/Kotlin/ktor/ktor-asyncdb/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/ktor/ktor-asyncdb/gradle/wrapper/gradle-wrapper.properties index 3d66c176054..c6a2952d3c1 100644 --- a/frameworks/Kotlin/ktor/ktor-asyncdb/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/ktor/ktor-asyncdb/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Dec 07 21:01:17 MST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip diff --git a/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle b/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle deleted file mode 100644 index d58b02872bf..00000000000 --- a/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle +++ /dev/null @@ -1,14 +0,0 @@ -pluginManagement { - resolutionStrategy { - eachPlugin { - if (requested.id.id == "org.jetbrains.kotlin.jvm") { - useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - } - if (requested.id.id == "kotlinx-serialization") { - useModule("org.jetbrains.kotlin:kotlin-serialization:$kotlin_version") - } - } - } -} - -rootProject.name = 'tech-empower-framework-benchmark' \ No newline at end of file diff --git a/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle.kts b/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle.kts new file mode 100644 index 00000000000..fd565dc83c5 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-asyncdb/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "tech-empower-framework-benchmark" \ No newline at end of file diff --git a/frameworks/Kotlin/ktor/ktor-cio.dockerfile b/frameworks/Kotlin/ktor/ktor-cio.dockerfile index 33059ec9fd4..7443aed952f 100644 --- a/frameworks/Kotlin/ktor/ktor-cio.dockerfile +++ b/frameworks/Kotlin/ktor/ktor-cio.dockerfile @@ -1,13 +1,13 @@ -FROM maven:3.9.7-amazoncorretto-17-debian as maven +FROM maven:3.9.9-amazoncorretto-21-debian-bookworm as maven WORKDIR /ktor COPY ktor/pom.xml pom.xml COPY ktor/src src RUN mvn clean package -q -FROM amazoncorretto:17.0.11-al2023-headless +FROM amazoncorretto:21-al2023-headless WORKDIR /ktor COPY --from=maven /ktor/target/tech-empower-framework-benchmark-1.0-SNAPSHOT-cio-bundle.jar app.jar EXPOSE 9090 -CMD ["java", "-jar", "app.jar"] +CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"] diff --git a/frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts b/frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts index 80a9debfa16..5d6db161d20 100644 --- a/frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts +++ b/frameworks/Kotlin/ktor/ktor-exposed/app/build.gradle.kts @@ -9,7 +9,7 @@ repositories { mavenCentral() } -val ktorVersion = "3.0.1" +val ktorVersion = "3.0.3" val kotlinxSerializationVersion = "1.7.3" val exposedVersion = "0.56.0" diff --git a/frameworks/Kotlin/ktor/ktor-exposed/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/ktor/ktor-exposed/gradle/wrapper/gradle-wrapper.properties index bdc9a83b1e6..4eaec467050 100644 --- a/frameworks/Kotlin/ktor/ktor-exposed/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/ktor/ktor-exposed/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/frameworks/Kotlin/ktor/ktor-jasync.dockerfile b/frameworks/Kotlin/ktor/ktor-jasync.dockerfile index 8c66e81ea4e..be5f6dd4606 100644 --- a/frameworks/Kotlin/ktor/ktor-jasync.dockerfile +++ b/frameworks/Kotlin/ktor/ktor-jasync.dockerfile @@ -1,13 +1,15 @@ -FROM maven:3.9.7-amazoncorretto-17-debian +FROM gradle:jdk21 as build WORKDIR /app COPY ktor-asyncdb/gradle gradle COPY ktor-asyncdb/build.gradle.kts build.gradle.kts -COPY ktor-asyncdb/gradle.properties gradle.properties COPY ktor-asyncdb/gradlew gradlew -COPY ktor-asyncdb/settings.gradle settings.gradle COPY ktor-asyncdb/src src RUN /app/gradlew --no-daemon shadowJar +FROM amazoncorretto:21-al2023-headless +WORKDIR /app +COPY --from=build /app/build/libs/ktor-asyncdb.jar ktor-asyncdb.jar + EXPOSE 9090 -CMD ["java", "-server", "-XX:+UseParallelGC", "-Xms2G","-Xmx2G", "-jar", "/app/build/libs/bench.jar", "jasync-sql"] +CMD ["java", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "ktor-asyncdb.jar", "jasync-sql"] diff --git a/frameworks/Kotlin/ktor/ktor-jetty.dockerfile b/frameworks/Kotlin/ktor/ktor-jetty.dockerfile index e753d7cc442..52855ab4a55 100644 --- a/frameworks/Kotlin/ktor/ktor-jetty.dockerfile +++ b/frameworks/Kotlin/ktor/ktor-jetty.dockerfile @@ -1,13 +1,13 @@ -FROM maven:3.9.7-amazoncorretto-17-debian as maven +FROM maven:3.9.9-amazoncorretto-21-debian-bookworm as maven WORKDIR /ktor COPY ktor/pom.xml pom.xml COPY ktor/src src RUN mvn clean package -q -FROM amazoncorretto:17.0.11-al2023-headless +FROM amazoncorretto:21-al2023-headless WORKDIR /ktor COPY --from=maven /ktor/target/tech-empower-framework-benchmark-1.0-SNAPSHOT-jetty-bundle.jar app.jar EXPOSE 9090 -CMD ["java", "-jar", "app.jar"] +CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"] diff --git a/frameworks/Kotlin/ktor/ktor-pgclient.dockerfile b/frameworks/Kotlin/ktor/ktor-pgclient.dockerfile index 0cf012e7596..301f5e55c31 100644 --- a/frameworks/Kotlin/ktor/ktor-pgclient.dockerfile +++ b/frameworks/Kotlin/ktor/ktor-pgclient.dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.7-amazoncorretto-17-debian as build +FROM gradle:jdk21 as build WORKDIR /app COPY ktor-pgclient/gradle gradle COPY ktor-pgclient/build.gradle.kts build.gradle.kts @@ -6,10 +6,10 @@ COPY ktor-pgclient/gradlew gradlew COPY ktor-pgclient/src src RUN /app/gradlew --no-daemon shadowJar -FROM amazoncorretto:17.0.11-al2023-headless +FROM amazoncorretto:21-al2023-headless WORKDIR /app COPY --from=build /app/build/libs/ktor-pgclient.jar ktor-pgclient.jar EXPOSE 8080 -CMD ["java", "-server", "-XX:MaxRAMFraction=1", "-XX:-UseBiasedLocking", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "ktor-pgclient.jar"] +CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "ktor-pgclient.jar"] diff --git a/frameworks/Kotlin/ktor/ktor-pgclient/build.gradle.kts b/frameworks/Kotlin/ktor/ktor-pgclient/build.gradle.kts index f080b64d69f..60524844558 100644 --- a/frameworks/Kotlin/ktor/ktor-pgclient/build.gradle.kts +++ b/frameworks/Kotlin/ktor/ktor-pgclient/build.gradle.kts @@ -1,6 +1,6 @@ plugins { application - kotlin("jvm") version "1.9.22" + kotlin("jvm") version "2.0.21" kotlin("plugin.serialization") version "2.0.0" id("com.github.johnrengelman.shadow") version "8.1.0" } @@ -17,19 +17,22 @@ application { } val ktor_version = "2.3.12" +val vertx_version = "4.5.11" dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3") implementation("io.ktor:ktor-server-netty:$ktor_version") implementation("io.ktor:ktor-server-html-builder-jvm:$ktor_version") implementation("io.ktor:ktor-server-default-headers-jvm:$ktor_version") - implementation("io.vertx:vertx-pg-client:4.5.8") - implementation("io.vertx:vertx-lang-kotlin:4.5.8") - implementation("io.vertx:vertx-lang-kotlin-coroutines:4.5.8") + implementation("io.vertx:vertx-pg-client:$vertx_version") + implementation("io.vertx:vertx-lang-kotlin:$vertx_version") + implementation("io.vertx:vertx-lang-kotlin-coroutines:$vertx_version") } -tasks.withType().configureEach { - kotlinOptions.jvmTarget = "17" +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } } tasks.shadowJar { diff --git a/frameworks/Kotlin/ktor/ktor-pgclient/gradle/wrapper/gradle-wrapper.properties b/frameworks/Kotlin/ktor/ktor-pgclient/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..81aa1c0448a 100644 --- a/frameworks/Kotlin/ktor/ktor-pgclient/gradle/wrapper/gradle-wrapper.properties +++ b/frameworks/Kotlin/ktor/ktor-pgclient/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc.dockerfile b/frameworks/Kotlin/ktor/ktor-r2dbc.dockerfile new file mode 100644 index 00000000000..9281f4974ac --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc.dockerfile @@ -0,0 +1,13 @@ +FROM maven:3.9.9-amazoncorretto-21-debian-bookworm as maven +WORKDIR /ktor-r2dbc +COPY ktor-r2dbc/pom.xml pom.xml +COPY ktor-r2dbc/src src +RUN mvn clean package -q + +FROM amazoncorretto:21-al2023-headless +WORKDIR /ktor-r2dbc +COPY --from=maven /ktor-r2dbc/target/tech-empower-framework-benchmark-1.0-SNAPSHOT-netty-bundle.jar app.jar + +EXPOSE 9090 + +CMD ["java", "-server","-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AlwaysPreTouch", "-jar", "app.jar"] diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/README.md b/frameworks/Kotlin/ktor/ktor-r2dbc/README.md new file mode 100644 index 00000000000..5b758d68dbd --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/README.md @@ -0,0 +1,50 @@ +# Ktor + +Ktor is a framework for building servers and clients in connected systems using Kotlin programming language. +More information is available at [ktor.io](http://ktor.io). + +# Setup + +* Java 21 +* Postgres server + +# Requirements + +* Maven 3 +* JDK 21 +* Kotlin +* ktor +* netty +* R2DBC + +Maven is downloaded automatically via Maven Wrapper script (`mvnw`), add dependencies are specified in `pom.xml` so will be downloaded automatically from maven central and jcenter repositories. + +# Deployment + +Run maven to build a bundle + +```bash +./mvnw package +``` + +Once bundle build complete and mysql server is running you can launch the application + +```bash +java -jar target/tech-empower-framework-benchmark-1.0-SNAPSHOT.jar +``` + +Please note that the server holds tty so you may need nohup. See `setup.sh` for details. + +# Contact + +[Leonid Stashevsky](https://github.com/e5l) + +[Sergey Mashkov](https://github.com/cy6erGn0m) + +[Ilya Ryzhenkov](https://github.com/orangy) + +[Ilya Nemtsev](https://github.com/inemtsev) + +Slack ktor channel https://kotlinlang.slack.com/messages/ktor (you need an [invite](http://slack.kotlinlang.org/) to join) + + diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/pom.xml b/frameworks/Kotlin/ktor/ktor-r2dbc/pom.xml new file mode 100644 index 00000000000..092e8ab9559 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/pom.xml @@ -0,0 +1,174 @@ + + + + 4.0.0 + + org.jetbrains.ktor + tech-empower-framework-benchmark + 1.0-SNAPSHOT + jar + + org.jetbrains.ktor tech-empower-framework-benchmark + + + 2.0.21 + 1.10.1 + 3.0.3 + 1.7.3 + 0.11.0 + UTF-8 + 1.5.12 + 3.7.1 + 42.7.4 + 1.0.7.RELEASE + 1.0.2.RELEASE + + + + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + + org.jetbrains.kotlinx + kotlinx-serialization-core + ${serialization.version} + + + org.jetbrains.kotlinx + kotlinx-serialization-json + ${serialization.version} + + + org.jetbrains.kotlinx + kotlinx-html-jvm + ${kotlinx.html.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-core + ${kotlin.coroutines.version} + + + org.jetbrains.kotlinx + kotlinx-coroutines-reactor + ${kotlin.coroutines.version} + + + io.ktor + ktor-server-default-headers-jvm + ${ktor.version} + + + io.ktor + ktor-server-html-builder-jvm + ${ktor.version} + + + org.postgresql + r2dbc-postgresql + ${r2dbc.version} + + + io.r2dbc + r2dbc-pool + ${r2dbc.pool.version} + + + io.projectreactor + reactor-core + ${reactor.version} + + + ch.qos.logback + logback-classic + ${logback.version} + + + io.ktor + ktor-server-netty-jvm + ${ktor.version} + + + + + src/main/kotlin + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + kotlinx-serialization + + + + + org.jetbrains.kotlin + kotlin-maven-serialization + ${kotlin.version} + + + + + maven-jar-plugin + + true + + + + default-jar + none + + + + + maven-assembly-plugin + 3.0.0 + + + + netty + + single + + + package + + + + src/main/assembly/netty-bundle.xml + + + + io.ktor.server.netty.EngineMain + + + + + + + + + diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/assembly/netty-bundle.xml b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/assembly/netty-bundle.xml new file mode 100644 index 00000000000..58ff7cff593 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/assembly/netty-bundle.xml @@ -0,0 +1,29 @@ + + netty-bundle + + + jar + + + false + + + + true + runtime + + + *:ktor-server-jetty + *:ktor-server-cio + + + + + + + ${project.build.outputDirectory} + / + + + \ No newline at end of file diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt new file mode 100644 index 00000000000..461c6e303e8 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt @@ -0,0 +1,186 @@ +package org.jetbrains.ktor.benchmarks + +import io.ktor.http.* +import io.ktor.http.content.* +import io.ktor.server.application.* +import io.ktor.server.config.* +import io.ktor.server.html.* +import io.ktor.server.plugins.defaultheaders.* +import io.ktor.server.response.* +import io.ktor.server.routing.* +import io.r2dbc.pool.ConnectionPool +import io.r2dbc.pool.ConnectionPoolConfiguration +import io.r2dbc.postgresql.PostgresqlConnectionConfiguration +import io.r2dbc.postgresql.PostgresqlConnectionFactory +import io.r2dbc.postgresql.client.SSLMode +import io.r2dbc.spi.Connection +import io.r2dbc.spi.ConnectionFactory +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.reactive.awaitFirst +import kotlinx.coroutines.reactive.awaitFirstOrNull +import kotlinx.html.* +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import org.jetbrains.ktor.benchmarks.Constants.DB_ROWS +import org.jetbrains.ktor.benchmarks.Constants.FORTUNES_QUERY +import org.jetbrains.ktor.benchmarks.Constants.UPDATE_QUERY +import org.jetbrains.ktor.benchmarks.Constants.WORLD_QUERY +import org.jetbrains.ktor.benchmarks.models.Fortune +import org.jetbrains.ktor.benchmarks.models.Message +import org.jetbrains.ktor.benchmarks.models.World +import reactor.core.publisher.Flux +import reactor.core.publisher.Mono +import kotlin.random.Random + +fun Application.main() { + val config = ApplicationConfig("application.conf") + val dbConnFactory = configurePostgresR2DBC(config) + + install(DefaultHeaders) + + val helloWorldContent = TextContent("Hello, World!", ContentType.Text.Plain) + + routing { + get("/plaintext") { + call.respond(helloWorldContent) + } + + get("/json") { + call.respondText(Json.encodeToString(Message("Hello, world!")), ContentType.Application.Json) + } + + get("/db") { + val random = Random.Default + val request = getWorld(dbConnFactory, random) + val result = request.awaitFirstOrNull() + + call.respondText(Json.encodeToString(result), ContentType.Application.Json) + } + + fun selectWorlds(queries: Int, random: Random): Flow = flow { + repeat(queries) { + emit(getWorld(dbConnFactory, random).awaitFirst()) + } + } + + get("/queries") { + val queries = call.queries() + val random = Random.Default + + val result = buildList { + selectWorlds(queries, random).collect { + add(it) + } + } + + call.respondText(Json.encodeToString(result), ContentType.Application.Json) + } + + get("/fortunes") { + val result = mutableListOf() + + val request = Flux.usingWhen(dbConnFactory.create(), { connection -> + Flux.from(connection.createStatement(FORTUNES_QUERY).execute()).flatMap { r -> + Flux.from(r.map { row, _ -> + Fortune( + row.get(0, Int::class.java)!!, row.get(1, String::class.java)!! + ) + }) + } + }, { connection -> connection.close() }) + + request.collectList().awaitFirstOrNull()?.let { result.addAll(it) } + + result.add(Fortune(0, "Additional fortune added at request time.")) + result.sortBy { it.message } + call.respondHtml { + head { title { +"Fortunes" } } + body { + table { + tr { + th { +"id" } + th { +"message" } + } + for (fortune in result) { + tr { + td { +fortune.id.toString() } + td { +fortune.message } + } + } + } + } + } + } + + get("/updates") { + val queries = call.queries() + val random = Random.Default + + val worlds = selectWorlds(queries, random) + + val worldsUpdated = buildList { + worlds.collect { world -> + world.randomNumber = random.nextInt(DB_ROWS) + 1 + add(world) + + Mono.usingWhen(dbConnFactory.create(), { connection -> + Mono.from( + connection.createStatement(UPDATE_QUERY) + .bind(0, world.randomNumber) + .bind(1, world.id) + .execute() + ).flatMap { Mono.from(it.rowsUpdated) } + }, Connection::close).awaitFirstOrNull() + } + } + + call.respondText(Json.encodeToString(worldsUpdated), ContentType.Application.Json) + } + } +} + +private fun getWorld( + dbConnFactory: ConnectionFactory, random: Random +): Mono = Mono.usingWhen(dbConnFactory.create(), { connection -> + Mono.from(connection.createStatement(WORLD_QUERY).bind(0, random.nextInt(DB_ROWS) + 1).execute()).flatMap { r -> + Mono.from(r.map { row, _ -> + World( + row.get(0, Int::class.java)!!, row.get(1, Int::class.java)!! + ) + }) + } +}, Connection::close) + +private fun configurePostgresR2DBC(config: ApplicationConfig): ConnectionFactory { + val cfo = PostgresqlConnectionConfiguration.builder() + .host(config.property("db.host").getString()) + .port(config.property("db.port").getString().toInt()) + .database(config.property("db.database").getString()) + .username(config.property("db.username").getString()) + .password(config.property("db.password").getString()) + .loopResources { NioClientEventLoopResources(Runtime.getRuntime().availableProcessors()).cacheLoops() } + .sslMode(SSLMode.DISABLE) + .tcpKeepAlive(true) + .tcpNoDelay(true) + .build() + + val cf = PostgresqlConnectionFactory(cfo) + + val cp = ConnectionPoolConfiguration.builder(cf) + .initialSize(config.property("db.initPoolSize").getString().toInt()) + .maxSize(config.property("db.maxPoolSize").getString().toInt()) + .build() + + return ConnectionPool(cp) +} + +private fun ApplicationCall.queries() = request.queryParameters["queries"]?.toIntOrNull()?.coerceIn(1, 500) ?: 1 + + +object Constants { + const val WORLD_QUERY = "SELECT id, randomnumber FROM world WHERE id = $1" + const val FORTUNES_QUERY = "SELECT id, message FROM fortune" + const val UPDATE_QUERY = "UPDATE world SET randomnumber = $1 WHERE id = $2" + const val DB_ROWS = 10000 +} diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/NioClientEventLoopResources.java b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/NioClientEventLoopResources.java new file mode 100644 index 00000000000..d0e03bb6b5e --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/NioClientEventLoopResources.java @@ -0,0 +1,123 @@ +package org.jetbrains.ktor.benchmarks; + +import io.netty.channel.Channel; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.DatagramChannel; +import io.netty.channel.socket.ServerSocketChannel; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioDatagramChannel; +import io.netty.channel.socket.nio.NioServerSocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.util.concurrent.DefaultThreadFactory; +import io.netty.util.concurrent.Future; +import io.netty.util.concurrent.ThreadPerTaskExecutor; +import reactor.core.publisher.Mono; +import reactor.netty.FutureMono; +import reactor.netty.resources.LoopResources; + +import java.time.Duration; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; + +/** + * Copied from GitHub issue comment: https://github.com/r2dbc/r2dbc-pool/issues/190#issuecomment-1566845190 + */ +public class NioClientEventLoopResources implements LoopResources { + public static final String THREAD_PREFIX = "prefix-"; + final int threads; + final AtomicReference loops = new AtomicReference<>(); + final AtomicBoolean running; + + NioClientEventLoopResources(int threads) { + this.running = new AtomicBoolean(true); + this.threads = threads; + } + + + @Override + @SuppressWarnings("unchecked") + public Mono disposeLater(Duration quietPeriod, Duration timeout) { + return Mono.defer(() -> { + long quietPeriodMillis = quietPeriod.toMillis(); + long timeoutMillis = timeout.toMillis(); + EventLoopGroup serverLoopsGroup = loops.get(); + Mono slMono = Mono.empty(); + if (running.compareAndSet(true, false)) { + if (serverLoopsGroup != null) { + slMono = FutureMono.from((Future) serverLoopsGroup.shutdownGracefully( + quietPeriodMillis, timeoutMillis, TimeUnit.MILLISECONDS)); + } + } + return Mono.when(slMono); + }); + } + + @Override + public boolean isDisposed() { + return !running.get(); + } + + @Override + public EventLoopGroup onClient(boolean useNative) { + return cacheLoops(); + } + + @Override + public EventLoopGroup onServer(boolean useNative) { + throw new UnsupportedOperationException("This event loop is designed only for client DB calls."); + } + + @Override + public EventLoopGroup onServerSelect(boolean useNative) { + throw new UnsupportedOperationException("This event loop is designed only for client DB calls."); + } + + @Override + public CHANNEL onChannel(Class channelType, EventLoopGroup group) { + if (channelType.equals(SocketChannel.class)) { + return (CHANNEL) new NioSocketChannel(); + } + if (channelType.equals(ServerSocketChannel.class)) { + return (CHANNEL) new NioServerSocketChannel(); + } + if (channelType.equals(DatagramChannel.class)) { + return (CHANNEL) new NioDatagramChannel(); + } + throw new IllegalArgumentException("Unsupported channel type: " + channelType.getSimpleName()); + } + + @Override + public Class onChannelClass(Class channelType, + EventLoopGroup group) { + if (channelType.equals(SocketChannel.class)) { + return (Class) NioSocketChannel.class; + } + if (channelType.equals(ServerSocketChannel.class)) { + return (Class) NioServerSocketChannel.class; + } + if (channelType.equals(DatagramChannel.class)) { + return (Class) NioDatagramChannel.class; + } + throw new IllegalArgumentException("Unsupported channel type: " + channelType.getSimpleName()); + } + + @SuppressWarnings("FutureReturnValueIgnored") + EventLoopGroup cacheLoops() { + EventLoopGroup eventLoopGroup = loops.get(); + if (null == eventLoopGroup) { + EventLoopGroup newEventLoopGroup = createNewEventLoopGroup(); + if (!loops.compareAndSet(null, newEventLoopGroup)) { + //"FutureReturnValueIgnored" this is deliberate + newEventLoopGroup.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS); + } + eventLoopGroup = cacheLoops(); + } + return eventLoopGroup; + } + + private NioEventLoopGroup createNewEventLoopGroup() { + return new NioEventLoopGroup(threads, new ThreadPerTaskExecutor(new DefaultThreadFactory(THREAD_PREFIX))); + } +} \ No newline at end of file diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Fortune.kt b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Fortune.kt new file mode 100644 index 00000000000..40b75ef4354 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Fortune.kt @@ -0,0 +1,6 @@ +package org.jetbrains.ktor.benchmarks.models + +import kotlinx.serialization.Serializable + +@Serializable +class Fortune(val id: Int, var message: String) diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Message.kt b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Message.kt new file mode 100644 index 00000000000..fc9bd1fada1 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/Message.kt @@ -0,0 +1,6 @@ +package org.jetbrains.ktor.benchmarks.models + +import kotlinx.serialization.Serializable + +@Serializable +class Message(val message: String) diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/World.kt b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/World.kt new file mode 100644 index 00000000000..0c35be5c969 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/kotlin/org/jetbrains/ktor/benchmarks/models/World.kt @@ -0,0 +1,6 @@ +package org.jetbrains.ktor.benchmarks.models + +import kotlinx.serialization.Serializable + +@Serializable +class World(val id: Int, var randomNumber: Int) diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/application.conf b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/application.conf new file mode 100644 index 00000000000..fe2031a7699 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/application.conf @@ -0,0 +1,26 @@ +ktor { + deployment { + port = 9090 + autoreload = false + watch = [ ] + shareWorkGroup = true + } + + application { + modules = [ org.jetbrains.ktor.benchmarks.HelloKt.main ] + } +} + +db { + driver = "pool" + protocol = "postgresql" + ssl = "false" + host = "tfb-database" + port = 5432 + database = "hello_world" + initPoolSize = 512 + maxPoolSize = 512 + username = "benchmarkdbuser" + password = "benchmarkdbpass" + //url = "r2dbc:postgresql://"${db.host}":"${db.port}"/"${db.database}"?loggerLevel=OFF&disableColumnSanitiser=true&assumeMinServerVersion=16&sslmode=disable&maxSize="${db.poolSize} +} diff --git a/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/logback.xml b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/logback.xml new file mode 100644 index 00000000000..9fd0f518971 --- /dev/null +++ b/frameworks/Kotlin/ktor/ktor-r2dbc/src/main/resources/logback.xml @@ -0,0 +1,21 @@ + + + + %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + true + + + + + + + + + + + + diff --git a/frameworks/Kotlin/ktor/ktor/README.md b/frameworks/Kotlin/ktor/ktor/README.md index e3c141a70e0..31f2755e24c 100644 --- a/frameworks/Kotlin/ktor/ktor/README.md +++ b/frameworks/Kotlin/ktor/ktor/README.md @@ -5,13 +5,13 @@ More information is available at [ktor.io](http://ktor.io). # Setup -* Java 17 -* MySQL server +* Java 21 +* Postgres server # Requirements * Maven 3 -* JDK 17 +* JDK 21 * Kotlin * ktor * netty diff --git a/frameworks/Kotlin/ktor/ktor/pom.xml b/frameworks/Kotlin/ktor/ktor/pom.xml index 74d725ca6fa..670b77cdf51 100644 --- a/frameworks/Kotlin/ktor/ktor/pom.xml +++ b/frameworks/Kotlin/ktor/ktor/pom.xml @@ -13,7 +13,7 @@ 2.0.21 - 3.0.2 + 3.0.3 1.7.3 0.11.0 UTF-8 diff --git a/frameworks/Kotlin/ktor/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt b/frameworks/Kotlin/ktor/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt index b44808fba40..a83a16f326b 100644 --- a/frameworks/Kotlin/ktor/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt +++ b/frameworks/Kotlin/ktor/ktor/src/main/kotlin/org/jetbrains/ktor/benchmarks/Hello.kt @@ -38,7 +38,7 @@ fun Application.main() { install(DefaultHeaders) - val helloWorldContent = TextContent("Hello, World!", ContentType.Text.Plain).also { it.contentLength } + val helloWorldContent = TextContent("Hello, World!", ContentType.Text.Plain) routing { get("/plaintext") { diff --git a/frameworks/PHP/amp/amp.dockerfile b/frameworks/PHP/amp/amp.dockerfile index 066337e6302..240db763cec 100644 --- a/frameworks/PHP/amp/amp.dockerfile +++ b/frameworks/PHP/amp/amp.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -6,24 +6,23 @@ 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.3-cli php8.3-mbstring php8.3-dev php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-mbstring php8.4-dev php8.4-xml php8.4-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.3/cli/conf.d/uv.ini -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +#RUN pecl install uv-0.2.4 > /dev/null && echo "extension=uv.so" > /etc/php/8.4/cli/conf.d/uv.ini +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -ADD ./ /amp WORKDIR /amp - -COPY deploy/conf/* /etc/php/8.3/cli/conf.d/ +COPY --link . . +COPY deploy/conf/* /etc/php/8.4/cli/conf.d/ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN composer install --prefer-dist --optimize-autoloader --no-dev +RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet EXPOSE 8080 diff --git a/frameworks/PHP/fat-free/composer.json b/frameworks/PHP/fat-free/composer.json index db779e5a04b..ba4b6413103 100644 --- a/frameworks/PHP/fat-free/composer.json +++ b/frameworks/PHP/fat-free/composer.json @@ -1,5 +1,5 @@ { "require": { - "bcosca/fatfree-core": "3.8.0" + "bcosca/fatfree-core": "^3.8" } -} \ 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 799ab3ccf3c..9038161bb87 100644 --- a/frameworks/PHP/fat-free/fat-free-raw.dockerfile +++ b/frameworks/PHP/fat-free/fat-free-raw.dockerfile @@ -1,16 +1,16 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /fat-free WORKDIR /fat-free +COPY --link . . ENV F3DIR="/fat-free/src" @@ -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.3/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.4/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /fat-free EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-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 a6df3aca401..3a91f8cc194 100644 --- a/frameworks/PHP/fat-free/fat-free.dockerfile +++ b/frameworks/PHP/fat-free/fat-free.dockerfile @@ -1,16 +1,16 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null + apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql > /dev/null -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /fat-free WORKDIR /fat-free +COPY --link . . ENV F3DIR="/fat-free/src" @@ -19,11 +19,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.3/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.4/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /fat-free EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /fat-free/deploy/nginx.conf diff --git a/frameworks/PHP/kumbiaphp/composer.json b/frameworks/PHP/kumbiaphp/composer.json index 0f573ad0f3d..aae7511e9ab 100644 --- a/frameworks/PHP/kumbiaphp/composer.json +++ b/frameworks/PHP/kumbiaphp/composer.json @@ -1,5 +1,5 @@ { "require": { - "joanhey/adapterman": "^0.6" + "joanhey/adapterman": "^0.7" } } diff --git a/frameworks/PHP/kumbiaphp/deploy/conf/cliphp.ini b/frameworks/PHP/kumbiaphp/deploy/conf/cliphp.ini index 26dcfc4f8f3..9f0f3171834 100644 --- a/frameworks/PHP/kumbiaphp/deploy/conf/cliphp.ini +++ b/frameworks/PHP/kumbiaphp/deploy/conf/cliphp.ini @@ -13,4 +13,4 @@ memory_limit = 512M opcache.jit_buffer_size=128M opcache.jit=tracing -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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile index b30a5ad25fe..f97c728e4c9 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-raw.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -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 \ - php8.3-fpm php8.3-mysql > /dev/null + php8.4-fpm php8.4-mysql > /dev/null -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /kumbiaphp COPY --link . . RUN git clone -b v1.2.1 --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.3/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.4/fpm/php-fpm.conf ; fi; EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-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 6c17e29857b..fa4069b3455 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -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 git php8.3-cli php8.3-mysql php8.3-xml > /dev/null +RUN apt-get install -yqq git php8.4-cli php8.4-mysql php8.4-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/cliphp.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/cliphp.ini /etc/php/8.4/cli/php.ini ADD ./ /kumbiaphp WORKDIR /kumbiaphp diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile index 541ff1fb00d..fe1c8ced5ea 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp-workerman.dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3-cli php8.3-pgsql php8.3-xml > /dev/null + apt-get install -yqq git php8.4-cli php8.4-pgsql php8.4-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/cliphp.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/cliphp.ini /etc/php/8.4/cli/php.ini ADD ./ /kumbiaphp WORKDIR /kumbiaphp diff --git a/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile index 3f8edde3e2f..960100a6347 100644 --- a/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile +++ b/frameworks/PHP/kumbiaphp/kumbiaphp.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -7,18 +7,18 @@ 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.3-fpm php8.3-mysql > /dev/null + php8.4-fpm php8.4-mysql > /dev/null -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /kumbiaphp COPY --link . . RUN git clone -b v1.2.1 --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 git clone -b master --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.3/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.4/fpm/php-fpm.conf ; fi; EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /kumbiaphp/deploy/nginx.conf diff --git a/frameworks/PHP/laravel/benchmark_config.json b/frameworks/PHP/laravel/benchmark_config.json index 053534b12fa..716cbea52a7 100644 --- a/frameworks/PHP/laravel/benchmark_config.json +++ b/frameworks/PHP/laravel/benchmark_config.json @@ -160,7 +160,8 @@ "database_os": "Linux", "display_name": "laravel-ripple", "notes": "", - "versus": "php" + "versus": "php", + "tags": ["broken"] } }] } diff --git a/frameworks/PHP/laravel/deploy/conf/cli-php.ini b/frameworks/PHP/laravel/deploy/conf/cli-php.ini index bcccffbc63b..e03b6e352a9 100644 --- a/frameworks/PHP/laravel/deploy/conf/cli-php.ini +++ b/frameworks/PHP/laravel/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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile index c353ef28b4f..e6804935087 100644 --- a/frameworks/PHP/laravel/laravel-laravel-s.dockerfile +++ b/frameworks/PHP/laravel/laravel-laravel-s.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN docker-php-ext-install pcntl opcache curl > /dev/null diff --git a/frameworks/PHP/laravel/laravel-swoole.dockerfile b/frameworks/PHP/laravel/laravel-swoole.dockerfile index 52308a4dd5e..d8d9881c82f 100644 --- a/frameworks/PHP/laravel/laravel-swoole.dockerfile +++ b/frameworks/PHP/laravel/laravel-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN docker-php-ext-install pcntl opcache curl > /dev/null diff --git a/frameworks/PHP/laravel/laravel-workerman.dockerfile b/frameworks/PHP/laravel/laravel-workerman.dockerfile index 34ee2de30a5..eda02b9b70d 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.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini WORKDIR /laravel COPY --link . . @@ -26,7 +26,7 @@ RUN mkdir -p bootstrap/cache \ RUN composer require joanhey/adapterman --update-no-dev --no-scripts --quiet RUN php artisan optimize -COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY --link deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/laravel/laravel.dockerfile b/frameworks/PHP/laravel/laravel.dockerfile index 455d2e6d60f..9b79ea86854 100644 --- a/frameworks/PHP/laravel/laravel.dockerfile +++ b/frameworks/PHP/laravel/laravel.dockerfile @@ -7,15 +7,15 @@ 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.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer --link /usr/bin/composer /usr/local/bin/composer -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /laravel COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN mkdir -p bootstrap/cache \ storage/logs \ @@ -29,7 +29,7 @@ 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.3/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /laravel/deploy/nginx.conf diff --git a/frameworks/PHP/leaf/deploy/conf/cli-php.ini b/frameworks/PHP/leaf/deploy/conf/cli-php.ini index bcccffbc63b..e03b6e352a9 100644 --- a/frameworks/PHP/leaf/deploy/conf/cli-php.ini +++ b/frameworks/PHP/leaf/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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/leaf/leaf-workerman.dockerfile b/frameworks/PHP/leaf/leaf-workerman.dockerfile index ddcc5dc928c..f26d9c999ba 100644 --- a/frameworks/PHP/leaf/leaf-workerman.dockerfile +++ b/frameworks/PHP/leaf/leaf-workerman.dockerfile @@ -7,15 +7,15 @@ 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.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl php8.3-zip > /dev/null + php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl php8.4-zip > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y libevent-dev php8.3-dev > /dev/null \ +RUN apt-get install -y libevent-dev php8.4-dev > /dev/null \ && pecl install event-3.1.4 > /dev/null \ - && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini + && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY --link deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini WORKDIR /leaf COPY --link . . @@ -23,7 +23,7 @@ COPY --link . . EXPOSE 8080 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN composer require joanhey/adapterman:^0.6 --quiet +RUN composer require joanhey/adapterman:^0.7 --quiet RUN sed -i 's|app()->run(); //| //$app->run(); //|g' index.php diff --git a/frameworks/PHP/leaf/leaf.dockerfile b/frameworks/PHP/leaf/leaf.dockerfile index 52a4c2f704c..1ebe23e5735 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.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-curl php8.3-zip > /dev/null + php8.4-cli php8.4-fpm php8.4-mysql php8.4-xml php8.4-curl php8.4-zip > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /leaf COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/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.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /leaf/deploy/nginx.conf diff --git a/frameworks/PHP/lumen/deploy/conf/cli-php.ini b/frameworks/PHP/lumen/deploy/conf/cli-php.ini index bcccffbc63b..e03b6e352a9 100644 --- a/frameworks/PHP/lumen/deploy/conf/cli-php.ini +++ b/frameworks/PHP/lumen/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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile index 9c2df7afaef..15b5544d1d2 100644 --- a/frameworks/PHP/lumen/lumen-laravel-s.dockerfile +++ b/frameworks/PHP/lumen/lumen-laravel-s.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN docker-php-ext-install pcntl opcache curl > /dev/null diff --git a/frameworks/PHP/lumen/lumen-swoole.dockerfile b/frameworks/PHP/lumen/lumen-swoole.dockerfile index 0f4f3434e37..b146bb5c926 100644 --- a/frameworks/PHP/lumen/lumen-swoole.dockerfile +++ b/frameworks/PHP/lumen/lumen-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN docker-php-ext-install pcntl opcache curl > /dev/null diff --git a/frameworks/PHP/lumen/lumen-workerman.dockerfile b/frameworks/PHP/lumen/lumen-workerman.dockerfile index decfe424411..6d837ace26f 100644 --- a/frameworks/PHP/lumen/lumen-workerman.dockerfile +++ b/frameworks/PHP/lumen/lumen-workerman.dockerfile @@ -7,19 +7,19 @@ 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.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null + php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini WORKDIR /lumen COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN composer require joanhey/adapterman:^0.6 --quiet +RUN composer require joanhey/adapterman:^0.7 --quiet RUN mkdir -p storage \ storage/framework/sessions \ diff --git a/frameworks/PHP/lumen/lumen.dockerfile b/frameworks/PHP/lumen/lumen.dockerfile index 9d11da427af..57b45fe86a9 100644 --- a/frameworks/PHP/lumen/lumen.dockerfile +++ b/frameworks/PHP/lumen/lumen.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 \ - php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-xml php8.3-dev > /dev/null + php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-xml php8.4-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /lumen COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet @@ -30,5 +30,5 @@ RUN chmod -R 777 /lumen EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /lumen/deploy/nginx.conf diff --git a/frameworks/PHP/nette/composer.json b/frameworks/PHP/nette/composer.json index 6a455dafc6b..ce416979668 100644 --- a/frameworks/PHP/nette/composer.json +++ b/frameworks/PHP/nette/composer.json @@ -6,18 +6,17 @@ "license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"], "require": { "php": ">= 7.2", - "nette/application": "^3.1", - "nette/bootstrap": "^3.1", - "nette/caching": "^3.1", - "nette/database": "^3.1", + "nette/application": "^3.2", + "nette/bootstrap": "^3.2", + "nette/caching": "^3.3", + "nette/database": "^3.2", "nette/di": "^3.0", - "nette/finder": "^2.5", + "nette/finder": "^3.0", "nette/forms": "^3.1", "nette/http": "^3.1", - "nette/mail": "^3.1", - "nette/robot-loader": "^3.3", + "nette/mail": "^4.0", "nette/security": "^3.1", - "nette/utils": "^3.2", + "nette/utils": "^4.0", "latte/latte": "^2.11 || ^3.0", "tracy/tracy": "^2.8" }, diff --git a/frameworks/PHP/nette/nette.dockerfile b/frameworks/PHP/nette/nette.dockerfile index fc917b9ca49..0e66d630510 100644 --- a/frameworks/PHP/nette/nette.dockerfile +++ b/frameworks/PHP/nette/nette.dockerfile @@ -1,28 +1,27 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-intl php8.3-dev php8.3-curl > /dev/null + php8.4-fpm php8.4-mysql php8.4-xml php8.4-mbstring php8.4-intl php8.4-dev php8.4-curl > /dev/null -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /nette WORKDIR /nette - +COPY --link . . #ENV NETTE_DIR="/nette/src" 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.3/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.4/fpm/php-fpm.conf ; fi; RUN chmod -R 777 /nette EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /nette/deploy/nginx.conf 2>&1 > /dev/stderr diff --git a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile index 8c93d9d3fd1..2eb076f20d9 100644 --- a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile @@ -10,11 +10,11 @@ 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-dev libsodium-dev libkrb5-dev \ - php8.3-cli php8.3-dev libphp8.3-embed php8.3-mysql > /dev/null + php8.4-cli php8.4-dev libphp8.4-embed php8.4-mysql > /dev/null -ENV NGINX_VERSION 1.26.0 +ENV NGINX_VERSION 1.27.3 -RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.30 --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 > /dev/null && \ make > /dev/null && make install > /dev/null -RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.3/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.4/embed/conf.d/10-opcache.ini COPY --link . . @@ -36,4 +36,4 @@ RUN export WORKERS=$(( 4 * $(nproc) )) && \ EXPOSE 8080 -CMD /nginx/sbin/nginx -c /deploy/nginx.conf +CMD /nginx/sbin/nginx -c /deploy/nginx.conf diff --git a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile index ab6d1e4f5df..9d943180852 100644 --- a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile @@ -10,11 +10,11 @@ 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-dev libsodium-dev libkrb5-dev \ - php8.3-cli php8.3-dev libphp8.3-embed php8.3-pgsql > /dev/null + php8.4-cli php8.4-dev libphp8.4-embed php8.4-pgsql > /dev/null -ENV NGINX_VERSION 1.26.0 +ENV NGINX_VERSION 1.27.3 -RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.30 --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 > /dev/null && \ make > /dev/null && make install > /dev/null -RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.3/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.4/embed/conf.d/10-opcache.ini COPY --link . . diff --git a/frameworks/PHP/php-ngx/php-ngx.dockerfile b/frameworks/PHP/php-ngx/php-ngx.dockerfile index 60d488d6649..3979f852433 100644 --- a/frameworks/PHP/php-ngx/php-ngx.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx.dockerfile @@ -10,16 +10,16 @@ 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-dev libsodium-dev libkrb5-dev \ - php8.3-cli php8.3-dev libphp8.3-embed php8.3-mysql > /dev/null + php8.4-cli php8.4-dev libphp8.4-embed php8.4-mysql > /dev/null -ENV NGINX_VERSION 1.26.0 +ENV NGINX_VERSION 1.27.3 -RUN git clone -b v0.0.29 --single-branch --depth 1 https://github.com/rryqszq4/ngx-php.git > /dev/null +RUN git clone -b v0.0.30 --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 && \ cd nginx-${NGINX_VERSION} && \ - export PHP_LIB=/usr/lib && \ + export PHP_LIB=/usr/lib && \ ./configure --user=www --group=www \ --prefix=/nginx \ --with-ld-opt="-Wl,-rpath,$PHP_LIB" \ @@ -27,10 +27,10 @@ RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ --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.3/embed/conf.d/10-opcache.ini +RUN sed -i "s|opcache.jit=off|;opcache.jit=off|g" /etc/php/8.4/embed/conf.d/10-opcache.ini COPY --link . . EXPOSE 8080 -CMD /nginx/sbin/nginx -c /deploy/nginx_default.conf +CMD /nginx/sbin/nginx -c /deploy/nginx_default.conf diff --git a/frameworks/PHP/php/deploy/workerman/cli-php.ini b/frameworks/PHP/php/deploy/workerman/cli-php.ini index a6c32d06f07..9f0f3171834 100644 --- a/frameworks/PHP/php/deploy/workerman/cli-php.ini +++ b/frameworks/PHP/php/deploy/workerman/cli-php.ini @@ -13,4 +13,4 @@ memory_limit = 512M opcache.jit_buffer_size=128M opcache.jit=tracing -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 \ No newline at end of file +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/php/deploy/workerman/composer.json b/frameworks/PHP/php/deploy/workerman/composer.json index 75b75e2d5ec..0cf52f71ab3 100644 --- a/frameworks/PHP/php/deploy/workerman/composer.json +++ b/frameworks/PHP/php/deploy/workerman/composer.json @@ -1,5 +1,5 @@ { "require": { - "joanhey/adapterman": "^0.6" + "joanhey/adapterman": "^0.7" } -} \ No newline at end of file +} diff --git a/frameworks/PHP/php/php-workerman.dockerfile b/frameworks/PHP/php/php-workerman.dockerfile index bd257c3883c..b23e8c3249b 100644 --- a/frameworks/PHP/php/php-workerman.dockerfile +++ b/frameworks/PHP/php/php-workerman.dockerfile @@ -1,26 +1,26 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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 > /dev/null && \ - apt-get update -yqq > /dev/null && apt-get upgrade -yqq + apt-get update -yqq > /dev/null && apt-get upgrade -yqq RUN apt-get install -yqq git unzip \ - php8.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql > /dev/null + php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql > /dev/null -RUN apt-get install -y php-pear php8.3-dev php8.3-xml libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev php8.4-xml libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/workerman/cli-php.ini /etc/php/8.3/cli/php.ini +COPY deploy/workerman/cli-php.ini /etc/php/8.4/cli/php.ini COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -ADD ./ /php WORKDIR /php +COPY --link . . COPY deploy/workerman/composer.json ./ -RUN composer install --optimize-autoloader --classmap-authoritative --no-dev +RUN composer install --optimize-autoloader --classmap-authoritative --no-dev COPY deploy/workerman/start.php ./ diff --git a/frameworks/PHP/reactphp/benchmark_config.json b/frameworks/PHP/reactphp/benchmark_config.json index 8da2a6e62f9..fb29ad3c207 100644 --- a/frameworks/PHP/reactphp/benchmark_config.json +++ b/frameworks/PHP/reactphp/benchmark_config.json @@ -3,10 +3,6 @@ "tests": [{ "default": { "json_url": "/json", - "db_url": "/db", - "query_url": "/query?q=", - "fortune_url": "/fortunes", - "update_url": "/update?q=", "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", diff --git a/frameworks/PHP/reactphp/reactphp.dockerfile b/frameworks/PHP/reactphp/reactphp.dockerfile index 05f9d138a16..a46c613938f 100644 --- a/frameworks/PHP/reactphp/reactphp.dockerfile +++ b/frameworks/PHP/reactphp/reactphp.dockerfile @@ -1,29 +1,33 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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 LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq git unzip wget curl build-essential \ - php8.3-cli php8.3-mbstring php8.3-dev php8.3-xml > /dev/null + php8.4-cli php8.4-mbstring php8.4-dev php8.4-xml > /dev/null # An extension is required! # We deal with concurrencies over 1k, which stream_select doesn't support. -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 +# libuv +# RUN apt-get install -yqq libuv1-dev > /dev/null \ +# && pecl install uv-beta > /dev/null \ +# && echo "extension=uv.so" > /etc/php/8.4/cli/conf.d/uv.ini + +# libevent +RUN apt-get install -y libevent-dev > /dev/null \ + && pecl install event-3.1.4 > /dev/null \ + && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/cli/conf.d/ +COPY --link deploy/conf/* /etc/php/8.4/cli/conf.d/ WORKDIR /reactphp +COPY --link . . -COPY composer.json . -RUN composer install --prefer-dist --optimize-autoloader --no-dev --quiet - -COPY . . +RUN composer install --prefer-dist --optimize-autoloader --no-dev EXPOSE 8080 diff --git a/frameworks/PHP/slim/composer.json b/frameworks/PHP/slim/composer.json index 78202c96223..2969d6f9fbd 100644 --- a/frameworks/PHP/slim/composer.json +++ b/frameworks/PHP/slim/composer.json @@ -4,7 +4,7 @@ "slim/php-view": "3.2.0", "slim/psr7": "1.*", "slim/http": "1.*", - "php-di/php-di": "^6.4" + "php-di/php-di": "^7" }, "autoload": { "psr-4": { diff --git a/frameworks/PHP/slim/deploy/conf/cli-php.ini b/frameworks/PHP/slim/deploy/conf/cli-php.ini index bcccffbc63b..e03b6e352a9 100644 --- a/frameworks/PHP/slim/deploy/conf/cli-php.ini +++ b/frameworks/PHP/slim/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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile b/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile index b1326f40cac..2c2088a9d05 100644 --- a/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile +++ b/frameworks/PHP/slim/slim-workerman-pgsql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -8,17 +8,17 @@ 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.3-cli php8.3-pgsql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-pgsql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini -ADD ./ /slim WORKDIR /slim +COPY --link . . EXPOSE 8080 diff --git a/frameworks/PHP/slim/slim-workerman.dockerfile b/frameworks/PHP/slim/slim-workerman.dockerfile index c7029637156..9f8806bc7bd 100644 --- a/frameworks/PHP/slim/slim-workerman.dockerfile +++ b/frameworks/PHP/slim/slim-workerman.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -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 update -yqq > /dev/null && apt-get install -yqq git \ - php8.3-cli php8.3-mysql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini -ADD ./ /slim WORKDIR /slim +COPY --link . . EXPOSE 8080 RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet -RUN composer require joanhey/adapterman:^0.6 --quiet +RUN composer require joanhey/adapterman:^0.7 --quiet RUN sed -i 's|$app->run(); //| //$app->run(); //|g' index.php diff --git a/frameworks/PHP/slim/slim.dockerfile b/frameworks/PHP/slim/slim.dockerfile index 90c81c6deb6..c81bf1e051f 100644 --- a/frameworks/PHP/slim/slim.dockerfile +++ b/frameworks/PHP/slim/slim.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-curl > /dev/null + php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql php8.4-xml php8.4-curl > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /slim WORKDIR /slim +COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/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.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /slim/deploy/nginx.conf diff --git a/frameworks/PHP/symfony/composer.json b/frameworks/PHP/symfony/composer.json index bfee2e6ed58..f6bfbca31d6 100644 --- a/frameworks/PHP/symfony/composer.json +++ b/frameworks/PHP/symfony/composer.json @@ -13,7 +13,7 @@ "symfony/orm-pack": "^2", "symfony/twig-bundle": "^7", "symfony/yaml": "^7", - "joanhey/adapterman": "^0.6" + "joanhey/adapterman": "^0.7" }, "minimum-stability": "dev", "prefer-stable": true, @@ -45,7 +45,10 @@ "symfony/polyfill-php73": "*", "symfony/polyfill-php74": "*", "symfony/polyfill-php80": "*", - "symfony/polyfill-php81": "*" + "symfony/polyfill-php81": "*", + "symfony/polyfill-php82": "*", + "symfony/polyfill-php83": "*", + "symfony/polyfill-php84": "*" }, "scripts": { "auto-scripts": { diff --git a/frameworks/PHP/symfony/deploy/conf/cli-php.ini b/frameworks/PHP/symfony/deploy/conf/cli-php.ini index bcccffbc63b..e03b6e352a9 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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/symfony/symfony-mysql.dockerfile b/frameworks/PHP/symfony/symfony-mysql.dockerfile index a394aea7152..157a9179660 100644 --- a/frameworks/PHP/symfony/symfony-mysql.dockerfile +++ b/frameworks/PHP/symfony/symfony-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -7,27 +7,27 @@ 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.3-cli php8.3-fpm php8.3-mysql \ - php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null + php8.4-cli php8.4-fpm php8.4-mysql \ + php8.4-mbstring php8.4-xml php8.4-curl php8.4-dev > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /symfony COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet 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.3/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/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.3/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD service php8.3-fpm start && \ +CMD service php8.4-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 7af272bbef1..a2622d5a397 100644 --- a/frameworks/PHP/symfony/symfony-raw.dockerfile +++ b/frameworks/PHP/symfony/symfony-raw.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -7,27 +7,27 @@ 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.3-cli php8.3-fpm php8.3-pgsql \ - php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-fpm php8.4-pgsql \ + php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /symfony COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet 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.3/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/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.3/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD service php8.3-fpm start && \ +CMD service php8.4-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 e8fda091bb3..c9d32159b13 100644 --- a/frameworks/PHP/symfony/symfony-swoole.dockerfile +++ b/frameworks/PHP/symfony/symfony-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN apt-get update -yqq && \ apt-get install -yqq libpq-dev libicu-dev > /dev/null && \ diff --git a/frameworks/PHP/symfony/symfony-workerman.dockerfile b/frameworks/PHP/symfony/symfony-workerman.dockerfile index fec8e3bdd5e..ecf697d198f 100644 --- a/frameworks/PHP/symfony/symfony-workerman.dockerfile +++ b/frameworks/PHP/symfony/symfony-workerman.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -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 unzip \ - php8.3-cli php8.3-pgsql php8.3-mbstring php8.3-xml php8.3-curl > /dev/null + php8.4-cli php8.4-pgsql php8.4-mbstring php8.4-xml php8.4-curl > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null && \ - pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null && \ + pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini WORKDIR /symfony COPY --link . . @@ -20,7 +20,7 @@ COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet RUN cp deploy/postgresql/.env . && composer dump-env prod && bin/console cache:clear -COPY --link deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY --link deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/symfony/symfony.dockerfile b/frameworks/PHP/symfony/symfony.dockerfile index 8c3606087e6..b9abd5c8361 100644 --- a/frameworks/PHP/symfony/symfony.dockerfile +++ b/frameworks/PHP/symfony/symfony.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -7,28 +7,28 @@ 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.3-cli php8.3-fpm php8.3-pgsql \ - php8.3-mbstring php8.3-xml php8.3-curl php8.3-dev > /dev/null + php8.4-cli php8.4-fpm php8.4-pgsql \ + php8.4-mbstring php8.4-xml php8.4-curl php8.4-dev > /dev/null COPY --from=composer/composer:latest-bin --link /composer /usr/local/bin/composer -COPY --link deploy/conf/* /etc/php/8.3/fpm/ +COPY --link deploy/conf/* /etc/php/8.4/fpm/ WORKDIR /symfony COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --no-scripts --quiet 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.3/fpm/php.ini +RUN echo "opcache.preload=/symfony/var/cache/prod/App_KernelProdContainer.preload.php" >> /etc/php/8.4/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.3/fpm/php-fpm.conf +# RUN echo "catch_workers_output = yes" >> /etc/php/8.4/fpm/php-fpm.conf RUN mkdir -p /run/php -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /symfony/deploy/nginx.conf \ No newline at end of file diff --git a/frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile b/frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile index 47da95aeff8..ee3a1c88326 100644 --- a/frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-ngx-micro.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -8,14 +8,14 @@ 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 \ + zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \ 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 ./ ./ +COPY ./ ./ -ENV NGINX_VERSION=1.25.3 +ENV NGINX_VERSION=1.27.3 RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null diff --git a/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile b/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile index 81109dc94fb..582c7f402fd 100644 --- a/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-ngx-raw.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -8,14 +8,14 @@ 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 \ + zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \ 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 ./ ./ +COPY ./ ./ -ENV NGINX_VERSION=1.25.3 +ENV NGINX_VERSION=1.27.3 RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null diff --git a/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile b/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile index 014e12b9415..58cf9c98fe9 100644 --- a/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-ngx.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive @@ -8,14 +8,14 @@ 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 \ + zlib1g-dev libpcre3-dev libargon2-dev libsodium-dev \ 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 ./ ./ +COPY ./ ./ -ENV NGINX_VERSION=1.25.3 +ENV NGINX_VERSION=1.27.3 RUN git clone -b v0.0.28 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null diff --git a/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile b/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile index 7a99706faaf..94bb6c98809 100644 --- a/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-swoole-mysql.dockerfile @@ -1,11 +1,11 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN docker-php-ext-install pcntl opcache > /dev/null COPY deploy/conf/php-async.ini /usr/local/etc/php/php.ini WORKDIR /ubiquity -ADD --link . . +COPY --link . . RUN chmod -R 777 /ubiquity diff --git a/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile b/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile index d4807c4a8ad..4f37f5f954f 100644 --- a/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-swoole.dockerfile @@ -1,4 +1,4 @@ -FROM phpswoole/swoole:5.1.3-php8.3 +FROM phpswoole/swoole:php8.4 RUN apt-get install -y libpq-dev \ && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \ @@ -7,7 +7,7 @@ RUN apt-get install -y libpq-dev \ COPY deploy/conf/php-async.ini /usr/local/etc/php/php.ini WORKDIR /ubiquity -ADD --link . . +COPY --link . . RUN chmod -R 777 /ubiquity diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile index f27f630c898..a797a6a6da3 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman-mysql.dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.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.3-cli php8.3-mysql php8.3-xml php8.3-mbstring > /dev/null + apt-get install -yqq git php8.4-cli php8.4-mysql php8.4-xml php8.4-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.4/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.3/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.4/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.4/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile index da49301a7e2..ead124fa0b1 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman-raw.dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.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.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null + apt-get install -yqq git php8.4-cli php8.4-pgsql php8.4-xml php8.4-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.4/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.3/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.4/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.4/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile b/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile index d98b0f46ae4..379edd9cdd8 100644 --- a/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity-workerman.dockerfile @@ -1,18 +1,18 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.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.3-cli php8.3-pgsql php8.3-xml php8.3-mbstring > /dev/null + apt-get install -yqq git php8.4-cli php8.4-pgsql php8.4-xml php8.4-mbstring > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/php-async.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/php-async.ini /etc/php/8.4/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.3/cli/php.ini -RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.3/cli/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php\n" >> /etc/php/8.4/cli/php.ini +RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.4/cli/php.ini EXPOSE 8080 diff --git a/frameworks/PHP/ubiquity/ubiquity.dockerfile b/frameworks/PHP/ubiquity/ubiquity.dockerfile index 239d849f9b4..f757732149c 100644 --- a/frameworks/PHP/ubiquity/ubiquity.dockerfile +++ b/frameworks/PHP/ubiquity/ubiquity.dockerfile @@ -1,20 +1,20 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-dev > /dev/null + apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql php8.4-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/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.3/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.4/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.3/fpm/php.ini +RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.4/fpm/php.ini EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-fpm start && \ nginx -c /ubiquity/deploy/nginx.conf -g "daemon off;" diff --git a/frameworks/PHP/yii2/composer.json b/frameworks/PHP/yii2/composer.json index 695b189d305..03260f5041e 100755 --- a/frameworks/PHP/yii2/composer.json +++ b/frameworks/PHP/yii2/composer.json @@ -2,7 +2,7 @@ "require": { "yidas/yii2-composer-bower-skip": "~2.0.13", "yiisoft/yii2": "~2.0.49", - "joanhey/adapterman": "^0.6" + "joanhey/adapterman": "^0.7" }, "config": { "allow-plugins": { diff --git a/frameworks/PHP/yii2/deploy/conf/cli-php.ini b/frameworks/PHP/yii2/deploy/conf/cli-php.ini index ea3b9e510ae..82a3aec2efa 100644 --- a/frameworks/PHP/yii2/deploy/conf/cli-php.ini +++ b/frameworks/PHP/yii2/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,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 +disable_functions=header,header_remove,headers_sent,headers_list,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,session_unset,session_get_cookie_params,session_set_cookie_params,set_time_limit diff --git a/frameworks/PHP/yii2/yii2-raw.dockerfile b/frameworks/PHP/yii2/yii2-raw.dockerfile index b7af0a36511..cfb0bf78a38 100644 --- a/frameworks/PHP/yii2/yii2-raw.dockerfile +++ b/frameworks/PHP/yii2/yii2-raw.dockerfile @@ -1,24 +1,24 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null + apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /yii2 WORKDIR /yii2 +COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-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 48c840c6f69..481276b13ca 100644 --- a/frameworks/PHP/yii2/yii2-workerman.dockerfile +++ b/frameworks/PHP/yii2/yii2-workerman.dockerfile @@ -1,21 +1,21 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3-cli php8.3-mysql php8.3-mbstring php8.3-xml > /dev/null + apt-get install -yqq git php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -RUN apt-get install -y php-pear php8.3-dev libevent-dev > /dev/null -RUN pecl install event-3.1.3 > /dev/null && echo "extension=event.so" > /etc/php/8.3/cli/conf.d/event.ini +RUN apt-get install -y php-pear php8.4-dev libevent-dev > /dev/null +RUN pecl install event-3.1.4 > /dev/null && echo "extension=event.so" > /etc/php/8.4/cli/conf.d/event.ini -COPY deploy/conf/cli-php.ini /etc/php/8.3/cli/php.ini +COPY deploy/conf/cli-php.ini /etc/php/8.4/cli/php.ini -ADD ./ /yii2 WORKDIR /yii2 +COPY --link . . RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet diff --git a/frameworks/PHP/yii2/yii2.dockerfile b/frameworks/PHP/yii2/yii2.dockerfile index b7af0a36511..cfb0bf78a38 100644 --- a/frameworks/PHP/yii2/yii2.dockerfile +++ b/frameworks/PHP/yii2/yii2.dockerfile @@ -1,24 +1,24 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.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.3 php8.3-common php8.3-cli php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-dev > /dev/null + apt-get install -yqq nginx git unzip php8.4 php8.4-common php8.4-cli php8.4-fpm php8.4-mysql php8.4-mbstring php8.4-dev > /dev/null COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer -COPY deploy/conf/* /etc/php/8.3/fpm/ +COPY deploy/conf/* /etc/php/8.4/fpm/ -ADD ./ /yii2 WORKDIR /yii2 +COPY --link . . -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 if [ $(nproc) = 2 ]; then sed -i "s|pm.max_children = 1024|pm.max_children = 512|g" /etc/php/8.4/fpm/php-fpm.conf ; fi; RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet EXPOSE 8080 -CMD service php8.3-fpm start && \ +CMD service php8.4-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 c19884f9e1b..af1a30ef7dc 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/2017bddac17a838c9584763e4bd7538aa6f8a529 +URL=https://github.com/synopse/mORMot2/tarball/e5ece53ec4ac4788d356f17d2d32ea16379a65a9 #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 1f24df7173d..2ea5735327e 100644 --- a/frameworks/Pascal/mormot/src/raw.pas +++ b/frameworks/Pascal/mormot/src/raw.pas @@ -319,8 +319,7 @@ function TRawAsyncServer.json(ctxt: THttpServerRequest): cardinal; msgRec: TMessageRec; begin msgRec.message := pointer(HELLO_WORLD); - ctxt.SetOutJson(@msgRec, TypeInfo(TMessageRec)); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(@msgRec, TypeInfo(TMessageRec)); end; function TRawAsyncServer.db(ctxt: THttpServerRequest): cardinal; @@ -329,8 +328,7 @@ function TRawAsyncServer.db(ctxt: THttpServerRequest): cardinal; begin w := TOrmWorld.Create(fStore.Orm, ComputeRandomWorld(Lecuyer)); try - ctxt.SetOutJson(w); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(w); finally w.Free; end; @@ -346,9 +344,8 @@ function TRawAsyncServer.queries(ctxt: THttpServerRequest): cardinal; gen := Lecuyer; for i := 0 to length(res) - 1 do res[i] := TOrmWorld.Create(fStore.Orm, ComputeRandomWorld(gen)); - ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); + result := ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); ObjArrayClear(res); - result := HTTP_SUCCESS; end; function TRawAsyncServer.cached_queries(ctxt: THttpServerRequest): cardinal; @@ -361,8 +358,7 @@ function TRawAsyncServer.cached_queries(ctxt: THttpServerRequest): cardinal; gen := Lecuyer; for i := 0 to length(res) - 1 do res[i] := fOrmCache.Get(ComputeRandomWorld(gen)); - ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); end; function OrmFortuneCompareByMessage(const A, B): integer; @@ -436,9 +432,8 @@ function TRawAsyncServer.rawdb(ctxt: THttpServerRequest): cardinal; stmt.ExecutePrepared; if stmt.Step then begin - ctxt.SetOutJson( + result := ctxt.SetOutJson( '{"id":%,"randomNumber":%}', [stmt.ColumnInt(0), stmt.ColumnInt(1)]); - result := HTTP_SUCCESS; stmt.ReleaseRows; end; stmt := nil; @@ -450,8 +445,7 @@ function TRawAsyncServer.rawqueries(ctxt: THttpServerRequest): cardinal; begin if not GetRawRandomWorlds(GetQueriesParamValue(ctxt), res) then exit(HTTP_SERVERERROR); - ctxt.SetOutJson(@res, TypeInfo(TWorlds)); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(@res, TypeInfo(TWorlds)); end; function TRawAsyncServer.rawcached(ctxt: THttpServerRequest): cardinal; @@ -464,8 +458,7 @@ function TRawAsyncServer.rawcached(ctxt: THttpServerRequest): cardinal; gen := Lecuyer; for i := 0 to length(res) - 1 do res[i] := fRawCache[ComputeRandomWorld(gen) - 1]; - ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(@res, TypeInfo(TOrmWorlds)); end; function TRawAsyncServer.rawfortunes(ctxt: THttpServerRequest): cardinal; @@ -555,8 +548,7 @@ function TRawAsyncServer.rawupdates(ctxt: THttpServerRequest): cardinal; end; end; stmt.ExecutePrepared; - ctxt.SetOutJson(@res, TypeInfo(TWorlds)); - result := HTTP_SUCCESS; + result := ctxt.SetOutJson(@res, TypeInfo(TWorlds)); end; // asynchronous PostgreSQL pipelined DB access diff --git a/frameworks/Perl/feersum/README.md b/frameworks/Perl/feersum/README.md new file mode 100644 index 00000000000..a620bf8e9de --- /dev/null +++ b/frameworks/Perl/feersum/README.md @@ -0,0 +1,12 @@ +# About + +[Feersum](https://metacpan.org/dist/Feersum) - HTTP 1.0/1.1 handler for Perl based on +[EV](https://metacpan.org/dist/EV) and [picohttpparser](https://github.com/h2o/picohttpparser) + +# Requirements + +* Perl 5.40) +* [JSON::XS](https://metacpan.org/dist/JSON-XS) +* [DBI](https://metacpan.org/dist/DBI) +* [Text::Xslate](https://metacpan.org/dist/Text-Xslate) +* [LMDB](https://metacpan.org/dist/LMDB_File) diff --git a/frameworks/Perl/feersum/app.pl b/frameworks/Perl/feersum/app.pl new file mode 100644 index 00000000000..f826a2791a0 --- /dev/null +++ b/frameworks/Perl/feersum/app.pl @@ -0,0 +1,334 @@ +use v5.40; +use warnings; +use Feersum::Runner; +use EV; use AnyEvent; +use DBI 'SQL_INTEGER'; +use DBD::Pg ':async'; +use Scalar::Util 'weaken'; +use List::Util qw'min max pairmap'; +use JSON::XS; +use Text::Xslate; +use LMDB_File qw':flags :error'; + +use constant { + host_port => $ENV{host_port} || '0.0.0.0:8080', + debug => $ENV{debug} // 0, + db => lc($ENV{db} || 'postgres'), # postgres / mysql / maria (will use for constant folding) + db_name => $ENV{db_name} || 'hello_world', + db_host => $ENV{db_host} || 'tfb-database', + db_port => $ENV{db_port}, + db_user => $ENV{db_user} || 'benchmarkdbuser', + db_pass => $ENV{db_pass} || 'benchmarkdbpass', + empty => [], o => +{}, + reconnect_interval => 60, + max_db_connections => 512, + max_update_tries => 3 +}; +use constant max_batch_update_size => 1; # db eq 'postgres' ? 5 : 10; # rule of thumb +use constant server => qw'Server Feersum'; +use constant { + text => [server, qw'Content-Type text/plain'], + json => [server, qw'Content-Type application/json'], + html => [server, 'Content-Type', 'text/html; charset=utf-8'], + nocontent => [server], +}; + +my @dsn = ( + (sprintf 'dbi:%s:port=%d;host=%s;database=%s;', + (db eq 'mysql' ? ('mysql', db_port // 3306) : + db eq 'maria' ? ('MariaDB', db_port // 3306) : + db eq 'postgres' ? ('Pg', db_port // 5432) + : die 'unknown db'), db_host, db_name), + db_user, db_pass, + +{qw'AutoCommit 1 RaiseError 0 PrintError 1', + (db eq 'maria' ? (qw'mariadb_server_prepare 1 mariadb_ssl 0') : + db eq 'mysql' ? (qw'mysql_server_prepare 1 mysql_ssl 0 mysql_get_server_pubkey 1') : + db eq 'postgres' ? (qw'pg_server_prepare 1 sslmode 0') : ())} +); + +chomp(my $cpus = `nproc`); +say "$cpus cpus available" if debug; +my $pool_size = int max_db_connections / $cpus; # number of db connections in each worker +my $js = JSON::XS->new; + +my $html = render(); +cache('init'); + +my %prepare = ( + world => ['select randomNumber, id from World where id = ?', SQL_INTEGER], + fortune => ['select id, message from Fortune'], + update1 => ['update World set randomNumber = ? where id = ?', (SQL_INTEGER) x 2], + (map { + 'update'.$_ => + [sprintf( + (db eq 'mysql' || db eq 'maria') ? 'with t(v,i) as (values %s) update World w join t on t.i = w.id set w.randomNumber = t.v' : + db eq 'postgres' ? 'with t(v,i) as (values %s) update World w set randomNumber = t.v from t where t.i = w.id' : undef, + (join ',', ((db eq 'mysql' || db eq 'maria') ? 'row(?,?)' : '(?,?)') x $_) + ), (SQL_INTEGER) x ($_ * 2)] + } 2..max_batch_update_size) +); + +my ($pool, $cache); +my $w = EV::fork sub { # child init + $pool = db_pool($pool_size, \@dsn, \%prepare); # db connection pool in each worker + $cache = cache('use'); # cache +}; + +my %route = controllers(); + +my $runner = Feersum::Runner->new( + pre_fork => $cpus, + quiet => !debug, keepalive => 1, + max_connection_reqs => 1000, + read_timeout => 60, + listen => [host_port] +)->run(sub ($h) { ($route{$h->path} // $route{404})->($h) }); + +sub controllers {( + '/plaintext', sub ($h) { $h->send_response(200, text, \'Hello, World!') }, + '/json', sub ($h) { $h->send_response(200, json, \$js->encode(+{ message => 'Hello, World!' })) }, + (map +('/db', $_, '/queries', $_, '/updates', $_ ), sub ($h) { + my ($n) = (my $q = $h->query // '') =~ m/queries=(\d+)/a; + $n = max(1, min($n//1, 500)); + my ($cv, @rs) = (AE::cv); + my $on_done = sub { $h->send_response(200, json, \$js->encode($q ? \@rs : ($rs[0] // o))) }; + $cv->begin( + $h->path ne '/updates' + ? $on_done # select + : sub { # update + if (@rs) { + my ($i, $j) = (0, 0); + my $cv = AE::cv; + $cv->begin($on_done); + while () { + $j = min($i + max_batch_update_size - 1, $#rs); + say "$i $j" if debug; + $cv->begin; + $_->{randomNumber} = int(rand 10000) + 1 for @rs[$i..$j]; + my $tries = max_update_tries; + my $st = 'update'.($j - $i + 1); + my $args = [map @$_{qw/randomNumber id/}, @rs[$i..$j]]; + my $update = sub ($rv = undef, $sth_or_e = undef) { + $cv->end, return if $rv; + say 'retryin update on '.$sth_or_e if $tries < max_update_tries; + say 'fail to update on '.max_update_tries.' tries ' and $cv->end unless $tries--; + db_execute($pool, $st, $args, __SUB__); + }; + $update->(); + $i += max_batch_update_size; + last if $i >= @rs; + } + $cv->end; + } else { $on_done->() } + } + ); + for (1..$n) { + my $id = int(rand 10000) + 1; + $cv->begin; + db_execute($pool, world => [$id], sub ($rows, $sth) { + push @rs, @{$sth->fetchall_arrayref(+{ randomNumber => 1, id => 1 })} if $rows > 0; + $cv->end + }); + } + $cv->end + }), + '/fortunes' => sub ($h) { + db_execute($pool, fortune => empty, sub ($rows, $sth) { + $h->send_response(200, html, \$html->render('fortune.tx', +{ rows => [ + sort { $a->[1] cmp $b->[1] } + @{$sth->fetchall_arrayref}, + [0, 'Additional fortune added at request time.'] + ]})) + }); + }, + '/cached-queries' => sub ($h) { + my ($n) = (my $q = $h->query // '') =~ m/count=(\d+)/a; + $n = max(1, min($n//1, 500)); + my @rs = map +{ id => $_ , randomNumber => $cache->($_) }, map int(rand 10000) + 1, 1..$n; + $h->send_response(200, json, \$js->encode(\@rs)); + }, + '/' => sub ($h) { $h->send_response(204, nocontent, empty) }, + 404 => sub ($h) { $h->send_response(404, nocontent, empty) } +)} + +sub render { + my $t = Text::Xslate->new(path => +{ + (my $file = 'fortune.tx') => <<~\html =~ s/(?<=[\r\n])\s+//sgr + + + Fortunes + + + + : for $rows -> $i { + + : } +
idmessage
<: $i.0 :><: $i.1 :>
+ + + html + }); + $t->load_file($file); + $t +} + +sub cache ($type = 'init') { + my $path = '/dev/shm/feersum'; + say "clearing $path" and unlink glob "$path*" if $type eq 'init' && -e $path; + my $env = LMDB::Env->new($path, +{ + mapsize => 1024*512, + flags => MDB_WRITEMAP|MDB_NOSYNC|MDB_NOMETASYNC|MDB_NOTLS|MDB_NOSUBDIR|MDB_NORDAHEAD + }) or die $LMDB_File::last_err; + if ($type eq 'init') { + die unless defined(my $tx = $env->BeginTxn); + my $handle = $tx->open(undef, MDB_CREATE|MDB_INTEGERKEY); + my $dbh = DBI->connect(@dsn); + $tx->put($handle, $_->[0], pack S => $_->[1]) for @{$dbh->selectall_arrayref('select id, randomNumber from World')}; + $tx->commit; + $dbh->disconnect; + say 'cache populated' if debug; + return; + } + my $tx = $env->BeginTxn(MDB_RDONLY); + my $handle = $tx->open(undef, MDB_INTEGERKEY); + sub ($k) { $tx->renew; $tx->get($handle, $k, my $v); unpack S => $v } +} + +sub db_pool ($size, $dsn, $prepare = undef) { + my %pool = (slot => [], active => +{}, free => [], pending => [], prepare => $prepare); + db_connect(\%pool, $_, $dsn) for 0 .. $size - 1; + \%pool +} + +sub db_connect ($pool, $id, $dsn) { + say "db[$id] connection.." if debug; + my $dbh = DBI->connect(@$dsn); + unless ($dbh) { + warn sprintf 'err: %s. will try reconnect %d sec', $DBI::errstr, reconnect_interval; + $pool->{slot}[$id] = AE::timer +reconnect_interval, 0, sub { db_connect($pool, $id, $dsn) }; # try later + return + } + my $fd = db eq 'maria' ? $dbh->mariadb_sockfd : db eq 'mysql' ? $dbh->mysql_fd : db eq 'postgres' ? $dbh->{pg_socket} : undef; + open my $fh, "<&=", $fd or die $!; # dup handle + state $st_opt = +{ + db eq 'maria' ? (mariadb_async => 1) : + db eq 'mysql' ? (async => 1) : + db eq 'postgres' ? (pg_async => PG_ASYNC + PG_OLDQUERY_CANCEL) : () + }; + my %conn = ( + id => $id, db => $dbh, fd => $fd, fh => $fh, dsn => $dsn, + st => +{ $pool->{prepare} ? (pairmap { + my $sth = $dbh->prepare($b->[0], $st_opt); + $sth->bind_param($_, undef, $b->[$_]) for 1..$#$b; + ($a, $sth) + } %{$pool->{prepare}}) : () }, + connected => 1, + ); + $conn{w} = EV::io $fh, EV::READ, sub { + my $e; + { ; + $e = 'inactive', last unless defined(my $st = $conn{active}); + if ($st) { # executed st + $e = 'nost', last unless my $sth = $conn{st}{$st}; + $e = 'unready', last unless + db eq 'maria' ? $sth->mariadb_async_ready : + db eq 'mysql' ? $sth->mysql_async_ready : + db eq 'postgres' ? $sth->pg_ready : undef; + $e = 'noresult', $sth->finish unless defined( + my $rows = + db eq 'maria' ? $sth->mariadb_async_result : + db eq 'mysql' ? $sth->mysql_async_result : + db eq 'postgres' ? $sth->pg_result : undef + ); + say "db[$id $fd] calling cb: ".$st if debug; + if (my $cb = $conn{cb}) { $cb->($rows, $e // $sth) } + else { say "db[$id $fd] no handler for response with $rows rows" } + $sth->finish unless $e; + } else { # db do + $e = 'nodb', last unless my $dbh = $conn{db}; + $e = 'unready', last unless + db eq 'maria' ? $dbh->mariadb_async_ready : + db eq 'mysql' ? $dbh->mysql_async_ready : + db eq 'postgres' ? $dbh->pg_ready : undef; + $e = 'noresult' unless defined( + my $rv = + db eq 'maria' ? $dbh->mariadb_async_result : + db eq 'mysql' ? $dbh->mysql_async_result : + db eq 'postgres' ? $dbh->pg_result : undef + ); + say "db[$id $fd] calling cb: db do query" if debug; + if (my $cb = $conn{cb}) { $cb->($rv, $e) } + else { say "db[$id $fd] no handler response with $rv return" } + } + say "db[$id $fd] error: $e " if debug && $e; + say "db[$id $fd] finish" if debug; + delete $conn{active}; + delete $pool->{active}{$id}; + push @{$pool->{free}}, \%conn; + if (defined(my $pending = shift @{$pool->{pending}})) { + my $code = shift @$pending; + $code->($pool, splice @$pending) + } + return + } + say "db[$id $fd] $e" if debug; + if (eof($fh) || (my $inactive = $e eq 'inactive')) { + say "db[$id $fd] disconnected" if debug; + delete @conn{qw/w connected/}; + $conn{db}->disconnect if $inactive; + $conn{cb}->(-1, undef) if $conn{st} && $conn{active} && $conn{cb}; + db_connect($pool, $id, $dsn); # reconnect + } else { + say "db[$id $fd] stalled?"; + } + }; + say "db[$id $fd] connected" if debug; + $pool->{slot}[$id] = \%conn; + weaken(my $weak = $pool->{slot}[$id]); + push @{$pool->{free}}, $weak; + if (defined(my $pending = shift @{$pool->{pending}})) { + my $code = shift @$pending; + $code->($pool, splice @$pending) + } +} + +sub db_execute ($pool, $st, $args, $cb) { + say 'db executing..' if debug; + while (my $conn = shift @{$pool->{free}}) { + (debug and say 'skip unconnected'), next unless defined($conn) && $conn->{connected}; + say 'on connection..'.$conn->{id} if debug; + if ($conn->{st}{$st}->execute(@$args)) { + (@$conn{qw/cb active/}, $pool->{active}{$conn->{id}}) = ($cb, $st, 1); + return; + } else { + say 'error: ', $conn->{st}{$st}->errstr; + db_connect($pool, @$conn{qw/id dsn/}); # reconnect + next; + } + } + say '..put to pending..' if debug; + push @{$pool->{pending}}, [__SUB__, $st, $args, $cb]; +} + +sub db_do ($pool, $query, $args, $cb) { + say 'db doing..' if debug; + state $db_opt = +{ + db eq 'maria' ? (mariadb_async => 1) : + db eq 'mysql' ? (async => 1) : + db eq 'postgres' ? (pg_async => PG_ASYNC + PG_OLDQUERY_CANCEL) : () + }; + while (my $conn = shift @{$pool->{free}}) { + (debug and say 'skip unconnected'), next unless defined($conn) && $conn->{connected}; + say 'on connection..'.$conn->{id} if debug; + if ($conn->{db}->do($query, $db_opt, defined($args) ? @$args : ())) { + (@$conn{qw/cb active/}, $pool->{active}{$conn->{id}}) = ($cb, 0, 1); + return; + } else { + say 'error: ', $conn->{db}->errstr; + db_connect($pool, @$conn{qw/id dsn/}); # reconnect + next; + } + } + say '..put to pending..' if debug; + push @{$pool->{pending}}, [__SUB__, $query, $args, $cb]; +} diff --git a/frameworks/Perl/feersum/benchmark_config.json b/frameworks/Perl/feersum/benchmark_config.json new file mode 100644 index 00000000000..84e75044bd2 --- /dev/null +++ b/frameworks/Perl/feersum/benchmark_config.json @@ -0,0 +1,56 @@ +{ + "framework": "feersum", + "maintainers": ["vividsnow"], + "tests": [{ + "default": { + "dockerfile": "feersum.dockerfile", + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "cached_query_url": "/cached-queries?count=", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "Postgres", + "database_os": "Linux", + "framework": "feersum", + "language": "Perl", + "flavor": "None", + "orm": "Raw", + "platform": "None", + "webserver": "feersum", + "os": "Linux", + "database_os": "Linux", + "display_name": "feersum", + "notes": "" + }, + "mysql": { + "dockerfile": "feersum.dockerfile", + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "cached_query_url": "/cached-queries?count=", + "port": 8080, + "approach": "Realistic", + "classification": "Platform", + "database": "MySQL", + "database_os": "Linux", + "framework": "feersum", + "language": "Perl", + "flavor": "None", + "orm": "Raw", + "platform": "None", + "webserver": "feersum", + "os": "Linux", + "database_os": "Linux", + "display_name": "feersum", + "notes": "" + } + }] +} diff --git a/frameworks/Perl/feersum/cpanfile b/frameworks/Perl/feersum/cpanfile new file mode 100644 index 00000000000..9b868f48ffe --- /dev/null +++ b/frameworks/Perl/feersum/cpanfile @@ -0,0 +1,8 @@ +requires 'Feersum', '== 1.503'; +requires 'JSON::XS', '== 4.03'; +requires 'DBD::MariaDB', '== 1.23'; +requires 'DBD::Pg', '== 3.18.0'; +requires 'AnyEvent', '== 7.17'; +requires 'Async::Interrupt', '== 1.26'; +requires 'Text::Xslate', '== v3.5.9'; +requires 'LMDB_File', '== 0.13'; diff --git a/frameworks/Perl/feersum/cpanfile_alt b/frameworks/Perl/feersum/cpanfile_alt new file mode 100644 index 00000000000..7b26f606c2d --- /dev/null +++ b/frameworks/Perl/feersum/cpanfile_alt @@ -0,0 +1 @@ +requires 'DBD::mysql', '== 5.009'; diff --git a/frameworks/Perl/feersum/feersum.dockerfile b/frameworks/Perl/feersum/feersum.dockerfile new file mode 100644 index 00000000000..ed8865deb4f --- /dev/null +++ b/frameworks/Perl/feersum/feersum.dockerfile @@ -0,0 +1,28 @@ +from perl:5.40-slim +run apt-get update +run apt-get install -y --no-install-recommends --no-install-suggests catatonit libmariadb-dev libpq-dev libev-dev liblmdb-dev build-essential curl gnupg +run curl -fsSL https://raw.githubusercontent.com/skaji/cpm/main/cpm | perl - install -g App::cpm +workdir /app +add cpanfile . +run cpm install -g + +run curl https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 -o /etc/apt/trusted.gpg.d/mysql2023 +run gpg --dearmor /etc/apt/trusted.gpg.d/mysql2023 +run rm /etc/apt/trusted.gpg.d/mysql2023 +run echo 'deb http://repo.mysql.com/apt/debian bookworm mysql-innovation' > /etc/apt/sources.list.d/mysql.list +run apt-get update +run apt-get install -y --no-install-recommends --no-install-suggests libmysqlclient-dev +add cpanfile_alt . +run cpm install -g --cpanfile=cpanfile_alt + +run apt-get clean +run rm -rf $HOME/.perl-cpm +add app.pl . +expose 8080 + +arg TFB_TEST_DATABASE +env db=$TFB_TEST_DATABASE + +stopsignal SIGKILL + +cmd perl app.pl diff --git a/frameworks/Ruby/agoo/agoo.dockerfile b/frameworks/Ruby/agoo/agoo.dockerfile index c8c08141281..39047b6c150 100644 --- a/frameworks/Ruby/agoo/agoo.dockerfile +++ b/frameworks/Ruby/agoo/agoo.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 RUN apt-get update -q \ && apt-get install --no-install-recommends -q -y \ diff --git a/frameworks/Ruby/rack-sequel/README.md b/frameworks/Ruby/rack-sequel/README.md index b3a02d90b91..7208afbae55 100644 --- a/frameworks/Ruby/rack-sequel/README.md +++ b/frameworks/Ruby/rack-sequel/README.md @@ -12,7 +12,7 @@ a variety of web platforms. The tests will be run with: -* [Ruby 3.3](http://www.ruby-lang.org) +* [Ruby 3.4](http://www.ruby-lang.org) * [Puma 6](http://puma.io) * [Passenger 6](https://www.phusionpassenger.com) * [Unicorn 5](https://bogomips.org/unicorn/) diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile index d451ea776d6..9b862f3f239 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.4-rc +FROM ruby:3.4 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 c201cad91e1..b8352b5dcdc 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.4-rc +FROM ruby:3.4 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 35cc8145a10..ba8425fd1bc 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.4-rc +FROM ruby:3.4 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile index f0ab2e5981b..26018f4bc3a 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.4-rc +FROM ruby:3.4 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 f8385fbb8df..c602df71030 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.4-rc +FROM ruby:3.4 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile index b83995deda1..d283076458f 100644 --- a/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile +++ b/frameworks/Ruby/rack-sequel/rack-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ADD ./ /rack-sequel diff --git a/frameworks/Ruby/rack/Gemfile b/frameworks/Ruby/rack/Gemfile index 5b34822d7e0..83ef0486ea3 100644 --- a/frameworks/Ruby/rack/Gemfile +++ b/frameworks/Ruby/rack/Gemfile @@ -11,19 +11,23 @@ gem 'sequel' gem 'sequel_pg', platforms: %i[ruby mswin] gem 'tzinfo-data', '1.2023.3' -group :falcon do +group :falcon, optional: true do gem 'falcon', '~> 0.47', platforms: %i[ruby mswin] end -group :puma do +group :iodine, optional: true do + gem 'iodine', '~> 0.7', platforms: %i[ruby mswin] +end + +group :puma, optional: true do gem 'puma', '~> 6.4' end -group :unicorn do +group :unicorn, optional: true do gem 'unicorn', '~> 6.1', platforms: %i[ruby mswin] end -group :development do +group :development, optional: true do gem 'rack-test' gem 'rubocop', platforms: %i[ruby mswin] end diff --git a/frameworks/Ruby/rack/Gemfile.lock b/frameworks/Ruby/rack/Gemfile.lock index 0c5027553b4..e15a39ea4cf 100644 --- a/frameworks/Ruby/rack/Gemfile.lock +++ b/frameworks/Ruby/rack/Gemfile.lock @@ -53,6 +53,7 @@ GEM io-endpoint (0.14.0) io-event (1.7.3) io-stream (0.6.1) + iodine (0.7.58) json (2.9.1) kgio (2.11.4) language_server-protocol (3.17.0.3) @@ -127,6 +128,7 @@ PLATFORMS DEPENDENCIES connection_pool (~> 2.4) falcon (~> 0.47) + iodine (~> 0.7) jdbc-postgres (~> 42.2) json (~> 2.8) pg (~> 1.5) diff --git a/frameworks/Ruby/rack/README.md b/frameworks/Ruby/rack/README.md index 1f4c0a3ad45..65783108d2e 100644 --- a/frameworks/Ruby/rack/README.md +++ b/frameworks/Ruby/rack/README.md @@ -11,16 +11,16 @@ comparing a variety of web servers. ## Infrastructure Software Versions The tests were run with: -* [Ruby 3.3](http://www.ruby-lang.org/) +* [Ruby 3.4](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/) -* [Puma 6.2.1](http://puma.io/) -* [Falcon 0.42.3](https://github.com/socketry/falcon) +* [Puma 6.4](http://puma.io/) +* [Iodine](https://github.com/boazsegev/iodine) +* [Falcon](https://github.com/socketry/falcon) * [Sequel 5.68.0](https://sequel.jeremyevans.net/) - ## Paths & Source for Tests * Routing and controller logic is in hello_world.rb diff --git a/frameworks/Ruby/rack/benchmark_config.json b/frameworks/Ruby/rack/benchmark_config.json index 8e2f5884387..97227d81e36 100644 --- a/frameworks/Ruby/rack/benchmark_config.json +++ b/frameworks/Ruby/rack/benchmark_config.json @@ -23,6 +23,27 @@ "display_name": "rack-puma-mri-sequel-raw", "notes": "" }, + "iodine": { + "json_url": "/json", + "plaintext_url": "/plaintext", + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Stripped", + "classification": "Micro", + "orm": "raw", + "database": "Postgres", + "framework": "rack", + "language": "Ruby", + "platform": "Mri", + "webserver": "Iodine", + "os": "Linux", + "database_os": "Linux", + "display_name": "rack-iodine-mri-sequel-raw", + "notes": "" + }, "unicorn": { "json_url": "/json", "plaintext_url": "/plaintext", diff --git a/frameworks/Ruby/rack/hello_world.rb b/frameworks/Ruby/rack/hello_world.rb index f2884f3ad1b..ec6655c2f2c 100644 --- a/frameworks/Ruby/rack/hello_world.rb +++ b/frameworks/Ruby/rack/hello_world.rb @@ -29,6 +29,8 @@ class HelloWorld 'Passenger' elsif defined?(Puma) 'Puma' + elsif defined?(Iodine) + 'Iodine' elsif defined?(Unicorn) 'Unicorn' elsif defined?(Falcon) diff --git a/frameworks/Ruby/rack/rack-falcon.dockerfile b/frameworks/Ruby/rack/rack-falcon.dockerfile index f030cd54177..90abab433ad 100644 --- a/frameworks/Ruby/rack/rack-falcon.dockerfile +++ b/frameworks/Ruby/rack/rack-falcon.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -12,7 +12,7 @@ WORKDIR /rack COPY Gemfile ./ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -RUN bundle config set without 'development test puma unicorn' +RUN bundle config set with 'falcon' RUN bundle install --jobs=8 COPY . . diff --git a/frameworks/Ruby/rack/rack-iodine.dockerfile b/frameworks/Ruby/rack/rack-iodine.dockerfile new file mode 100644 index 00000000000..999eb9fc6e7 --- /dev/null +++ b/frameworks/Ruby/rack/rack-iodine.dockerfile @@ -0,0 +1,22 @@ +FROM ruby:3.4 + +ENV RUBY_YJIT_ENABLE=1 + +# Use Jemalloc +RUN apt-get update && \ + apt-get install -y --no-install-recommends libjemalloc2 +ENV LD_PRELOAD=libjemalloc.so.2 + +WORKDIR /rack + +COPY Gemfile ./ + +ENV BUNDLE_FORCE_RUBY_PLATFORM=true +RUN bundle config set with 'iodine' +RUN bundle install --jobs=8 + +COPY . . + +EXPOSE 8080 + +CMD bundle exec iodine -p 8080 diff --git a/frameworks/Ruby/rack/rack-jruby.dockerfile b/frameworks/Ruby/rack/rack-jruby.dockerfile index c280cca6ac8..f310f8cf62f 100644 --- a/frameworks/Ruby/rack/rack-jruby.dockerfile +++ b/frameworks/Ruby/rack/rack-jruby.dockerfile @@ -6,7 +6,7 @@ WORKDIR /rack COPY Gemfile ./ -RUN bundle config set without 'development test falcon unicorn' +RUN bundle config set with 'puma' RUN bundle install --jobs=8 COPY . . diff --git a/frameworks/Ruby/rack/rack-unicorn.dockerfile b/frameworks/Ruby/rack/rack-unicorn.dockerfile index 74b3e82041c..ed1df927dc1 100644 --- a/frameworks/Ruby/rack/rack-unicorn.dockerfile +++ b/frameworks/Ruby/rack/rack-unicorn.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -12,7 +12,7 @@ WORKDIR /rack COPY Gemfile ./ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -RUN bundle config set without 'development test falcon puma' +RUN bundle config set with 'unicorn' RUN bundle install --jobs=8 COPY . . diff --git a/frameworks/Ruby/rack/rack.dockerfile b/frameworks/Ruby/rack/rack.dockerfile index 615775cf9ea..0964890b059 100644 --- a/frameworks/Ruby/rack/rack.dockerfile +++ b/frameworks/Ruby/rack/rack.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 ENV RUBY_MN_THREADS=1 @@ -13,7 +13,7 @@ WORKDIR /rack COPY Gemfile ./ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -RUN bundle config set without 'development test falcon unicorn' +RUN bundle config set with 'puma' RUN bundle install --jobs=8 COPY . . diff --git a/frameworks/Ruby/rage/rage.dockerfile b/frameworks/Ruby/rage/rage.dockerfile index 6c65b51fba4..4cc3098ae77 100644 --- a/frameworks/Ruby/rage/rage.dockerfile +++ b/frameworks/Ruby/rage/rage.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 EXPOSE 8080 WORKDIR /rage diff --git a/frameworks/Ruby/rails/Gemfile b/frameworks/Ruby/rails/Gemfile index 9b7458ae417..0afad6b04cc 100644 --- a/frameworks/Ruby/rails/Gemfile +++ b/frameworks/Ruby/rails/Gemfile @@ -4,23 +4,27 @@ gem 'rails', '~> 8.0.0' gem 'redis', '~> 5.0' gem 'tzinfo-data' -group :mysql do +group :mysql, optional: true do gem 'trilogy', '~> 2.8.1' end -group :postgresql do +group :postgresql, optional: true do gem 'pg', '~> 1.5' end -group :falcon do - gem 'falcon', '~> 0.47', require: false +group :agoo, optional: true do + gem 'agoo', require: false + gem 'rackup' end -group :puma do - gem 'puma', '~> 6.4', require: false +group :iodine, optional: true do + gem 'iodine', '~> 0.7', require: false end -group :agoo do - gem 'agoo', require: false - gem 'rackup' +group :falcon, optional: true do + gem 'falcon', '~> 0.47', require: false +end + +group :puma, optional: true do + gem 'puma', '~> 6.4', require: false end diff --git a/frameworks/Ruby/rails/Gemfile.lock b/frameworks/Ruby/rails/Gemfile.lock index 8db47000927..18ecc70ac8e 100644 --- a/frameworks/Ruby/rails/Gemfile.lock +++ b/frameworks/Ruby/rails/Gemfile.lock @@ -136,6 +136,7 @@ GEM io-endpoint (0.14.0) io-event (1.7.3) io-stream (0.6.1) + iodine (0.7.58) irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) @@ -269,6 +270,7 @@ PLATFORMS DEPENDENCIES agoo falcon (~> 0.47) + iodine (~> 0.7) pg (~> 1.5) puma (~> 6.4) rackup diff --git a/frameworks/Ruby/rails/README.md b/frameworks/Ruby/rails/README.md index de1ba2aacf0..674c60b402f 100644 --- a/frameworks/Ruby/rails/README.md +++ b/frameworks/Ruby/rails/README.md @@ -12,9 +12,11 @@ comparing a variety of web platforms. The tests were run with: -- [Ruby 3.3](http://www.ruby-lang.org/) -- [Rails 7.2](http://rubyonrails.org/) +- [Ruby 3.4](http://www.ruby-lang.org/) +- [Rails 8.0](http://rubyonrails.org/) - [Puma 6.4](http://puma.io/) +- [Iodine](https://github.com/boazsegev/iodine) +- [Falcon](https://github.com/socketry/falcon) - [MySQL](https://dev.mysql.com/) - [PostgreSQL](https://www.postgresql.org/) - [Redis 6](https://redis.io) diff --git a/frameworks/Ruby/rails/app/controllers/hello_world_controller.rb b/frameworks/Ruby/rails/app/controllers/hello_world_controller.rb index bdd96953ce8..9e9ce8b8327 100644 --- a/frameworks/Ruby/rails/app/controllers/hello_world_controller.rb +++ b/frameworks/Ruby/rails/app/controllers/hello_world_controller.rb @@ -30,6 +30,7 @@ def fortune @fortunes = Fortune.all.to_a @fortunes << Fortune.new(id: 0, message: 'Additional fortune added at request time.') @fortunes.sort_by!(&:message) + render :fortune end def update diff --git a/frameworks/Ruby/rails/benchmark_config.json b/frameworks/Ruby/rails/benchmark_config.json index f663c793a3d..3571ea8ca5c 100644 --- a/frameworks/Ruby/rails/benchmark_config.json +++ b/frameworks/Ruby/rails/benchmark_config.json @@ -66,7 +66,30 @@ "database_os": "Linux", "display_name": "rails-falcon", "notes": "", - "versus": "rack-falcon-mri" + "versus": "rack-falcon-mri-sequel-raw" + }, + "iodine": { + "db_url": "/db", + "json_url": "/json", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "cached_query_url": "/cached?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Fullstack", + "database": "Postgres", + "framework": "rails", + "language": "Ruby", + "orm": "Full", + "platform": "Rack", + "webserver": "Iodine", + "os": "Linux", + "database_os": "Linux", + "display_name": "rails-iodine", + "notes": "", + "versus": "rack-iodine-mri-sequel-raw" }, "agoo": { "db_url": "/db", diff --git a/frameworks/Ruby/rails/config/application.rb b/frameworks/Ruby/rails/config/application.rb index 291c4f983ae..963357fb4e6 100644 --- a/frameworks/Ruby/rails/config/application.rb +++ b/frameworks/Ruby/rails/config/application.rb @@ -28,28 +28,22 @@ class Application < Rails::Application # Common ones are `templates`, `generators`, or `middleware`, for example. config.autoload_lib(ignore: %w[assets tasks]) - config.action_dispatch.default_headers.merge!('Server' => 'WebServer') + # Only use headers required by TechEmpower. + config.action_dispatch.default_headers = {'Server' => 'Rails'} + + config.api_only = true config.middleware.delete ActionDispatch::Callbacks - config.middleware.delete ActionDispatch::ContentSecurityPolicy::Middleware - config.middleware.delete ActionDispatch::Cookies config.middleware.delete ActionDispatch::DebugExceptions config.middleware.delete ActionDispatch::Executor - config.middleware.delete ActionDispatch::Flash - config.middleware.delete ActionDispatch::PermissionsPolicy::Middleware - config.middleware.delete ActionDispatch::Reloader config.middleware.delete ActionDispatch::RemoteIp config.middleware.delete ActionDispatch::RequestId - config.middleware.delete ActionDispatch::Session::CookieStore config.middleware.delete ActionDispatch::ShowExceptions - config.middleware.delete ActiveRecord::Migration::CheckPending config.middleware.delete Rack::ConditionalGet config.middleware.delete Rack::ETag config.middleware.delete Rack::Head - config.middleware.delete Rack::MethodOverride config.middleware.delete Rack::Runtime config.middleware.delete Rack::Sendfile - config.middleware.delete Rack::TempfileReaper config.middleware.delete Rails::Rack::Logger config.active_support.isolation_level = :fiber if defined?(Falcon) diff --git a/frameworks/Ruby/rails/config/initializers/filter_parameter_logging.rb b/frameworks/Ruby/rails/config/initializers/filter_parameter_logging.rb index c0b717f7ecb..e058dbb3656 100644 --- a/frameworks/Ruby/rails/config/initializers/filter_parameter_logging.rb +++ b/frameworks/Ruby/rails/config/initializers/filter_parameter_logging.rb @@ -3,6 +3,4 @@ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc -] +Rails.application.config.filter_parameters = [] diff --git a/frameworks/Ruby/rails/config/puma.rb b/frameworks/Ruby/rails/config/puma.rb index b513db258e6..7a8e1da62e5 100644 --- a/frameworks/Ruby/rails/config/puma.rb +++ b/frameworks/Ruby/rails/config/puma.rb @@ -30,9 +30,6 @@ # Specifies the `port` that Puma will listen on to receive requests; default is 3000. port ENV.fetch("PORT", 3000) -tuned_num_workers, tuned_num_threads = auto_tune -workers tuned_num_workers - # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart diff --git a/frameworks/Ruby/rails/rails-agoo.dockerfile b/frameworks/Ruby/rails/rails-agoo.dockerfile index 507077565bb..01254ad42b3 100644 --- a/frameworks/Ruby/rails/rails-agoo.dockerfile +++ b/frameworks/Ruby/rails/rails-agoo.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 COPY ./Gemfile* /rails/ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -ENV BUNDLE_WITHOUT=mysql:falcon:puma +ENV BUNDLE_WITH=postgresql:agoo RUN bundle install --jobs=8 COPY . /rails/ diff --git a/frameworks/Ruby/rails/rails-falcon.dockerfile b/frameworks/Ruby/rails/rails-falcon.dockerfile index 2e0c659e34b..7940230ea33 100644 --- a/frameworks/Ruby/rails/rails-falcon.dockerfile +++ b/frameworks/Ruby/rails/rails-falcon.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 COPY ./Gemfile* /rails/ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -ENV BUNDLE_WITHOUT=mysql:agoo:puma +ENV BUNDLE_WITH=postgresql:falcon RUN bundle install --jobs=8 COPY . /rails/ diff --git a/frameworks/Ruby/rails/rails-iodine.dockerfile b/frameworks/Ruby/rails/rails-iodine.dockerfile new file mode 100644 index 00000000000..ffa3b078dd0 --- /dev/null +++ b/frameworks/Ruby/rails/rails-iodine.dockerfile @@ -0,0 +1,27 @@ +FROM ruby:3.4 + +RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server + +EXPOSE 8080 +WORKDIR /rails + +# ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb + +# Use Jemalloc +RUN apt-get update && \ + apt-get install -y --no-install-recommends libjemalloc2 +ENV LD_PRELOAD=libjemalloc.so.2 + +COPY ./Gemfile* /rails/ + +ENV BUNDLE_FORCE_RUBY_PLATFORM=true +ENV BUNDLE_WITH=postgresql:iodine +RUN bundle install --jobs=8 + +COPY . /rails/ + +ENV RAILS_ENV=production_postgresql +ENV PORT=8080 +ENV REDIS_URL=redis://localhost:6379/0 +CMD service redis-server start && \ + bundle exec iodine diff --git a/frameworks/Ruby/rails/rails-mysql.dockerfile b/frameworks/Ruby/rails/rails-mysql.dockerfile index 9e7083a1f4d..dcea5fa9a56 100644 --- a/frameworks/Ruby/rails/rails-mysql.dockerfile +++ b/frameworks/Ruby/rails/rails-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server @@ -15,11 +15,12 @@ ENV LD_PRELOAD=libjemalloc.so.2 COPY ./Gemfile* /rails/ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -ENV BUNDLE_WITHOUT=postgresql:agoo:falcon +ENV BUNDLE_WITH=mysql:puma RUN bundle install --jobs=8 COPY . /rails/ +ENV WEB_CONCURRENCY=auto ENV RAILS_ENV=production_mysql ENV PORT=8080 ENV REDIS_URL=redis://localhost:6379/0 diff --git a/frameworks/Ruby/rails/rails.dockerfile b/frameworks/Ruby/rails/rails.dockerfile index 451a4e5bfac..e4288a62451 100644 --- a/frameworks/Ruby/rails/rails.dockerfile +++ b/frameworks/Ruby/rails/rails.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server @@ -15,11 +15,12 @@ ENV LD_PRELOAD=libjemalloc.so.2 COPY ./Gemfile* /rails/ ENV BUNDLE_FORCE_RUBY_PLATFORM=true -ENV BUNDLE_WITHOUT=mysql:agoo:falcon +ENV BUNDLE_WITH=postgresql:puma RUN bundle install --jobs=8 COPY . /rails/ +ENV WEB_CONCURRENCY=auto ENV RAILS_ENV=production_postgresql ENV PORT=8080 ENV REDIS_URL=redis://localhost:6379/0 diff --git a/frameworks/Ruby/roda-sequel/Gemfile b/frameworks/Ruby/roda-sequel/Gemfile index 73b6ee99edc..5e391a9907a 100644 --- a/frameworks/Ruby/roda-sequel/Gemfile +++ b/frameworks/Ruby/roda-sequel/Gemfile @@ -3,12 +3,9 @@ source "https://rubygems.org" gem 'base64' # required by passenger on Ruby 3.4 gem "erubi", "~> 1.12" gem "json", "~> 2.8" -gem "passenger", "~> 6.0", platforms: %i[ruby mswin], require: false -gem "puma", "~> 6.2", require: false gem "sequel", "~> 5.67" gem "roda", "~> 3.66" gem "tilt", "~> 2.1", require: "tilt/erb" -gem "unicorn", "~> 6.1", platforms: %i[ruby mswin], require: false group :mysql do gem "mysql2", "~> 0.5", platforms: %i[ruby mswin] @@ -18,3 +15,15 @@ group :postgresql do gem "pg", "~> 1.4", platforms: %i[ruby mswin] gem "sequel_pg", "~> 1.17", platforms: :ruby, require: false end + +group :iodine, optional: true do + gem "iodine", "~> 0.7", require: false +end + +group :puma, optional: true do + gem "puma", "~> 6.2", require: false +end + +group :unicorn, optional: true do + gem "unicorn", "~> 6.1", platforms: %i[ruby mswin], require: false +end diff --git a/frameworks/Ruby/roda-sequel/Gemfile.lock b/frameworks/Ruby/roda-sequel/Gemfile.lock index 63f88b647fa..4313d0850a9 100644 --- a/frameworks/Ruby/roda-sequel/Gemfile.lock +++ b/frameworks/Ruby/roda-sequel/Gemfile.lock @@ -8,19 +8,11 @@ GEM kgio (2.11.4) mysql2 (0.5.6) nio4r (2.7.4) - passenger (6.0.23) - rack (>= 1.6.13) - rackup - rake (>= 12.3.3) pg (1.5.8) puma (6.5.0) nio4r (~> 2.0) rack (3.1.8) - rackup (2.1.0) - rack (>= 3) - webrick (~> 1.8) raindrops (0.20.1) - rake (13.2.1) roda (3.85.0) rack sequel (5.85.0) @@ -32,7 +24,6 @@ GEM unicorn (6.1.0) kgio (~> 2.6) raindrops (~> 0.7) - webrick (1.8.2) PLATFORMS ruby @@ -43,7 +34,6 @@ DEPENDENCIES erubi (~> 1.12) json (~> 2.8) mysql2 (~> 0.5) - passenger (~> 6.0) pg (~> 1.4) puma (~> 6.2) roda (~> 3.66) diff --git a/frameworks/Ruby/roda-sequel/README.md b/frameworks/Ruby/roda-sequel/README.md index a409974a10f..19f16452518 100644 --- a/frameworks/Ruby/roda-sequel/README.md +++ b/frameworks/Ruby/roda-sequel/README.md @@ -12,10 +12,10 @@ comparing a variety of web platforms. The tests will be run with: -* [Ruby 3.3](http://www.ruby-lang.org) +* [Ruby 3.4](http://www.ruby-lang.org) * [Puma 6](http://puma.io) -* [Passenger 6](https://www.phusionpassenger.com) -* [Unicorn 5](https://bogomips.org/unicorn/) +* [Unicorn 6](https://bogomips.org/unicorn/) +* [Iodine](https://github.com/boazsegev/iodine) * [Roda 3](http://roda.jeremyevans.net) * [Sequel 5](http://sequel.jeremyevans.net) * [Erubi 1](https://github.com/jeremyevans/erubi) diff --git a/frameworks/Ruby/roda-sequel/benchmark_config.json b/frameworks/Ruby/roda-sequel/benchmark_config.json index 2ca8400a156..3108af70328 100644 --- a/frameworks/Ruby/roda-sequel/benchmark_config.json +++ b/frameworks/Ruby/roda-sequel/benchmark_config.json @@ -44,11 +44,13 @@ "versus": "rack-sequel-postgres-puma-mri", "notes": "" }, - "postgres-passenger-mri": { + "postgres-iodine-mri": { + "json_url": "/json", "db_url": "/db", "query_url": "/queries?queries=", "fortune_url": "/fortunes", "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", "port": 8080, "approach": "Realistic", "classification": "Micro", @@ -57,11 +59,11 @@ "language": "Ruby", "orm": "Full", "platform": "Rack", - "webserver": "Passenger", + "webserver": "Iodine", "os": "Linux", "database_os": "Linux", - "display_name": "roda-sequel-postgres-passenger-mri", - "versus": "rack-sequel-postgres-passenger-mri", + "display_name": "roda-sequel-postgres-iodine-mri", + "versus": "rack-sequel-postgres-iodine-mri", "notes": "" }, "postgres-unicorn-mri": { diff --git a/frameworks/Ruby/roda-sequel/boot.rb b/frameworks/Ruby/roda-sequel/boot.rb index 5d852e9e80c..bf22232abd7 100644 --- a/frameworks/Ruby/roda-sequel/boot.rb +++ b/frameworks/Ruby/roda-sequel/boot.rb @@ -9,15 +9,12 @@ SEQUEL_NO_ASSOCIATIONS = true SERVER_STRING = - if defined?(PhusionPassenger) - [ - PhusionPassenger::SharedConstants::SERVER_TOKEN_NAME, - PhusionPassenger::VERSION_STRING - ].join("/").freeze + if defined?(Iodine) + "Iodine" elsif defined?(Puma) - Puma::Const::PUMA_SERVER_STRING + "Puma" elsif defined?(Unicorn) - Unicorn::HttpParser::DEFAULTS["SERVER_SOFTWARE"] + "Unicorn" end Bundler.require(:default) # Load core modules @@ -48,7 +45,7 @@ def connect(dbtype) (threads = Puma.cli_config.options.fetch(:max_threads)) > 1 opts[:max_connections] = (2 * Math.log(threads)).floor opts[:pool_timeout] = 10 - else + elsif defined?(Unicorn) Sequel.single_threaded = true end diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-iodine-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-iodine-mri.dockerfile new file mode 100644 index 00000000000..05851b9f9f1 --- /dev/null +++ b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-iodine-mri.dockerfile @@ -0,0 +1,21 @@ +FROM ruby:3.4 + +ADD ./ /roda-sequel +WORKDIR /roda-sequel + +ENV RUBY_YJIT_ENABLE=1 + +# Use Jemalloc +RUN apt-get update && \ + apt-get install -y --no-install-recommends libjemalloc2 +ENV LD_PRELOAD=libjemalloc.so.2 + +ENV BUNDLE_FORCE_RUBY_PLATFORM=true +RUN bundle config set with 'iodine' +RUN bundle install --jobs=8 + +ENV DBTYPE=postgresql + +EXPOSE 8080 + +CMD bundle exec iodine -p 8080 diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile deleted file mode 100644 index e060497ea57..00000000000 --- a/frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM ruby:3.4-rc - -ADD ./ /roda-sequel -WORKDIR /roda-sequel - -ENV RUBY_YJIT_ENABLE=1 - -# Use Jemalloc -RUN apt-get update && \ - apt-get install -y --no-install-recommends libjemalloc2 -ENV LD_PRELOAD=libjemalloc.so.2 - -ENV BUNDLE_FORCE_RUBY_PLATFORM=true -RUN bundle install --jobs=8 - -# TODO: https://github.com/phusion/passenger/issues/1916 -ENV _PASSENGER_FORCE_HTTP_SESSION=true -ENV DBTYPE=postgresql - -RUN ruby -r /roda-sequel/config/auto_tune -e 'puts auto_tune.first' > instances - -EXPOSE 8080 - -CMD bundle exec passenger start --log-level 1 \ - --engine builtin --disable-turbocaching --disable-security-update-check \ - --spawn-method direct --max-pool-size $(cat instances) --min-instances $(cat instances) --max-request-queue-size 1024 \ - --address 0.0.0.0 --port 8080 --environment production 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 4865d5feebd..9e3156a0594 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.4-rc +FROM ruby:3.4 ADD ./ /roda-sequel WORKDIR /roda-sequel @@ -11,6 +11,7 @@ RUN apt-get update && \ ENV LD_PRELOAD=libjemalloc.so.2 ENV BUNDLE_FORCE_RUBY_PLATFORM=true +RUN bundle config set with 'unicorn' RUN bundle install --jobs=8 ENV DBTYPE=postgresql diff --git a/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile index d71a4b28a78..1aee2de12a7 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.4-rc +FROM ruby:3.4 ADD ./ /roda-sequel WORKDIR /roda-sequel @@ -11,6 +11,7 @@ RUN apt-get update && \ ENV LD_PRELOAD=libjemalloc.so.2 ENV BUNDLE_FORCE_RUBY_PLATFORM=true +RUN bundle config set with 'puma' RUN bundle install --jobs=8 ENV DBTYPE=postgresql diff --git a/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile index 382f31291a1..eba22e96477 100644 --- a/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile +++ b/frameworks/Ruby/roda-sequel/roda-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ADD ./ /roda-sequel WORKDIR /roda-sequel @@ -11,6 +11,7 @@ RUN apt-get update && \ ENV LD_PRELOAD=libjemalloc.so.2 ENV BUNDLE_FORCE_RUBY_PLATFORM=true +RUN bundle config set with 'puma' RUN bundle install --jobs=8 ENV DBTYPE=mysql diff --git a/frameworks/Ruby/sinatra-sequel/Gemfile b/frameworks/Ruby/sinatra-sequel/Gemfile index 23f21663480..3395ce7f853 100644 --- a/frameworks/Ruby/sinatra-sequel/Gemfile +++ b/frameworks/Ruby/sinatra-sequel/Gemfile @@ -4,23 +4,28 @@ gem 'json', '~> 2.8' gem 'sequel', '~> 5.0' gem 'sinatra', '~> 4.0', :require=>'sinatra/base' -group :mysql do +group :mysql, optional: true do gem 'mysql2', '~> 0.5', :platforms=>[:ruby, :mswin] end -group :postgresql do +group :postgresql, optional: true do gem 'pg', '~> 1.5', :platforms=>[:ruby, :mswin] gem 'sequel_pg', '~> 1.6', :platforms=>:ruby, :require=>false end -group :passenger do + +group :iodine, optional: true do + gem 'iodine', '~> 0.7', platforms: [:ruby, :mswin], require: false +end + +group :passenger, optional: true do gem 'passenger', '~> 6.0', platforms: [:ruby, :mswin], require: false end -group :puma do +group :puma, optional: true do gem 'puma', '~> 6.4', require: false end -group :unicorn do +group :unicorn, optional: true do gem 'unicorn', '~> 6.1', platforms: [:ruby, :mswin], require: false end diff --git a/frameworks/Ruby/sinatra-sequel/Gemfile.lock b/frameworks/Ruby/sinatra-sequel/Gemfile.lock index 8f868632e82..4f084bcd3b9 100644 --- a/frameworks/Ruby/sinatra-sequel/Gemfile.lock +++ b/frameworks/Ruby/sinatra-sequel/Gemfile.lock @@ -3,15 +3,16 @@ GEM specs: base64 (0.2.0) bigdecimal (3.1.8) - json (2.8.2) + iodine (0.7.58) + json (2.9.1) kgio (2.11.4) mustermann (3.0.3) ruby2_keywords (~> 0.0.1) mysql2 (0.5.6) nio4r (2.7.4) - passenger (6.0.23) + passenger (6.0.24) rack (>= 1.6.13) - rackup + rackup (>= 2.0.0) rake (>= 12.3.3) pg (1.5.8) puma (6.5.0) @@ -22,9 +23,8 @@ GEM rack (>= 3.0.0, < 4) rack-session (2.0.0) rack (>= 3.0.0) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) raindrops (0.20.1) rake (13.2.1) ruby2_keywords (0.0.5) @@ -43,13 +43,13 @@ GEM unicorn (6.1.0) kgio (~> 2.6) raindrops (~> 0.7) - webrick (1.8.2) PLATFORMS ruby x86_64-darwin-23 DEPENDENCIES + iodine (~> 0.7) json (~> 2.8) mysql2 (~> 0.5) passenger (~> 6.0) diff --git a/frameworks/Ruby/sinatra-sequel/README.md b/frameworks/Ruby/sinatra-sequel/README.md index 9f382526d82..5c150595ff9 100644 --- a/frameworks/Ruby/sinatra-sequel/README.md +++ b/frameworks/Ruby/sinatra-sequel/README.md @@ -12,7 +12,7 @@ comparing a variety of web platforms. The tests will be run with: -* [Ruby 3.3](http://www.ruby-lang.org) +* [Ruby 3.4](http://www.ruby-lang.org) * [JRuby 9.4](http://jruby.org) * [Puma 6](http://puma.io) * [Passenger 6](https://www.phusionpassenger.com) diff --git a/frameworks/Ruby/sinatra-sequel/benchmark_config.json b/frameworks/Ruby/sinatra-sequel/benchmark_config.json index 9a267813727..94ffb819bb1 100644 --- a/frameworks/Ruby/sinatra-sequel/benchmark_config.json +++ b/frameworks/Ruby/sinatra-sequel/benchmark_config.json @@ -42,6 +42,26 @@ "versus": "rack-sequel-postgres-puma-mri", "notes": "" }, + "postgres-iodine-mri": { + "db_url": "/db", + "query_url": "/queries?queries=", + "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "port": 8080, + "approach": "Realistic", + "classification": "Micro", + "database": "Postgres", + "framework": "sinatra", + "language": "Ruby", + "orm": "Full", + "platform": "Rack", + "webserver": "Iodine", + "os": "Linux", + "database_os": "Linux", + "display_name": "sinatra-sequel-postgres-iodine-mri", + "versus": "rack-sequel-postgres-iodine-mri", + "notes": "" + }, "postgres-passenger-mri": { "db_url": "/db", "query_url": "/queries?queries=", diff --git a/frameworks/Ruby/sinatra-sequel/boot.rb b/frameworks/Ruby/sinatra-sequel/boot.rb index 966bb4ed617..c86f4fb9f34 100644 --- a/frameworks/Ruby/sinatra-sequel/boot.rb +++ b/frameworks/Ruby/sinatra-sequel/boot.rb @@ -16,8 +16,8 @@ 'puma' elsif defined?(Unicorn) 'unicorn' - elsif defined?(Agoo) - 'agoo' + elsif defined?(Iodine) + 'iodine' end Bundler.require(:default) # Load core modules @@ -39,7 +39,7 @@ def connect(dbtype) elsif defined?(Puma) && (threads = Puma.cli_config.options.fetch(:max_threads)) > 1 opts[:max_connections] = (2 * Math.log(threads)).floor opts[:pool_timeout] = 10 - else + elsif defined?(Unicorn) || defined?(Passenger) Sequel.single_threaded = true end diff --git a/frameworks/Ruby/sinatra-sequel/hello_world.rb b/frameworks/Ruby/sinatra-sequel/hello_world.rb index 822ceb5979c..5a4630585f9 100644 --- a/frameworks/Ruby/sinatra-sequel/hello_world.rb +++ b/frameworks/Ruby/sinatra-sequel/hello_world.rb @@ -22,7 +22,7 @@ def bounded_queries def json(data) content_type :json - JSON.fast_generate(data) + data.to_json end # Return a random number between 1 and MAX_PK diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-iodine-mri.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-iodine-mri.dockerfile new file mode 100644 index 00000000000..3f1bfb24b79 --- /dev/null +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-iodine-mri.dockerfile @@ -0,0 +1,20 @@ +FROM ruby:3.4 + +ENV RUBY_YJIT_ENABLE=1 + +# Use Jemalloc +RUN apt-get update && \ + apt-get install -y --no-install-recommends libjemalloc2 +ENV LD_PRELOAD=libjemalloc.so.2 + +ADD ./ /sinatra-sequel +WORKDIR /sinatra-sequel + +ENV BUNDLE_WITH=postgresql:iodine +RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile + +ENV DBTYPE=postgresql + +EXPOSE 8080 + +CMD bundle exec iodine -p 8080 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 88f3d9dbfa3..1bb51a99587 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.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -10,7 +10,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 ADD ./ /sinatra-sequel WORKDIR /sinatra-sequel -ENV BUNDLE_WITHOUT=mysql:puma:unicorn +ENV BUNDLE_WITH=postgresql:passenger RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile # TODO: https://github.com/phusion/passenger/issues/1916 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 b23651b44fc..eb430e68f49 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.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -10,7 +10,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 ADD ./ /sinatra-sequel WORKDIR /sinatra-sequel -ENV BUNDLE_WITHOUT=mysql:passenger:puma +ENV BUNDLE_WITH=postgresql:unicorn RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile ENV DBTYPE=postgresql diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile index aff4f5d206a..4b2196eabd2 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.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -10,7 +10,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 ADD ./ /sinatra-sequel WORKDIR /sinatra-sequel -ENV BUNDLE_WITHOUT=mysql:passenger:unicorn +ENV BUNDLE_WITH=postgresql:puma RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile ENV DBTYPE=postgresql diff --git a/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile index d446161f602..5ba93d67b8c 100644 --- a/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile +++ b/frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 @@ -10,7 +10,7 @@ ENV LD_PRELOAD=libjemalloc.so.2 ADD ./ /sinatra-sequel WORKDIR /sinatra-sequel -ENV BUNDLE_WITHOUT=postgresql:passenger:unicorn +ENV BUNDLE_WITH=mysql:puma RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile ENV DBTYPE=mysql diff --git a/frameworks/Ruby/sinatra/README.md b/frameworks/Ruby/sinatra/README.md index e0f14b9a171..311b5d21a69 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](http://www.ruby-lang.org) +* [Ruby 3.4](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/hello_world.rb b/frameworks/Ruby/sinatra/hello_world.rb index dad43a41c20..1a6b2c55c4c 100644 --- a/frameworks/Ruby/sinatra/hello_world.rb +++ b/frameworks/Ruby/sinatra/hello_world.rb @@ -22,7 +22,7 @@ def bounded_queries def json(data) content_type :json - JSON.fast_generate(data) + data.to_json end # Return a random number between 1 and MAX_PK diff --git a/frameworks/Ruby/sinatra/sinatra-postgres-agoo-mri.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres-agoo-mri.dockerfile index c6f2f33c4a1..a612c06fc73 100644 --- a/frameworks/Ruby/sinatra/sinatra-postgres-agoo-mri.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-postgres-agoo-mri.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 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 78bbf09f2a6..b7860ac22f5 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.4-rc +FROM ruby:3.4 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 4ca88527522..4cc75bd9383 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.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile index 2162bc12caa..338fd9d04d4 100644 --- a/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra-postgres.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Ruby/sinatra/sinatra.dockerfile b/frameworks/Ruby/sinatra/sinatra.dockerfile index 19a64c836a6..db9fccb2d5a 100644 --- a/frameworks/Ruby/sinatra/sinatra.dockerfile +++ b/frameworks/Ruby/sinatra/sinatra.dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4-rc +FROM ruby:3.4 ENV RUBY_YJIT_ENABLE=1 diff --git a/frameworks/Rust/axum/Cargo.lock b/frameworks/Rust/axum/Cargo.lock index 8f756182439..7871df00e8c 100644 --- a/frameworks/Rust/axum/Cargo.lock +++ b/frameworks/Rust/axum/Cargo.lock @@ -1,22 +1,16 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -47,9 +41,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -76,26 +70,15 @@ dependencies = [ "yansi-term", ] -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", - "pin-project-lite", -] - [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] @@ -115,15 +98,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.6" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -145,18 +128,18 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", - "tower 0.5.1", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -167,7 +150,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.1", + "sync_wrapper", "tower-layer", "tower-service", ] @@ -186,39 +169,40 @@ dependencies = [ "futures-util", "hyper", "hyper-util", + "mimalloc", "mime", - "moka", "mongodb", "num_cpus", + "quick_cache", "rand", "serde", "serde_json", "serde_path_to_error", "simd-json", - "socket2 0.5.7", + "socket2", "sqlx", "tokio", "tokio-pg-mapper", "tokio-pg-mapper-derive", "tokio-postgres", - "tower 0.5.1", + "tower", "tower-http", "yarte", ] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -283,15 +267,15 @@ dependencies = [ [[package]] name = "bson" -version = "2.11.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a88e82b9106923b5c4d6edfca9e7db958d4e98a478ec115022e81b9b38e2c8" +checksum = "068208f2b6fcfa27a7f1ee37488d2bb8ba2640f68f5475d08e1d9130696aba59" dependencies = [ "ahash", "base64 0.13.1", "bitvec", "hex", - "indexmap", + "indexmap 2.7.0", "js-sys", "once_cell", "rand", @@ -316,15 +300,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cc" -version = "1.1.13" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "jobserver", "libc", @@ -339,13 +323,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", + "serde", "windows-targets 0.52.6", ] @@ -378,9 +363,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -409,38 +394,20 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -454,9 +421,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -464,27 +431,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] @@ -507,9 +474,9 @@ dependencies = [ [[package]] name = "deadpool-postgres" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab8a4ea925ce79678034870834602a2980f4b88c09e97feb266496dbb4493d2" +checksum = "3d697d376cbfa018c23eb4caab1fd1883dd9c906a8c034e8d9a3cb06a7e0bef9" dependencies = [ "async-trait", "deadpool", @@ -547,17 +514,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "derive-where" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] @@ -569,8 +537,8 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.75", + "rustc_version", + "syn 2.0.91", ] [[package]] @@ -585,6 +553,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "dotenv" version = "0.15.0" @@ -614,14 +593,14 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.4.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] @@ -632,12 +611,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -651,12 +630,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.3.1" @@ -668,16 +641,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -dependencies = [ - "event-listener 5.3.1", - "pin-project-lite", -] - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -686,34 +649,34 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "flate2" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0596c1eac1f9e04ed902702e9878208b336edc9d6fddc8a48387349bab3666" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] name = "float-cmp" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ "num-traits", ] [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -743,9 +706,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -758,9 +721,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -768,15 +731,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -796,38 +759,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -866,15 +829,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -882,7 +845,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -895,10 +858,16 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "serde", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -909,23 +878,26 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -939,6 +911,51 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-proto" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447afdcdb8afb9d0a852af6dc65d9b285ce720ed7a59e42a8bf2e931c67bc1b5" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2e2aba9c389ce5267d31cf1e4dace82390ae276b0b364ea55630b1fa1b44b4" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -959,11 +976,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -979,9 +996,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1013,9 +1030,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1025,9 +1042,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -1045,9 +1062,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-util", @@ -1056,15 +1073,14 @@ dependencies = [ "hyper", "pin-project-lite", "tokio", - "tower 0.4.13", "tower-service", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1084,174 +1100,251 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "idna" -version = "0.2.3" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "indexmap" -version = "2.4.0" +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "equivalent", - "hashbrown", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "ipconfig" -version = "0.3.2" +name = "icu_normalizer_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "socket2 0.5.7", - "widestring", - "windows-sys 0.48.0", - "winreg", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "ipnet" -version = "2.9.0" +name = "icu_properties_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] -name = "itoa" -version = "1.0.11" +name = "icu_provider" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "jobserver" -version = "0.1.32" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "libc", + "proc-macro2", + "quote", + "syn 2.0.91", ] [[package]] -name = "js-sys" -version = "0.3.70" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "wasm-bindgen", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "spin", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "lexical-core" -version = "0.8.5" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", + "autocfg", + "hashbrown 0.12.3", + "serde", ] [[package]] -name = "lexical-parse-float" -version = "0.8.5" +name = "indexmap" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", + "equivalent", + "hashbrown 0.15.2", + "serde", ] [[package]] -name = "lexical-parse-integer" -version = "0.8.6" +name = "ipconfig" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "lexical-util", - "static_assertions", + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg", ] [[package]] -name = "lexical-util" -version = "0.8.5" +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ - "static_assertions", + "libc", ] [[package]] -name = "lexical-write-float" -version = "0.8.5" +name = "js-sys" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", + "once_cell", + "wasm-bindgen", ] [[package]] -name = "lexical-write-integer" -version = "0.8.5" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "lexical-util", - "static_assertions", + "spin", ] [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" +dependencies = [ + "cc", + "libc", +] [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -1270,6 +1363,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -1301,12 +1400,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -1329,6 +1422,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "mimalloc" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "mime" version = "0.3.17" @@ -1343,70 +1445,36 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", ] -[[package]] -name = "moka" -version = "0.12.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cf62eb4dd975d2dde76432fb1075c49e3ee2331cf36f1f8fd4b66550d32b6f" -dependencies = [ - "async-lock", - "async-trait", - "crossbeam-channel", - "crossbeam-epoch", - "crossbeam-utils", - "event-listener 5.3.1", - "futures-util", - "once_cell", - "parking_lot", - "quanta", - "rustc_version 0.4.0", - "smallvec", - "tagptr", - "thiserror", - "triomphe", - "uuid", -] - [[package]] name = "mongodb" -version = "2.8.2" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef206acb1b72389b49bc9985efe7eb1f8a9bb18e5680d262fac26c07f44025f1" +checksum = "ff1f6edf7fe8828429647a2200f684681ca6d5a33b45edc3140c81390d852301" dependencies = [ "async-trait", "base64 0.13.1", "bitflags 1.3.2", "bson", "chrono", - "derivative", + "derive-where", "derive_more", "flate2", "futures-core", @@ -1414,22 +1482,25 @@ dependencies = [ "futures-io", "futures-util", "hex", + "hickory-proto", + "hickory-resolver", "hmac", - "lazy_static", "md-5", + "mongodb-internal-macros", + "once_cell", "pbkdf2", "percent-encoding", "rand", "rustc_version_runtime", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_bytes", "serde_with", "sha-1", "sha2", "snap", - "socket2 0.4.10", + "socket2", "stringprep", "strsim", "take_mut", @@ -1437,14 +1508,23 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-util", - "trust-dns-proto", - "trust-dns-resolver", "typed-builder", "uuid", - "webpki-roots", + "webpki-roots 0.25.4", "zstd", ] +[[package]] +name = "mongodb-internal-macros" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b07bfd601af78e39384707a8e80041946c98260e3e0190e294ee7435823e6bf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "nom" version = "7.1.3" @@ -1520,24 +1600,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -1557,7 +1637,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -1610,31 +1690,11 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.75", -] - [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1665,9 +1725,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "postgres-protocol" @@ -1689,9 +1749,9 @@ dependencies = [ [[package]] name = "postgres-types" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02048d9e032fb3cc3413bbf7b83a15d84a5d419778e2628751896d856498eee9" +checksum = "f66ea23a2d0e5734297357705193335e0a957696f34bed2f2faefacb2fec336f" dependencies = [ "bytes", "fallible-iterator", @@ -1725,39 +1785,36 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] -[[package]] -name = "quanta" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" -dependencies = [ - "crossbeam-utils", - "libc", - "once_cell", - "raw-cpuid", - "wasi", - "web-sys", - "winapi", -] - [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick_cache" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d7c94f8935a9df96bb6380e8592c70edf497a643f94bd23b2f76b399385dbf4" +dependencies = [ + "ahash", + "equivalent", + "hashbrown 0.14.5", + "parking_lot", +] + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1785,42 +1842,24 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "raw-cpuid" -version = "11.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" -dependencies = [ - "bitflags 2.6.0", + "ppv-lite86", + "rand_core", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "bitflags 1.3.2", + "getrandom", ] [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -1842,14 +1881,14 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1859,9 +1898,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1870,9 +1909,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "resolv-conf" @@ -1901,9 +1940,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -1927,43 +1966,34 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.23", + "semver", ] [[package]] name = "rustc_version_runtime" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d31b7153270ebf48bf91c65ae5b0c00e749c4cfad505f66530ac74950249582f" +checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" dependencies = [ - "rustc_version 0.2.3", - "semver 0.9.0", + "rustc_version", + "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1974,10 +2004,24 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -1987,6 +2031,21 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -1997,11 +2056,22 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2027,30 +2097,15 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "semver-parser" -version = "0.7.0" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] @@ -2066,22 +2121,22 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ - "indexmap", + "indexmap 2.7.0", "itoa", "memchr", "ryu", @@ -2112,24 +2167,32 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.14.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.7.0", "serde", + "serde_derive", + "serde_json", "serde_with_macros", + "time", ] [[package]] name = "serde_with_macros" -version = "1.5.2" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] @@ -2192,13 +2255,12 @@ dependencies = [ [[package]] name = "simd-json" -version = "0.13.10" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570c430b3d902ea083097e853263ae782dfe40857d93db019a12356c8e8143fa" +checksum = "aa2bcf6c6e164e81bc7a5d49fc6988b3d515d9e8c07457d7b74ffb9324b9cd40" dependencies = [ "getrandom", "halfbrown", - "lexical-core", "ref-cast", "serde", "serde_json", @@ -2208,9 +2270,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" @@ -2232,6 +2294,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "snap" @@ -2241,19 +2306,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2280,9 +2335,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -2290,9 +2345,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2303,33 +2358,33 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ - "ahash", "atoi", "byteorder", "bytes", "crc", "crossbeam-queue", "either", - "event-listener 2.5.3", + "event-listener", "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", + "hashbrown 0.14.5", "hashlink", "hex", - "indexmap", + "indexmap 2.7.0", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls", - "rustls-pemfile", + "rustls 0.23.20", + "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", @@ -2340,27 +2395,27 @@ dependencies = [ "tokio-stream", "tracing", "url", - "webpki-roots", + "webpki-roots 0.26.7", ] [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn 2.0.91", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", @@ -2376,7 +2431,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.109", + "syn 2.0.91", "tempfile", "tokio", "url", @@ -2384,12 +2439,12 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "bytes", @@ -2426,12 +2481,12 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "byteorder", "crc", @@ -2464,9 +2519,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" dependencies = [ "atoi", "flume", @@ -2479,17 +2534,17 @@ dependencies = [ "log", "percent-encoding", "serde", + "serde_urlencoded", "sqlx-core", "tracing", "url", - "urlencoding", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stringprep" @@ -2504,9 +2559,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -2527,9 +2582,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" dependencies = [ "proc-macro2", "quote", @@ -2538,21 +2593,20 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] -name = "tagptr" -version = "0.2.0" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] [[package]] name = "take_mut" @@ -2568,9 +2622,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -2581,29 +2635,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2622,19 +2676,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -2647,9 +2711,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -2658,7 +2722,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "windows-sys 0.52.0", ] @@ -2671,7 +2735,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] @@ -2696,9 +2760,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03adcf0147e203b6032c0b2d30be1415ba03bc348901f3ff1cc0df6a733e60c3" +checksum = "3b5d3742945bc7d7f210693b0c58ae542c6fd47b17adbbda0885f3dcb34a6bdb" dependencies = [ "async-trait", "byteorder", @@ -2714,7 +2778,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "rand", - "socket2 0.5.7", + "socket2", "tokio", "tokio-util", "whoami", @@ -2726,15 +2790,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -2743,9 +2807,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -2766,29 +2830,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -2796,15 +2845,13 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ "bitflags 2.6.0", "bytes", "http", - "http-body", - "http-body-util", "pin-project-lite", "tower-layer", "tower-service", @@ -2824,9 +2871,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2836,75 +2883,24 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" - -[[package]] -name = "trust-dns-proto" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "trust-dns-proto", -] - [[package]] name = "typed-builder" version = "0.10.0" @@ -2924,48 +2920,42 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -2981,26 +2971,32 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", ] [[package]] -name = "urlencoding" -version = "2.1.3" +name = "utf16_iter" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -3024,9 +3020,9 @@ checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" [[package]] name = "value-trait" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad8db98c1e677797df21ba03fca7d3bf9bec3ca38db930954e4fe6e1ea27eb4" +checksum = "9170e001f458781e92711d2ad666110f153e4e50bfd5cbd02db6547625714187" dependencies = [ "float-cmp", "halfbrown", @@ -3060,9 +3056,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -3071,24 +3067,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3096,28 +3091,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -3129,13 +3124,22 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", "web-sys", ] @@ -3335,6 +3339,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3438,6 +3454,30 @@ dependencies = [ "yarte_helpers", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3456,7 +3496,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.91", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", + "synstructure", ] [[package]] @@ -3465,6 +3526,28 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" diff --git a/frameworks/Rust/axum/Cargo.toml b/frameworks/Rust/axum/Cargo.toml index a47514726c7..335a3b7f451 100644 --- a/frameworks/Rust/axum/Cargo.toml +++ b/frameworks/Rust/axum/Cargo.toml @@ -39,48 +39,49 @@ simd-json = [ ] [dependencies] -axum = { version = "0.7.6", default-features = false, features = [ +axum = { version = "0.7.9", default-features = false, features = [ "json", "query", "http1", "tokio", ] } deadpool = { version = "0.12.1", features = ["rt_tokio_1", "serde", "managed"] } -deadpool-postgres = { version = "0.14.0", features = ["rt_tokio_1", "serde"] } +deadpool-postgres = { version = "0.14.1", features = ["rt_tokio_1", "serde"] } dotenv = "0.15.0" -futures = "0.3.30" -futures-util = "0.3.30" -mongodb = { version = "2.8.0", features = [ +futures = "0.3.31" +futures-util = "0.3.31" +mongodb = { version = "3.1.1", features = [ "zstd-compression", "snappy-compression", "zlib-compression", ] } num_cpus = "1.16.0" rand = { version = "0.8.5", features = ["small_rng"] } -serde = { version = "1.0.196", features = ["derive"] } -serde_json = "1.0.127" -sqlx = { version = "0.7.3", features = [ +serde = { version = "1.0.216", features = ["derive"] } +serde_json = "1.0.134" +sqlx = { version = "0.8.2", features = [ "postgres", "macros", "runtime-tokio", "tls-rustls", ] } -tokio = { version = "1.39.3", features = ["full"] } +tokio = { version = "1.42.0", features = ["full"] } tokio-pg-mapper = { version = "0.2.0" } tokio-pg-mapper-derive = { version = "0.2.0" } -tokio-postgres = { version = "0.7.11" } -tower = { version = "0.5.0", features = ["util"] } -tower-http = { version = "0.5.2", features = ["set-header"] } +tokio-postgres = { version = "0.7.12" } +tower = { version = "0.5.2", features = ["util"] } +tower-http = { version = "0.6.2", features = ["set-header"] } yarte = "0.15.7" -simd-json = { version = "0.13.8", optional = true } -axum-core = { version = "0.4.3", optional = true } +simd-json = { version = "0.14.3", optional = true } +axum-core = { version = "0.4.5", optional = true } mime = { version = "0.3.17", optional = true } -bytes = { version = "1.5.0", optional = true } -serde_path_to_error = { version = "0.1.15", optional = true } -moka = { version = "0.12.8", features = ["future"] } -socket2 = "0.5.7" -hyper = { version = "1.4", features = ["server", "http1"] } +bytes = { version = "1.9.0", optional = true } +serde_path_to_error = { version = "0.1.16", optional = true } +socket2 = "0.5.8" +hyper = { version = "1.5", features = ["server", "http1"] } hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] } +quick_cache = "0.6.9" +mimalloc = "0.1.43" [profile.release] diff --git a/frameworks/Rust/axum/README.md b/frameworks/Rust/axum/README.md index 59979fe441d..eb1e4ff594c 100755 --- a/frameworks/Rust/axum/README.md +++ b/frameworks/Rust/axum/README.md @@ -27,10 +27,11 @@ built with Tokio, Tower, and Hyper. ## Notable Points (both performance and build) - Use of `async`. -- Use of most recent versions of Rust, `axum` and dependencies. +- Use of the most recent versions of Rust, `axum` and dependencies. - (Disabled by default) Compile-time swap-in of `simd-json` instead of `serde_json` for faster JSON serialization. - Release binaries are stripped and compiled with CPU native. -- Sockets configured with TCP_NODELAY and to support an increased number of pending connections. +- Sockets configured with `TCP_NODELAY` and to support an increased number of pending connections. +- For very simple benchmarks, use of a separate, single-threaded Tokio runtime for each thread. - Server configured to serve HTTP/1 only, with no need for websockets. - Separation of build and deployment containers using multi-stage builds. - Deployment into Google's minimal `distroless-cc` container. @@ -39,8 +40,5 @@ built with Tokio, Tower, and Hyper. - Use of PostgreSQL prepared statements cache (where supported). - Use of PostgreSQL arrays to execute multi-row database updates with a single `UPDATE` query. - This is permitted by the [test requirements](https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#database-updates), step (ix). -- In version 0.7.6 (as yet unreleased), a native API to set TCP_NODELAY will be included. - - https://github.com/tokio-rs/axum/pull/2653/ - - https://github.com/tokio-rs/axum/issues/2521 - More performance improvements are to be expected in version 0.8: - https://github.com/tokio-rs/axum/issues/1827 diff --git a/frameworks/Rust/axum/axum.dockerfile b/frameworks/Rust/axum/axum.dockerfile index 044e68bbf02..1bfb8fdf9c1 100644 --- a/frameworks/Rust/axum/axum.dockerfile +++ b/frameworks/Rust/axum/axum.dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.80-slim-bookworm AS builder +FROM docker.io/rust:1.83-slim-bookworm AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config libssl-dev \ @@ -18,7 +18,7 @@ ENV POSTGRES_MIN_POOL_SIZE=56 ENV POSTGRES_MAX_POOL_SIZE=56 ENV MONGODB_URL=mongodb://tfb-database:27017 ENV MONGODB_MIN_POOL_SIZE=28 -ENV MONGODB_MAX_POOL_SIZE=14 +ENV MONGODB_MAX_POOL_SIZE=28 COPY --from=builder /build/target/release/axum* /app/ EXPOSE 8000 CMD ["/app/axum"] diff --git a/frameworks/Rust/axum/src/common/mod.rs b/frameworks/Rust/axum/src/common/mod.rs index 808b2a70eeb..cae34d182cf 100644 --- a/frameworks/Rust/axum/src/common/mod.rs +++ b/frameworks/Rust/axum/src/common/mod.rs @@ -17,10 +17,9 @@ pub const SELECT_WORLD_BY_ID: &str = pub const SELECT_ALL_CACHED_WORLDS: &str = "SELECT id, randomnumber FROM world ORDER BY id"; #[allow(dead_code)] -pub const UPDATE_WORLDS: &str = "WITH vals AS (SELECT * FROM UNNEST($1::int[], $2::int[]) AS v(id, rnum)) - UPDATE world SET randomnumber = new.rnum FROM - (SELECT w.id, v.rnum FROM world w INNER JOIN vals v ON v.id = w.id ORDER BY w.id FOR UPDATE) AS new - WHERE world.id = new.id"; +pub const UPDATE_WORLDS: &str = r#"UPDATE world SET randomnumber = new.rnum FROM + (SELECT * FROM UNNEST($1::int[], $2::int[]) AS v(id, rnum) ORDER BY 1) AS new +WHERE world.id = new.id"#; /// Return the value of an environment variable. #[allow(dead_code)] @@ -41,11 +40,10 @@ pub fn random_id(rng: &mut SmallRng) -> i32 { rng.gen_range(1..10_001) } -/// Generate vector of integers in the range 1 to 10,000 (inclusive) +/// Generate an iterator of integers in the range 1 to 10,000 (inclusive) #[allow(dead_code)] #[inline(always)] -pub fn random_ids(rng: &mut SmallRng, count: usize) -> Vec { +pub fn random_ids(rng: &mut SmallRng, count: usize) -> impl Iterator + use<'_> { rng.sample_iter(Uniform::new(1, 10_001)) .take(count) - .collect() -} +} \ No newline at end of file diff --git a/frameworks/Rust/axum/src/main.rs b/frameworks/Rust/axum/src/main.rs index 0b33fb7edcb..ccbb4588eb9 100644 --- a/frameworks/Rust/axum/src/main.rs +++ b/frameworks/Rust/axum/src/main.rs @@ -4,6 +4,10 @@ mod server; use axum::{http::StatusCode, response::IntoResponse, routing::get, Router}; use common::models::Message; use dotenv::dotenv; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; #[cfg(not(feature = "simd-json"))] use axum::Json; diff --git a/frameworks/Rust/axum/src/main_mongo.rs b/frameworks/Rust/axum/src/main_mongo.rs index 6d301189b9a..f15e0f521fb 100644 --- a/frameworks/Rust/axum/src/main_mongo.rs +++ b/frameworks/Rust/axum/src/main_mongo.rs @@ -14,8 +14,7 @@ use axum::Json; #[cfg(feature = "simd-json")] use common::simd_json::Json; use common::{ - models::{FortuneInfo, World}, - random_ids, + models::{FortuneInfo, World}, random_id }; use dotenv::dotenv; use mongodb::{ @@ -24,6 +23,10 @@ use mongodb::{ }; use rand::{rngs::SmallRng, thread_rng, Rng, SeedableRng}; use yarte::Template; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; use common::{ get_env, @@ -58,9 +61,7 @@ async fn queries( let q = parse_params(params); let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); - let ids = random_ids(&mut rng, q); - - let worlds = find_worlds(db, ids).await; + let worlds = find_worlds(db, &mut rng, q).await; let results = worlds.expect("worlds could not be retrieved"); (StatusCode::OK, Json(results)) @@ -73,17 +74,14 @@ async fn updates( let q = parse_params(params); let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); - let ids = random_ids(&mut rng, q); - let worlds = find_worlds(db.clone(), ids) + let worlds = find_worlds(db.clone(), &mut rng, q) .await .expect("worlds could not be retrieved"); let mut updated_worlds: Vec = Vec::with_capacity(q); for mut world in worlds { - let random_number = (rng.gen::() % 10_000 + 1) as i32; - - world.random_number = random_number; + world.random_number = random_id(&mut rng); updated_worlds.push(world); } diff --git a/frameworks/Rust/axum/src/main_mongo_raw.rs b/frameworks/Rust/axum/src/main_mongo_raw.rs index 0d2735ad3bb..b36dd2d8030 100644 --- a/frameworks/Rust/axum/src/main_mongo_raw.rs +++ b/frameworks/Rust/axum/src/main_mongo_raw.rs @@ -2,7 +2,7 @@ mod common; mod mongo_raw; mod server; -use common::{models::World, random_id, random_ids}; +use common::{models::World, random_id}; use mongo_raw::database::{ find_world_by_id, find_worlds, update_worlds, DatabaseConnection, }; @@ -17,6 +17,11 @@ use axum::{ extract::Query, http::StatusCode, response::IntoResponse, routing::get, Router, }; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + #[cfg(not(feature = "simd-json"))] use axum::Json; #[cfg(feature = "simd-json")] @@ -27,7 +32,7 @@ use mongodb::{ options::{ClientOptions, Compressor}, Client, }; -use rand::{rngs::SmallRng, thread_rng, Rng, SeedableRng}; +use rand::{rngs::SmallRng, thread_rng, SeedableRng}; async fn db(DatabaseConnection(db): DatabaseConnection) -> impl IntoResponse { let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); @@ -48,9 +53,7 @@ async fn queries( let q = parse_params(params); let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); - let ids = random_ids(&mut rng, q); - - let worlds = find_worlds(db, ids).await; + let worlds = find_worlds(db, &mut rng, q).await; let results = worlds.expect("worlds could not be retrieved"); (StatusCode::OK, Json(results)) @@ -64,16 +67,13 @@ async fn updates( let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); - let ids = random_ids(&mut rng, q); - let worlds = find_worlds(db.clone(), ids) + let worlds = find_worlds(db.clone(), &mut rng, q) .await .expect("worlds could not be retrieved"); let mut updated_worlds: Vec = Vec::with_capacity(q); for mut world in worlds { - let random_number = (rng.gen::() % 10_000 + 1) as i32; - - world.random_number = random_number; + world.random_number = random_id(&mut rng); updated_worlds.push(world); } diff --git a/frameworks/Rust/axum/src/main_pg.rs b/frameworks/Rust/axum/src/main_pg.rs index be691f9720c..94788bbd254 100644 --- a/frameworks/Rust/axum/src/main_pg.rs +++ b/frameworks/Rust/axum/src/main_pg.rs @@ -7,6 +7,10 @@ use axum::{ use dotenv::dotenv; use rand::{rngs::SmallRng, thread_rng, SeedableRng}; use yarte::Template; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; #[cfg(not(feature = "simd-json"))] use axum::Json; diff --git a/frameworks/Rust/axum/src/main_pg_pool.rs b/frameworks/Rust/axum/src/main_pg_pool.rs index d4b7754cba8..a6d5764748e 100644 --- a/frameworks/Rust/axum/src/main_pg_pool.rs +++ b/frameworks/Rust/axum/src/main_pg_pool.rs @@ -15,6 +15,10 @@ use dotenv::dotenv; use futures_util::{stream::FuturesUnordered, TryStreamExt}; use rand::{rngs::SmallRng, thread_rng, SeedableRng}; use yarte::Template; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; mod server; diff --git a/frameworks/Rust/axum/src/main_sqlx.rs b/frameworks/Rust/axum/src/main_sqlx.rs index b3a7937841b..7c8f90d6807 100644 --- a/frameworks/Rust/axum/src/main_sqlx.rs +++ b/frameworks/Rust/axum/src/main_sqlx.rs @@ -12,10 +12,14 @@ use axum::{ Router, }; use dotenv::dotenv; -use moka::future::Cache; +use quick_cache::sync::Cache; use rand::{rngs::SmallRng, thread_rng, SeedableRng}; use sqlx::models::World; use yarte::Template; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; #[cfg(not(feature = "simd-json"))] use axum::Json; @@ -55,10 +59,9 @@ async fn queries( ) -> impl IntoResponse { let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); let count = parse_params(params); - let ids = random_ids(&mut rng, count); let mut worlds: Vec = Vec::with_capacity(count); - for id in &ids { + for id in random_ids(&mut rng, count) { let world: World = ::sqlx::query_as(common::SELECT_WORLD_BY_ID) .bind(id) .fetch_one(&mut *db.acquire().await.unwrap()) @@ -98,10 +101,10 @@ async fn cache( ) -> impl IntoResponse { let count = parse_params(params); let mut rng = SmallRng::from_rng(&mut thread_rng()).unwrap(); - let mut worlds: Vec>> = Vec::with_capacity(count); - + let mut worlds: Vec> = Vec::with_capacity(count); + for id in random_ids(&mut rng, count) { - worlds.push(cache.get(&id).await); + worlds.push(cache.get(&id)); } (StatusCode::OK, Json(worlds)) @@ -115,7 +118,7 @@ async fn preload_cache(AppState { db, cache }: &AppState) { .expect("error loading worlds"); for world in worlds { - cache.insert(world.id, Arc::new(world)).await; + cache.insert(world.id, world); } } @@ -123,7 +126,7 @@ async fn preload_cache(AppState { db, cache }: &AppState) { #[derive(Clone)] struct AppState { db: PgPool, - cache: Cache>, + cache: Arc>, } #[tokio::main] @@ -136,10 +139,7 @@ async fn main() { let state = AppState { db: create_pool(database_url, max_pool_size, min_pool_size).await, - cache: Cache::builder() - .initial_capacity(10000) - .max_capacity(10000) - .build() + cache: Arc::new(Cache::new(10_000)) }; // Prime the cache with CachedWorld objects diff --git a/frameworks/Rust/axum/src/mongo/database.rs b/frameworks/Rust/axum/src/mongo/database.rs index 28c55d25c01..be581e4505c 100644 --- a/frameworks/Rust/axum/src/mongo/database.rs +++ b/frameworks/Rust/axum/src/mongo/database.rs @@ -3,8 +3,9 @@ use std::{convert::Infallible, io}; use axum::{async_trait, extract::FromRequestParts, http::request::Parts}; use futures_util::{stream::FuturesUnordered, StreamExt, TryStreamExt}; use mongodb::{bson::doc, Database}; +use rand::rngs::SmallRng; -use crate::common::models::{Fortune, World}; +use crate::common::{models::{Fortune, World}, random_ids}; pub struct DatabaseConnection(pub Database); @@ -45,17 +46,17 @@ pub async fn find_world_by_id(db: Database, id: i32) -> Result) -> Result, MongoError> { +pub async fn find_worlds(db: Database, rng: &mut SmallRng, count: usize) -> Result, MongoError> { let future_worlds = FuturesUnordered::new(); - for id in ids { + for id in random_ids(rng, count) { future_worlds.push(find_world_by_id(db.clone(), id)); } @@ -67,7 +68,7 @@ pub async fn fetch_fortunes(db: Database) -> Result, MongoError> { let fortune_collection = db.collection::("fortune"); let mut fortune_cursor = fortune_collection - .find(None, None) + .find(doc! {}) .await .expect("fortunes could not be loaded"); @@ -99,8 +100,7 @@ pub async fn update_worlds( } db.run_command( - doc! {"update": "world", "updates": updates, "ordered": false}, - None, + doc! {"update": "world", "updates": updates, "ordered": false} ) .await .expect("could not update worlds"); diff --git a/frameworks/Rust/axum/src/mongo_raw/database.rs b/frameworks/Rust/axum/src/mongo_raw/database.rs index 638c590c9fa..22b113ce68c 100644 --- a/frameworks/Rust/axum/src/mongo_raw/database.rs +++ b/frameworks/Rust/axum/src/mongo_raw/database.rs @@ -6,8 +6,9 @@ use mongodb::{ bson::{doc, RawDocumentBuf}, Database, }; +use rand::rngs::SmallRng; -use crate::common::models::World; +use crate::common::{models::World, random_ids}; pub struct DatabaseConnection(pub Database); @@ -48,7 +49,7 @@ pub async fn find_world_by_id(db: Database, id: i32) -> Result Result) -> Result, MongoError> { +pub async fn find_worlds(db: Database, rng: &mut SmallRng, count: usize) -> Result, MongoError> { let future_worlds = FuturesUnordered::new(); - for id in ids { + for id in random_ids(rng, count) { future_worlds.push(find_world_by_id(db.clone(), id)); } @@ -93,8 +94,7 @@ pub async fn update_worlds( } db.run_command( - doc! {"update": "world", "updates": updates, "ordered": false}, - None, + doc! {"update": "world", "updates": updates, "ordered": false} ) .await .expect("could not update worlds"); diff --git a/frameworks/Rust/viz/Cargo.toml b/frameworks/Rust/viz/Cargo.toml index b2e90cb4836..a1daab27b7f 100644 --- a/frameworks/Rust/viz/Cargo.toml +++ b/frameworks/Rust/viz/Cargo.toml @@ -24,13 +24,16 @@ path = "src/main_diesel.rs" required-features = ["diesel", "diesel-async", "sailfish"] [dependencies] -viz = "0.9" -hyper = "1.4" +viz = "0.10" +hyper = "1.5" hyper-util = "0.1" +http-body-util = "0.1" atoi = "2.0" serde = { version = "1.0", features = ["derive"] } +serde_json = "1" +mime = "0.3" rand = { version = "0.8", features = ["small_rng"] } -thiserror = "1.0" +thiserror = "2.0" futures-util = "0.3" [target.'cfg(not(unix))'.dependencies] @@ -50,7 +53,7 @@ sqlx = { version = "0.8", features = [ diesel = { version = "2.2", default-features = false, features = [ "i-implement-a-third-party-backend-and-opt-into-breaking-changes", ], optional = true } -diesel-async = { git = "https://github.com/weiznich/diesel_async.git", rev = "74867bd", version = "0.4", default-features = false, features = [ +diesel-async = { version = "0.5", default-features = false, features = [ "postgres", "bb8", ], optional = true } diff --git a/frameworks/Rust/viz/src/main.rs b/frameworks/Rust/viz/src/main.rs index 1813ac62a22..0bde892034a 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, + Bytes, Error, Request, Response, ResponseExt, Result, Router, }; mod server; @@ -22,9 +22,15 @@ async fn plaintext(_: Request) -> Result { } async fn json(_: Request) -> Result { - let mut res = Response::json(Message { - message: "Hello, World!", - })?; + let mut res = Response::with( + http_body_util::Full::new(Bytes::from( + serde_json::to_vec(&Message { + message: "Hello, World!", + }) + .unwrap(), + )), + mime::APPLICATION_JSON.as_ref(), + ); res.headers_mut() .insert(SERVER, HeaderValue::from_static("Viz")); Ok(res) diff --git a/frameworks/Rust/viz/viz-diesel.dockerfile b/frameworks/Rust/viz/viz-diesel.dockerfile index d37e0af9130..62eec4e7ebd 100644 --- a/frameworks/Rust/viz/viz-diesel.dockerfile +++ b/frameworks/Rust/viz/viz-diesel.dockerfile @@ -1,6 +1,4 @@ -FROM rust:1.79 - -RUN apt-get update -yqq && apt-get install -yqq cmake g++ +FROM rust:1.83 ADD ./ /viz WORKDIR /viz diff --git a/frameworks/Rust/viz/viz-pg.dockerfile b/frameworks/Rust/viz/viz-pg.dockerfile index 326f10a3bc6..e45d0db4402 100644 --- a/frameworks/Rust/viz/viz-pg.dockerfile +++ b/frameworks/Rust/viz/viz-pg.dockerfile @@ -1,6 +1,4 @@ -FROM rust:1.79 - -RUN apt-get update -yqq && apt-get install -yqq cmake g++ +FROM rust:1.83 ADD ./ /viz WORKDIR /viz diff --git a/frameworks/Rust/viz/viz-sqlx.dockerfile b/frameworks/Rust/viz/viz-sqlx.dockerfile index 76104544be0..62bd3cac1d8 100644 --- a/frameworks/Rust/viz/viz-sqlx.dockerfile +++ b/frameworks/Rust/viz/viz-sqlx.dockerfile @@ -1,6 +1,4 @@ -FROM rust:1.79 - -RUN apt-get update -yqq && apt-get install -yqq cmake g++ +FROM rust:1.83 ADD ./ /viz WORKDIR /viz diff --git a/frameworks/Rust/viz/viz.dockerfile b/frameworks/Rust/viz/viz.dockerfile index d6fd457b66e..16abf430a9f 100644 --- a/frameworks/Rust/viz/viz.dockerfile +++ b/frameworks/Rust/viz/viz.dockerfile @@ -1,6 +1,4 @@ -FROM rust:1.79 - -RUN apt-get update -yqq && apt-get install -yqq cmake g++ +FROM rust:1.83 ADD ./ /viz WORKDIR /viz diff --git a/frameworks/Scala/snunit/.dockerignore b/frameworks/Scala/snunit/.dockerignore index e4a162e5e02..2a371592c0f 100644 --- a/frameworks/Scala/snunit/.dockerignore +++ b/frameworks/Scala/snunit/.dockerignore @@ -3,7 +3,7 @@ # Allow files and directories !/build.sbt -!/config.sh +!/conf.json !/project/build.properties !/project/plugins.sbt !/src diff --git a/frameworks/Scala/snunit/benchmark_config.json b/frameworks/Scala/snunit/benchmark_config.json index 7711ab00316..f46cf29e0d8 100755 --- a/frameworks/Scala/snunit/benchmark_config.json +++ b/frameworks/Scala/snunit/benchmark_config.json @@ -19,8 +19,7 @@ "database_os": "Linux", "display_name": "SNUnit", "notes": "", - "versus": "", - "tags": ["broken"] + "versus": "" } } ] diff --git a/frameworks/Scala/snunit/build.sbt b/frameworks/Scala/snunit/build.sbt index e77aab72639..c44785e96c8 100644 --- a/frameworks/Scala/snunit/build.sbt +++ b/frameworks/Scala/snunit/build.sbt @@ -2,8 +2,8 @@ import scala.scalanative.build._ scalaVersion := "3.5.2" -val snunitVersion = "0.10.2" -val jsoniterScalaVersion = "2.31.3" +val snunitVersion = "0.10.3" +val jsoniterScalaVersion = "2.33.0" libraryDependencies ++= Seq( "com.github.lolgab" %%% "snunit" % snunitVersion, diff --git a/frameworks/Scala/snunit/conf.json b/frameworks/Scala/snunit/conf.json new file mode 100644 index 00000000000..0a6c3954949 --- /dev/null +++ b/frameworks/Scala/snunit/conf.json @@ -0,0 +1,20 @@ +{ + "listeners": { + "*:8080": { + "pass": "applications/example" + } + }, + "applications": { + "example": { + "type": "external", + "processes": { + "spare": 2, + "max": 20 + }, + "executable": "/app/example", + "environment": { + "SCALANATIVE_GC_THREADS": "2" + } + } + } +} diff --git a/frameworks/Scala/snunit/config.sh b/frameworks/Scala/snunit/config.sh deleted file mode 100755 index 12f0a511a10..00000000000 --- a/frameworks/Scala/snunit/config.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -processes=$(("$(nproc)" / 2)) - -config='{' -config+=' "listeners": {' -config+=' "*:8080": {' -config+=' "pass": "applications/example"' -config+=' }' -config+=' },' -config+=' "applications": {' -config+=' "example": {' -config+=' "type": "external",' -config+=' "processes": '"$processes"',' -config+=' "executable": "/app/example",' -config+=' "environment": {' -config+=' "SCALANATIVE_GC_THREADS": "2"' -config+=' }' -config+=' }' -config+=' }' -config+='}' - -curl -X PUT \ - --data-binary "$config" \ - --unix-socket /var/run/control.unit.sock \ - http://localhost/config diff --git a/frameworks/Scala/snunit/snunit.dockerfile b/frameworks/Scala/snunit/snunit.dockerfile index f83e84354c2..699c3c714f8 100644 --- a/frameworks/Scala/snunit/snunit.dockerfile +++ b/frameworks/Scala/snunit/snunit.dockerfile @@ -6,18 +6,25 @@ RUN apt-get update && apt-get install -y curl gnupg && \ curl -sL https://nginx.org/keys/nginx_signing.key | apt-key add - && \ echo "deb https://packages.nginx.org/unit/debian/ bookworm unit" > /etc/apt/sources.list.d/unit.list && \ echo "deb-src https://packages.nginx.org/unit/debian/ bookworm unit" >> /etc/apt/sources.list.d/unit.list && \ - apt-get update && apt-get install -y clang unit-dev=1.33* openjdk-17-jdk sbt=1.10.5 && \ + apt-get update && apt-get install -y clang unit-dev=1.34* openjdk-17-jdk sbt=1.10.5 && \ apt-get purge -y gnupg WORKDIR /workdir +RUN sbt version + COPY . . RUN sbt nativeLink -FROM unit:1.33.0-minimal +FROM unit:1.34.0-minimal + +WORKDIR /workdir -COPY /config.sh /docker-entrypoint.d/ +COPY conf.json statedir/ +COPY --from=builder /usr/sbin/unitd /usr/sbin/unitd COPY --from=builder /workdir/target/scala-3.5.2/workdir /app/example EXPOSE 8080 + +ENTRYPOINT [ "unitd", "--no-daemon", "--statedir", "/workdir/statedir", "--log", "/dev/stdout" ] diff --git a/frameworks/TypeScript/ditsmod/package.json b/frameworks/TypeScript/ditsmod/package.json index a0a1298ef86..99f331cf416 100755 --- a/frameworks/TypeScript/ditsmod/package.json +++ b/frameworks/TypeScript/ditsmod/package.json @@ -14,12 +14,12 @@ "author": "Костя Третяк", "license": "MIT", "dependencies": { - "@ditsmod/core": "^3.0.0-alpha.2", - "@ditsmod/routing": "^3.0.0-alpha.2", + "@ditsmod/core": "3.0.0-alpha.3", + "@ditsmod/routing": "3.0.0-alpha.3", "handlebars": "^4.7.8", - "lru-cache": "^11.0.0", - "mariadb": "^3.3.1", - "postgres": "^3.4.4" + "lru-cache": "^11.0.2", + "mariadb": "^3.4.0", + "postgres": "^3.4.5" }, "devDependencies": { "@types/eslint": "^8.44.2", diff --git a/frameworks/TypeScript/ditsmod/src/app/app.module.ts b/frameworks/TypeScript/ditsmod/src/app/app.module.ts index d50e72d1557..36d599d9698 100644 --- a/frameworks/TypeScript/ditsmod/src/app/app.module.ts +++ b/frameworks/TypeScript/ditsmod/src/app/app.module.ts @@ -1,14 +1,13 @@ -import { Providers, rootModule } from '@ditsmod/core'; +import { InjectionToken, Providers, rootModule } from '@ditsmod/core'; import { PRE_ROUTER_EXTENSIONS, RoutingModule } from '@ditsmod/routing'; import { OneController } from './one.controller.js'; import { InitExtension } from './init.extension.js'; -import { DB_INIT_EXTENSIONS } from './tokens.js'; @rootModule({ imports: [RoutingModule], providersPerApp: new Providers().useLogConfig({ level: 'off' }), - extensions: [{ extension: InitExtension, group: DB_INIT_EXTENSIONS, beforeGroup: PRE_ROUTER_EXTENSIONS }], + extensions: [{ extension: InitExtension, group: new InjectionToken('test'), beforeGroups: [PRE_ROUTER_EXTENSIONS] }], controllers: [OneController], }) export class AppModule {} diff --git a/frameworks/TypeScript/ditsmod/src/app/one.controller.ts b/frameworks/TypeScript/ditsmod/src/app/one.controller.ts index d4ba84464b0..72adaa1f616 100644 --- a/frameworks/TypeScript/ditsmod/src/app/one.controller.ts +++ b/frameworks/TypeScript/ditsmod/src/app/one.controller.ts @@ -1,4 +1,4 @@ -import { AnyObj, controller, RequestContext, SingletonRequestContext, optional } from '@ditsmod/core'; +import { AnyObj, controller, RequestContext, optional } from '@ditsmod/core'; import { route } from '@ditsmod/routing'; import Handlebars from 'handlebars'; @@ -28,7 +28,7 @@ const tmpl = Handlebars.compile( ].join(''), ); -@controller({ scope: 'module' }) +@controller({ scope: 'ctx' }) export class OneController { constructor(@optional() private dbService: DbService) {} @@ -40,19 +40,19 @@ export class OneController { } @route('GET', 'queries') - async getMultiQueries(ctx: SingletonRequestContext) { + async getMultiQueries(ctx: RequestContext) { const result = await this.dbService.getMultiQueries(ctx.queryParams!.queries); this.sendJson(ctx, result); } @route('GET', 'cached-queries') - async getCachedWorlds(ctx: SingletonRequestContext) { + async getCachedWorlds(ctx: RequestContext) { const result = await this.dbService.getMultiQueries(ctx.queryParams!.count, false); this.sendJson(ctx, result); } @route('GET', 'updates') - async getUpdates(ctx: SingletonRequestContext) { + async getUpdates(ctx: RequestContext) { const worlds = await this.dbService.saveWorlds(ctx.queryParams!.queries); this.sendJson(ctx, worlds); } @@ -68,18 +68,20 @@ export class OneController { } @route('GET', 'plaintext') - getHello(ctx: SingletonRequestContext) { + getHello(ctx: RequestContext) { ctx.rawRes.setHeader('Server', 'Ditsmod'); ctx.rawRes.setHeader('Content-Type', 'text/plain; charset=utf-8'); ctx.rawRes.end('Hello, World!'); } @route('GET', 'json') - getJson(ctx: SingletonRequestContext) { + getJson(ctx: RequestContext) { this.sendJson(ctx, { message: 'Hello, World!' }); } protected sendJson(ctx: RequestContext, value: AnyObj) { - ctx.setHeader('Server', 'Ditsmod').sendJson(value); + ctx.rawRes.setHeader('Server', 'Ditsmod'); + ctx.rawRes.setHeader('Content-Type', 'application/json; charset=utf-8'); + ctx.rawRes.end(JSON.stringify(value)); } } diff --git a/frameworks/TypeScript/ditsmod/src/app/tokens.ts b/frameworks/TypeScript/ditsmod/src/app/tokens.ts deleted file mode 100644 index 2eac6cb9303..00000000000 --- a/frameworks/TypeScript/ditsmod/src/app/tokens.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Extension, InjectionToken } from '@ditsmod/core'; - -/** - * A group of extensions intended for preparatory work for the database module. - */ -export const DB_INIT_EXTENSIONS = new InjectionToken[]>('DB_INIT_EXTENSIONS'); diff --git a/frameworks/TypeScript/elysia/bun.lockb b/frameworks/TypeScript/elysia/bun.lockb index 5d4cdb0b97a..8b08fa7e91b 100755 Binary files a/frameworks/TypeScript/elysia/bun.lockb and b/frameworks/TypeScript/elysia/bun.lockb differ diff --git a/frameworks/TypeScript/elysia/package.json b/frameworks/TypeScript/elysia/package.json index fa95e553bc3..9d38195023f 100644 --- a/frameworks/TypeScript/elysia/package.json +++ b/frameworks/TypeScript/elysia/package.json @@ -3,7 +3,8 @@ "version": "0.0.1", "module": "src/index.js", "devDependencies": { - "typescript": "^5.5.4" + "@types/bun": "^1.1.14", + "typescript": "^5.7.2" }, "scripts": { "dev": "bun run --watch src/index.ts", @@ -12,7 +13,7 @@ "compile": "bun build --compile --minify --target bun --outfile server src/index.ts" }, "dependencies": { - "elysia": "^1.1.16", - "postgres": "^3.4.4" + "elysia": "^1.2.9", + "postgres": "^3.4.5" } } diff --git a/frameworks/TypeScript/elysia/src/db-handlers.ts b/frameworks/TypeScript/elysia/src/db-handlers.ts index b75ccfdea60..6674829bfd9 100644 --- a/frameworks/TypeScript/elysia/src/db-handlers.ts +++ b/frameworks/TypeScript/elysia/src/db-handlers.ts @@ -2,74 +2,66 @@ import { Elysia, t } from "elysia"; import * as db from "./postgres"; import { Fortune } from "./types"; -function rand() { - return Math.ceil(Math.random() * 10000); +export function rand() { + return Math.ceil(Math.random() * 10000); } function parseQueriesNumber(q?: string) { - return Math.min(parseInt(q || "1") || 1, 500); -} - -function renderTemplate(fortunes: Fortune[]) { - const n = fortunes.length; - - let html = ""; - for (let i = 0; i < n; i++) { - html += `${fortunes[i].id}${Bun.escapeHTML( - fortunes[i].message, - )}`; - } - - return `Fortunes${html}
idmessage
`; + // NaN is falsy, fallback to one. + return Math.min(+q! || 1, 500); } export const dbHandlers = new Elysia() - .headers({ - server: "Elysia", - }) - .get("/db", () => db.find(rand())) - .get("/fortunes", async (c) => { - const fortunes = await db.fortunes(); - - fortunes.push({ - id: 0, - message: "Additional fortune added at request time.", - }); - - fortunes.sort((a, b) => { - if (a.message < b.message) return -1; - - return 1; - }); - - c.set.headers["content-type"] = "text/html; charset=utf-8"; - - return renderTemplate(fortunes); - }) - .get("/queries", (c) => { - const num = parseQueriesNumber(c.query.queries); - const worldPromises = new Array(num); - - for (let i = 0; i < num; i++) { - worldPromises[i] = db.find(rand()); - } - - return Promise.all(worldPromises); - }) - .get("/updates", async (c) => { - const num = parseQueriesNumber(c.query.queries); - const worldPromises = new Array(num); - - for (let i = 0; i < num; i++) { - worldPromises[i] = db.find(rand()); - } - - const worlds = await Promise.all(worldPromises); - - for (let i = 0; i < num; i++) { - worlds[i].randomNumber = rand(); - } - - await db.bulkUpdate(worlds); - return worlds; - }); + .headers({ + server: "Elysia", + }) + // ? Mark as async for Promise result to prevent double Elysia's mapResponse execution + .get("/db", async () => db.find(rand())) + .get("/fortunes", async (c) => { + const fortunes = await db.fortunes(); + + fortunes.push({ + id: 0, + message: "Additional fortune added at request time.", + }); + + fortunes.sort((a, b) => { + if (a.message < b.message) return -1; + + return 1; + }); + + c.set.headers["content-type"] = "text/html; charset=utf-8"; + + const n = fortunes.length; + + let html = ""; + for (let i = 0; i < n; i++) { + html += `${fortunes[i].id}${Bun.escapeHTML( + fortunes[i].message, + )}`; + } + + return `Fortunes${html}
idmessage
`; + }) + // ? Mark as async for Promise result to prevent double Elysia's mapResponse execution + .get("/queries", async (c) => { + const num = parseQueriesNumber(c.query.queries); + const worldPromises = new Array(num); + + for (let i = 0; i < num; i++) worldPromises[i] = db.find(rand()); + + return Promise.all(worldPromises); + }) + .get("/updates", async (c) => { + const num = parseQueriesNumber(c.query.queries); + const worldPromises = new Array(num); + + for (let i = 0; i < num; i++) + worldPromises[i] = db.findThenRand(rand()); + + const worlds = await Promise.all(worldPromises); + + await db.bulkUpdate(worlds); + return worlds; + }); diff --git a/frameworks/TypeScript/elysia/src/postgres.ts b/frameworks/TypeScript/elysia/src/postgres.ts index cc6d4389a02..33db0497fcc 100644 --- a/frameworks/TypeScript/elysia/src/postgres.ts +++ b/frameworks/TypeScript/elysia/src/postgres.ts @@ -1,30 +1,39 @@ import postgres from "postgres"; -import { Fortune, World } from "./types"; +import { rand } from "./db-handlers"; +import type { Fortune, World } from "./types"; const sql = postgres({ - host: "tfb-database", - user: "benchmarkdbuser", - password: "benchmarkdbpass", - database: "hello_world", - max: 1, + host: "tfb-database", + user: "benchmarkdbuser", + password: "benchmarkdbpass", + database: "hello_world", + max: 1, }); export const fortunes = () => sql`SELECT id, message FROM fortune`; export const find = (id: number) => - sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( - (arr) => arr[0], - ); + sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( + (arr) => arr[0], + ); + +export const findThenRand = (id: number) => + sql`SELECT id, randomNumber FROM world WHERE id = ${id}`.then( + (arr) => { + arr[0].randomNumber = rand(); + return arr[0]; + }, + ); export const bulkUpdate = (worlds: World[]) => { - worlds = worlds.toSorted((a, b) => a.id - b.id); + worlds = worlds.toSorted((a, b) => a.id - b.id); - const values = new Array(worlds.length); - for (let i = 0; i < worlds.length; i++) { - values[i] = [worlds[i].id, worlds[i].randomNumber]; - } + const values = new Array(worlds.length); + for (let i = 0; i < worlds.length; i++) { + values[i] = [worlds[i].id, worlds[i].randomNumber]; + } - return sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int - FROM (VALUES ${sql(values)}) AS update_data (id, randomNumber) - WHERE world.id = (update_data.id)::int`; + return sql`UPDATE world SET randomNumber = (update_data.randomNumber)::int + FROM (VALUES ${sql(values)}) AS update_data (id, randomNumber) + WHERE world.id = (update_data.id)::int`; }; diff --git a/frameworks/TypeScript/nextjs/.dockerignore b/frameworks/TypeScript/nextjs/.dockerignore new file mode 100644 index 00000000000..db6a874b260 --- /dev/null +++ b/frameworks/TypeScript/nextjs/.dockerignore @@ -0,0 +1,7 @@ +*.dockerfile +.dockerignore +node_modules +npm-debug.log +README.md +.next +.git diff --git a/frameworks/TypeScript/nextjs/.gitignore b/frameworks/TypeScript/nextjs/.gitignore new file mode 100644 index 00000000000..5ef6a520780 --- /dev/null +++ b/frameworks/TypeScript/nextjs/.gitignore @@ -0,0 +1,41 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# env files (can opt-in for committing if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/frameworks/TypeScript/nextjs/README.md b/frameworks/TypeScript/nextjs/README.md new file mode 100644 index 00000000000..c6cb986eac7 --- /dev/null +++ b/frameworks/TypeScript/nextjs/README.md @@ -0,0 +1,47 @@ +# Next.js Benchmarking Test + +## Test source files and URLs + +| Test | Source Code | URL | +| --- | --- | --- | +| [JSON Serialization][] | [`app/json/route.ts`][] | http://localhost:3000/json | +| [Single Database Query][] | [`app/db/route.ts`][] | http://localhost:3000/db | +| [Multiple Database Queries][] | [`app/queries/route.ts`][] | http://localhost:3000/queries?queries= | +| [Fortunes][] | [`app/fortunes/page.tsx`][] | http://localhost:3000/fortunes | +| [Database Updates][] | [`app/updates/route.ts`][] | http://localhost:3000/updates?queries= | +| [Plaintext][] | [`app/plaintext/route.ts`][] | http://localhost:3000/plaintext | +| [Caching][] | [`app/cached-queries/route.ts`][] | http://localhost:3000/cached-queries?queries= | + +[JSON Serialization]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#json-serialization +[Single Database Query]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#single-database-query +[Multiple Database Queries]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#multiple-database-queries +[Fortunes]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#fortunes +[Database Updates]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#database-updates +[Plaintext]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#plaintext +[Caching]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#caching + +[`app/json/route.ts`]: ./app/json/route.ts +[`app/db/route.ts`]: ./app/db/route.ts +[`app/queries/route.ts`]: ./app/queries/route.ts +[`app/fortunes/page.tsx`]: ./app/fortunes/page.tsx +[`app/updates/route.ts`]: ./app/updates/route.ts +[`app/plaintext/route.ts`]: ./app/plaintext/route.ts +[`app/cached-queries/route.ts`]: ./app/cached-queries/route.ts + +## TODO + +The Fortunes test is currently disabled because the benchmark expects exact HTML output — see [TechEmpower/FrameworkBenchmarks#9505](https://github.com/TechEmpower/FrameworkBenchmarks/pull/9505). After that issue is resolved, the Fortunes test can be re-enabled by applying the following diff: + +```diff +--- a/frameworks/TypeScript/nextjs/benchmark_config.json ++++ b/frameworks/TypeScript/nextjs/benchmark_config.json +@@ -20,7 +20,7 @@ + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", +- "TEMPORARILY DISABLED fortune_url": "/fortunes", ++ "fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "cached_query_url": "/cached-queries?queries=" +``` diff --git a/frameworks/TypeScript/nextjs/app/cached-queries/route.ts b/frameworks/TypeScript/nextjs/app/cached-queries/route.ts new file mode 100644 index 00000000000..148891d3249 --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/cached-queries/route.ts @@ -0,0 +1,18 @@ +import { findWorld as uncached_findWorld, World } from "@/lib/db" +import { unstable_cache } from "next/cache" +import { NextRequest } from "next/server" + +const findWorld = unstable_cache(uncached_findWorld) + +export async function GET(request: NextRequest) { + const queriesParam = request.nextUrl.searchParams.get("queries") + const queriesCount = Math.min(Math.max(Number(queriesParam) || 1, 1), 500) + const results = Array(queriesCount) + + for (let i = 0; i < queriesCount; i += 1) { + const id = 1 + Math.floor(Math.random() * 10000) + results[i] = await findWorld(id) + } + + return Response.json(results) +} diff --git a/frameworks/TypeScript/nextjs/app/db/route.ts b/frameworks/TypeScript/nextjs/app/db/route.ts new file mode 100644 index 00000000000..1ff5e98fe72 --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/db/route.ts @@ -0,0 +1,6 @@ +import { findWorld } from "@/lib/db" + +export async function GET() { + const id = 1 + Math.floor(Math.random() * 10000) + return Response.json(await findWorld(id)) +} diff --git a/frameworks/TypeScript/nextjs/app/favicon.ico b/frameworks/TypeScript/nextjs/app/favicon.ico new file mode 100644 index 00000000000..718d6fea483 Binary files /dev/null and b/frameworks/TypeScript/nextjs/app/favicon.ico differ diff --git a/frameworks/TypeScript/nextjs/app/fortunes/page.tsx b/frameworks/TypeScript/nextjs/app/fortunes/page.tsx new file mode 100644 index 00000000000..95f2633e9b7 --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/fortunes/page.tsx @@ -0,0 +1,31 @@ +import { db } from "@/lib/db" + +// Prevent database queries during build phase. +export const dynamic = "force-dynamic" + +export default async function Page() { + const fortunes = await db.selectFrom("Fortune").selectAll().execute() + fortunes.push({ id: 0, message: "Additional fortune added at request time." }) + fortunes.sort((a, b) => a.message.localeCompare(b.message)) + + return <> + Fortunes + + + + + + + + + + {fortunes.map(fortune => + + + + + )} + +
idmessage
{fortune.id}{fortune.message}
+ +} diff --git a/frameworks/TypeScript/nextjs/app/json/route.ts b/frameworks/TypeScript/nextjs/app/json/route.ts new file mode 100644 index 00000000000..c4b7c31fba3 --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/json/route.ts @@ -0,0 +1,3 @@ +export async function GET() { + return Response.json({ message: "Hello, World!" }) +} diff --git a/frameworks/TypeScript/nextjs/app/layout.tsx b/frameworks/TypeScript/nextjs/app/layout.tsx new file mode 100644 index 00000000000..0703997a627 --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/layout.tsx @@ -0,0 +1,13 @@ +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + {children} + + + ); +} diff --git a/frameworks/TypeScript/nextjs/app/page.tsx b/frameworks/TypeScript/nextjs/app/page.tsx new file mode 100644 index 00000000000..b772bfb7bbc --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/page.tsx @@ -0,0 +1,3 @@ +export default function Home() { + return +} diff --git a/frameworks/TypeScript/nextjs/app/plaintext/route.ts b/frameworks/TypeScript/nextjs/app/plaintext/route.ts new file mode 100644 index 00000000000..62ee50bc6ce --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/plaintext/route.ts @@ -0,0 +1,3 @@ +export function GET() { + return new Response("Hello, World!") +} diff --git a/frameworks/TypeScript/nextjs/app/queries/route.ts b/frameworks/TypeScript/nextjs/app/queries/route.ts new file mode 100644 index 00000000000..bea89efb67b --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/queries/route.ts @@ -0,0 +1,15 @@ +import { findWorld, World } from "@/lib/db" +import { NextRequest } from "next/server" + +export async function GET(request: NextRequest) { + const queriesParam = request.nextUrl.searchParams.get("queries") + const queriesCount = Math.min(Math.max(Number(queriesParam) || 1, 1), 500) + const promises = Array>(queriesCount) + + for (let i = 0; i < queriesCount; i += 1) { + const id = 1 + Math.floor(Math.random() * 10000) + promises[i] = findWorld(id) + } + + return Response.json(await Promise.all(promises)) +} diff --git a/frameworks/TypeScript/nextjs/app/updates/route.ts b/frameworks/TypeScript/nextjs/app/updates/route.ts new file mode 100644 index 00000000000..4eebbc71ffe --- /dev/null +++ b/frameworks/TypeScript/nextjs/app/updates/route.ts @@ -0,0 +1,26 @@ +import { db, findWorld, upsertWorlds, World } from "@/lib/db" +import { NextRequest } from "next/server" + +export async function GET(request: NextRequest) { + const queriesParam = request.nextUrl.searchParams.get("queries") + const queriesCount = Math.min(Math.max(Number(queriesParam) || 1, 1), 500) + + const ids = new Set() + while (ids.size < queriesCount) { + ids.add(1 + Math.floor(Math.random() * 10000)) + } + + const promises = new Array>() + for (const id of ids) { + promises.push(findWorld(id)) + } + + const results = await Promise.all(promises) as World[] + for (const result of results) { + result.randomNumber = 1 + Math.floor(Math.random() * 10000) + } + + await upsertWorlds(results) + + return Response.json(results) +} diff --git a/frameworks/TypeScript/nextjs/benchmark_config.json b/frameworks/TypeScript/nextjs/benchmark_config.json new file mode 100644 index 00000000000..d0853b96419 --- /dev/null +++ b/frameworks/TypeScript/nextjs/benchmark_config.json @@ -0,0 +1,30 @@ +{ + "framework": "nextjs", + "tests": [ + { + "default": { + "display_name": "Next.js", + "versus": "nodejs", + "classification": "Platform", + "language": "TypeScript", + "platform": "nodejs", + "framework": "nextjs", + "os": "Linux", + "webserver": "None", + "database": "postgres", + "database_os": "Linux", + "orm": "Micro", + "approach": "Realistic", + "notes": "", + "port": 3000, + "json_url": "/json", + "db_url": "/db", + "query_url": "/queries?queries=", + "TEMPORARILY DISABLED fortune_url": "/fortunes", + "update_url": "/updates?queries=", + "plaintext_url": "/plaintext", + "cached_query_url": "/cached-queries?queries=" + } + } + ] +} diff --git a/frameworks/TypeScript/nextjs/lib/db.ts b/frameworks/TypeScript/nextjs/lib/db.ts new file mode 100644 index 00000000000..5552ab826c9 --- /dev/null +++ b/frameworks/TypeScript/nextjs/lib/db.ts @@ -0,0 +1,27 @@ +import { Kysely, PostgresDialect } from "kysely" +import { Pool } from "pg" +import { Database, WorldRow } from "./schema.js" + +export const db = new Kysely({ + dialect: new PostgresDialect({ + pool: new Pool({ connectionString: process.env.DATABASE_URL }), + }), +}) + +export type World = { + [key in keyof WorldRow as key extends "randomnumber" ? "randomNumber" : key]: WorldRow[key] +} + +export async function findWorld(id: number): Promise { + return db.selectFrom("World"). + where("id", "=", id). + select(["id", "randomnumber as randomNumber"]). + executeTakeFirst() +} + +export async function upsertWorlds(worlds: World[]) { + const values = worlds.map(world => ({ id: world.id, randomnumber: world.randomNumber })) + return db.insertInto("World").values(values).onConflict(oc => + oc.column("id").doUpdateSet({ randomnumber: eb => eb.ref("excluded.randomnumber") }) + ).execute() +} diff --git a/frameworks/TypeScript/nextjs/lib/schema.ts b/frameworks/TypeScript/nextjs/lib/schema.ts new file mode 100644 index 00000000000..990108f8d24 --- /dev/null +++ b/frameworks/TypeScript/nextjs/lib/schema.ts @@ -0,0 +1,22 @@ +import { Generated, Insertable, Selectable, Updateable } from "kysely" + +export interface Database { + World: WorldTable + Fortune: FortuneTable +} + +export interface WorldTable { + id: Generated + randomnumber: number +} + +export type WorldRow = Selectable +export type NewWorld = Insertable +export type WorldUpdate = Updateable + +export interface FortuneTable { + id: Generated + message: string +} + +export type Fortune = Selectable diff --git a/frameworks/TypeScript/nextjs/middleware.ts b/frameworks/TypeScript/nextjs/middleware.ts new file mode 100644 index 00000000000..7983b8a3673 --- /dev/null +++ b/frameworks/TypeScript/nextjs/middleware.ts @@ -0,0 +1,7 @@ +import { NextRequest, NextResponse } from "next/server" + +export function middleware(request: NextRequest) { + const response = NextResponse.next() + response.headers.set("Server", "Next.js") + return response +} diff --git a/frameworks/TypeScript/nextjs/next.config.ts b/frameworks/TypeScript/nextjs/next.config.ts new file mode 100644 index 00000000000..68a6c64d279 --- /dev/null +++ b/frameworks/TypeScript/nextjs/next.config.ts @@ -0,0 +1,7 @@ +import type { NextConfig } from "next"; + +const nextConfig: NextConfig = { + output: "standalone", +}; + +export default nextConfig; diff --git a/frameworks/TypeScript/nextjs/nextjs.dockerfile b/frameworks/TypeScript/nextjs/nextjs.dockerfile new file mode 100644 index 00000000000..9f68f27e4b1 --- /dev/null +++ b/frameworks/TypeScript/nextjs/nextjs.dockerfile @@ -0,0 +1,20 @@ +FROM node:22-slim + +ENV NEXT_TELEMETRY_DISABLED="1" +ENV DATABASE_URL="postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world" + +EXPOSE 3000 + +WORKDIR /nextjs + +COPY package.json package-lock.json ./ +RUN npm ci + +COPY ./ ./ +RUN npm run build \ + && cp -r public .next/standalone/ \ + && cp -r .next/static .next/standalone/.next/ + +ENV NODE_ENV="production" + +CMD ["node", ".next/standalone/server.js"] diff --git a/frameworks/TypeScript/nextjs/package-lock.json b/frameworks/TypeScript/nextjs/package-lock.json new file mode 100644 index 00000000000..66e3d67f8a2 --- /dev/null +++ b/frameworks/TypeScript/nextjs/package-lock.json @@ -0,0 +1,1198 @@ +{ + "name": "next-techempower-benchmarks", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "next-techempower-benchmarks", + "version": "0.1.0", + "dependencies": { + "kysely": "^0.27.5", + "next": "^15.1.3", + "pg": "^8.13.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/node": "^20", + "@types/pg": "^8.11.10", + "@types/react": "^19", + "@types/react-dom": "^19", + "typescript": "^5" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@next/env": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.3.tgz", + "integrity": "sha512-Q1tXwQCGWyA3ehMph3VO+E6xFPHDKdHFYosadt0F78EObYxPio0S09H9UGYznDe6Wc8eLKLG89GqcFJJDiK5xw==", + "license": "MIT" + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.3.tgz", + "integrity": "sha512-aZtmIh8jU89DZahXQt1La0f2EMPt/i7W+rG1sLtYJERsP7GRnNFghsciFpQcKHcGh4dUiyTB5C1X3Dde/Gw8gg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.3.tgz", + "integrity": "sha512-aw8901rjkVBK5mbq5oV32IqkJg+CQa6aULNlN8zyCWSsePzEG3kpDkAFkkTOh3eJ0p95KbkLyWBzslQKamXsLA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.3.tgz", + "integrity": "sha512-YbdaYjyHa4fPK4GR4k2XgXV0p8vbU1SZh7vv6El4bl9N+ZSiMfbmqCuCuNU1Z4ebJMumafaz6UCC2zaJCsdzjw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.3.tgz", + "integrity": "sha512-qgH/aRj2xcr4BouwKG3XdqNu33SDadqbkqB6KaZZkozar857upxKakbRllpqZgWl/NDeSCBYPmUAZPBHZpbA0w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.3.tgz", + "integrity": "sha512-uzafnTFwZCPN499fNVnS2xFME8WLC9y7PLRs/yqz5lz1X/ySoxfaK2Hbz74zYUdEg+iDZPd8KlsWaw9HKkLEVw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.3.tgz", + "integrity": "sha512-el6GUFi4SiDYnMTTlJJFMU+GHvw0UIFnffP1qhurrN1qJV3BqaSRUjkDUgVV44T6zpw1Lc6u+yn0puDKHs+Sbw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.3.tgz", + "integrity": "sha512-6RxKjvnvVMM89giYGI1qye9ODsBQpHSHVo8vqA8xGhmRPZHDQUE4jcDbhBwK0GnFMqBnu+XMg3nYukNkmLOLWw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.3.tgz", + "integrity": "sha512-VId/f5blObG7IodwC5Grf+aYP0O8Saz1/aeU3YcWqNdIUAmFQY3VEPKPaIzfv32F/clvanOb2K2BR5DtDs6XyQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@types/node": { + "version": "20.17.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.11.tgz", + "integrity": "sha512-Ept5glCK35R8yeyIeYlRIZtX6SLRyqMhOFTgj5SOkMpLTdw3SEHI9fHx60xaUZ+V1aJxQJODE+7/j5ocZydYTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/pg": { + "version": "8.11.10", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.10.tgz", + "integrity": "sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^4.0.1" + } + }, + "node_modules/@types/pg/node_modules/pg-types": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", + "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", + "dev": true, + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "pg-numeric": "1.0.2", + "postgres-array": "~3.0.1", + "postgres-bytea": "~3.0.0", + "postgres-date": "~2.1.0", + "postgres-interval": "^3.0.0", + "postgres-range": "^1.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/pg/node_modules/postgres-array": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz", + "integrity": "sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/pg/node_modules/postgres-bytea": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", + "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "obuf": "~1.1.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/pg/node_modules/postgres-date": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", + "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/pg/node_modules/postgres-interval": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", + "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/react": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.2.tgz", + "integrity": "sha512-USU8ZI/xyKJwFTpjSVIrSeHBVAGagkHQKPNbxeWwql/vDmnTIBgx+TJnhFnj1NXgz8XfprU0egV2dROLGpsBEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.2.tgz", + "integrity": "sha512-c1s+7TKFaDRRxr1TxccIX2u7sfCnc3RxkVyBIUA2lCpyqCF+QoAwQ/CBg7bsMdVwP120HEH143VQezKtef5nCg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.0.0" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001690", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", + "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/client-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", + "license": "MIT" + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "optional": true + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT", + "optional": true + }, + "node_modules/kysely": { + "version": "0.27.5", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.27.5.tgz", + "integrity": "sha512-s7hZHcQeSNKpzCkHRm8yA+0JPLjncSWnjb+2TIElwS2JAqYr+Kv3Ess+9KFfJS0C1xcQ1i9NkNHpWwCYpHMWsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/next": { + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/next/-/next-15.1.3.tgz", + "integrity": "sha512-5igmb8N8AEhWDYzogcJvtcRDU6n4cMGtBklxKD4biYv4LXN8+awc/bbQ2IM2NQHdVPgJ6XumYXfo3hBtErg1DA==", + "license": "MIT", + "dependencies": { + "@next/env": "15.1.3", + "@swc/counter": "0.1.3", + "@swc/helpers": "0.5.15", + "busboy": "1.6.0", + "caniuse-lite": "^1.0.30001579", + "postcss": "8.4.31", + "styled-jsx": "5.1.6" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" + }, + "optionalDependencies": { + "@next/swc-darwin-arm64": "15.1.3", + "@next/swc-darwin-x64": "15.1.3", + "@next/swc-linux-arm64-gnu": "15.1.3", + "@next/swc-linux-arm64-musl": "15.1.3", + "@next/swc-linux-x64-gnu": "15.1.3", + "@next/swc-linux-x64-musl": "15.1.3", + "@next/swc-win32-arm64-msvc": "15.1.3", + "@next/swc-win32-x64-msvc": "15.1.3", + "sharp": "^0.33.5" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", + "babel-plugin-react-compiler": "*", + "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@playwright/test": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pg": { + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz", + "integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.7.0", + "pg-pool": "^3.7.0", + "pg-protocol": "^1.7.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==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.7.0.tgz", + "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==", + "license": "MIT" + }, + "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==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-numeric": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz", + "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "node_modules/pg-pool": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz", + "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.7.0.tgz", + "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==", + "license": "MIT" + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "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==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-range": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz", + "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/react": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.25.0" + }, + "peerDependencies": { + "react": "^19.0.0" + } + }, + "node_modules/scheduler": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/styled-jsx": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", + "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==", + "license": "MIT", + "dependencies": { + "client-only": "0.0.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + } + } +} diff --git a/frameworks/TypeScript/nextjs/package.json b/frameworks/TypeScript/nextjs/package.json new file mode 100644 index 00000000000..bc87525a493 --- /dev/null +++ b/frameworks/TypeScript/nextjs/package.json @@ -0,0 +1,25 @@ +{ + "name": "next-techempower-benchmarks", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev --turbopack", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "kysely": "^0.27.5", + "next": "^15.1.3", + "pg": "^8.13.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@types/node": "^20", + "@types/pg": "^8.11.10", + "@types/react": "^19", + "@types/react-dom": "^19", + "typescript": "^5" + } +} diff --git a/frameworks/TypeScript/nextjs/public/.keep b/frameworks/TypeScript/nextjs/public/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/frameworks/TypeScript/nextjs/tsconfig.json b/frameworks/TypeScript/nextjs/tsconfig.json new file mode 100644 index 00000000000..d8b93235f20 --- /dev/null +++ b/frameworks/TypeScript/nextjs/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}